summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/stat.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2018-08-30 08:32:45 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-30 15:52:24 -0300
commit6f6b6594b5f380b0a972b66b275caa6c54bb1fea (patch)
tree061dab234de808f04bfd91c5777d232c757fb5f6 /tools/perf/util/stat.h
parent8897a8916efb29fa8bbe9e5f6e5d56362aedf64e (diff)
downloadlinux-6f6b6594b5f380b0a972b66b275caa6c54bb1fea.tar.bz2
perf stat: Move *_aggr_* data to 'struct perf_stat_config'
Move the *_aggr_* global variables to 'struct perf_stat_config', so that it can be passed around and used outside '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-37-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat.h')
-rw-r--r--tools/perf/util/stat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 1fd0b7e196c6..be202b066e62 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -90,6 +90,9 @@ struct runtime_stat {
struct rblist value_list;
};
+typedef int (*aggr_get_id_t)(struct perf_stat_config *config,
+ struct cpu_map *m, int cpu);
+
struct perf_stat_config {
enum aggr_mode aggr_mode;
bool scale;
@@ -115,6 +118,9 @@ struct perf_stat_config {
const char *csv_sep;
struct stats *walltime_nsecs_stats;
struct rusage ru_data;
+ struct cpu_map *aggr_map;
+ aggr_get_id_t aggr_get_id;
+ struct cpu_map *cpus_aggr_map;
};
void update_stats(struct stats *stats, u64 val);