summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2020-11-26 17:13:23 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-12-24 16:04:38 +0300
commitff5232956e074994a66656f709c3ad1ee3d8a550 (patch)
tree5f4da1fbdf888fc574ab0db0ead2f0bfcb916711 /tools/perf/builtin-stat.c
parentd526e1a033e03ec4515b1800f99d99a35c7ea790 (diff)
downloadlinux-ff5232956e074994a66656f709c3ad1ee3d8a550.tar.xz
perf stat aggregation: Start using cpu_aggr_id in map
Use the new cpu_aggr_id struct in the cpu map instead of int so that it can store more data. No functional changes. Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: John Garry <john.garry@huawei.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20201126141328.6509-8-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index cc017c7dcee9..3fec1b7e93b5 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1221,10 +1221,10 @@ static struct aggr_cpu_id perf_stat__get_aggr(struct perf_stat_config *config,
cpu = map->map[idx];
- if (config->cpus_aggr_map->map[cpu] == -1)
- config->cpus_aggr_map->map[cpu] = get_id(config, map, idx).id;
+ if (cpu_map__aggr_cpu_id_is_empty(config->cpus_aggr_map->map[cpu]))
+ config->cpus_aggr_map->map[cpu] = get_id(config, map, idx);
- id.id = config->cpus_aggr_map->map[cpu];
+ id = config->cpus_aggr_map->map[cpu];
return id;
}