aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorJames Clark2020-11-26 16:13:26 +0200
committerArnaldo Carvalho de Melo2020-12-24 10:05:19 -0300
commitba2ee166d92b201078cb941956547ab9828989d3 (patch)
tree2d25f8e99b240123e608c8f145a57cbee562d317 /tools/perf/builtin-stat.c
parent1a270cb6b3cc18663f7fd165aa691c48d68739f2 (diff)
perf stat aggregation: Add separate die member
Add die as a separate member so that it doesn't have to be packed into the int value. 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: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20201126141328.6509-11-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.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 6248baa0f612..bac37fe9373c 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1387,11 +1387,7 @@ static struct aggr_cpu_id perf_env__get_die(struct perf_cpu_map *map, int idx, v
* make a unique ID.
*/
id.socket = env->cpu[cpu].socket_id;
-
- if (WARN_ONCE(env->cpu[cpu].die_id >> 8, "The die id number is too big.\n"))
- return cpu_map__empty_aggr_cpu_id();
-
- id.id = env->cpu[cpu].die_id & 0xff;
+ id.die = env->cpu[cpu].die_id;
}
return id;
@@ -1405,20 +1401,16 @@ static struct aggr_cpu_id perf_env__get_core(struct perf_cpu_map *map, int idx,
if (cpu != -1) {
/*
- * encode die id in bit range 23:16
* core_id is relative to socket and die,
* we need a global id. So we combine
* socket + die id + core id
*/
- if (WARN_ONCE(env->cpu[cpu].die_id >> 8, "The die id number is too big.\n"))
- return cpu_map__empty_aggr_cpu_id();
-
if (WARN_ONCE(env->cpu[cpu].core_id >> 16, "The core id number is too big.\n"))
return cpu_map__empty_aggr_cpu_id();
id.socket = env->cpu[cpu].socket_id;
- id.id = (env->cpu[cpu].die_id << 16) |
- (env->cpu[cpu].core_id & 0xffff);
+ id.die = env->cpu[cpu].die_id;
+ id.id = env->cpu[cpu].core_id & 0xffff;
}
return id;