Skip to content

Commit 91faaa0

Browse files
t00214307gregkh
authored andcommitted
perf record: Support aarch64 random socket_id assignment
[ Upstream commit 0a4d8fb ] Same as in the commit 0176622 ("perf record: Support s390 random socket_id assignment"), aarch64 also have this problem. Without this fix: [root@localhost perf]# ./perf report --header -I -v ... socket_id number is too big.You may need to upgrade the perf tool. # ======== # captured on : Thu Aug 1 22:58:38 2019 # header version : 1 ... # Core ID and Socket ID information is not available ... With this fix: [root@localhost perf]# ./perf report --header -I -v ... cpumask list: 0-31 cpumask list: 32-63 cpumask list: 64-95 cpumask list: 96-127 # ======== # captured on : Thu Aug 1 22:58:38 2019 # header version : 1 ... # CPU 0: Core ID 0, Socket ID 36 # CPU 1: Core ID 1, Socket ID 36 ... # CPU 126: Core ID 126, Socket ID 8442 # CPU 127: Core ID 127, Socket ID 8442 ... Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <songliubraving@fb.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Link: http://lkml.kernel.org/r/1564717737-21602-1-git-send-email-tanxiaojun@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b8179cf commit 91faaa0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tools/perf/util/header.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,8 +2205,10 @@ static int process_cpu_topology(struct feat_fd *ff, void *data __maybe_unused)
22052205
/* On s390 the socket_id number is not related to the numbers of cpus.
22062206
* The socket_id number might be higher than the numbers of cpus.
22072207
* This depends on the configuration.
2208+
* AArch64 is the same.
22082209
*/
2209-
if (ph->env.arch && !strncmp(ph->env.arch, "s390", 4))
2210+
if (ph->env.arch && (!strncmp(ph->env.arch, "s390", 4)
2211+
|| !strncmp(ph->env.arch, "aarch64", 7)))
22102212
do_core_id_test = false;
22112213

22122214
for (i = 0; i < (u32)cpu_nr; i++) {

0 commit comments

Comments
 (0)