perf stat: Move csv_* to 'struct perf_stat_config'
Move the static csv_* variables to 'struct perf_stat_config', so that it
can be passed around and used outside the 'perf stat' command.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180830063252.23729-21-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index dffcf21..18546d8b 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -91,6 +91,7 @@ struct perf_stat_config {
bool scale;
bool no_inherit;
bool identifier;
+ bool csv_output;
FILE *output;
unsigned int interval;
unsigned int timeout;
@@ -98,6 +99,7 @@ struct perf_stat_config {
int times;
struct runtime_stat *stats;
int stats_num;
+ const char *csv_sep;
};
void update_stats(struct stats *stats, u64 val);