perf: Remove 'core_id' check in topo test
PATCH 1/1 perf: Remove 'core_id' check in topo test
Quoted 1 line
From
b6bb5d9182f89cd7c6f1eff3cd5a6d3f947b8b0cMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 3 Dec 2015 18:26:40 -0500
Subject: [PATCH 1/1] perf: Remove 'core_id' check in topo test
The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online.
There are 8 online CPUs:
$ cat /sys/devices/system/cpu/online 0-7
but core-ids are not sequential and some core-ids exceed the number of online CPUs.
$ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10
Looks like we can safely remove the check. Output before:
$ ./perf --version perf version 4.4.rc1.g34258a
$ ./perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED!
and after:
./perf test -v topo
36: Test topology in session :
--- start ---
test child forked, pid 6532
templ file: /tmp/perf-test-y10wFJ
CPU 0, core 0, socket 0
CPU 1, core 1, socket 0
CPU 2, core 9, socket 0
CPU 3, core 10, socket 0
CPU 4, core 0, socket 1
CPU 5, core 1, socket 1
CPU 6, core 9, socket 1
CPU 7, core 10, socket 1
test child finished with 0
---- end ----
Test topology in session: Ok
--- tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-)
tools/perf/util/header.c +0 -5
@@ -1652,11 +1652,6 @@ static int process_cpu_topology(struct perf_file_section *section,if (ph->needs_swap) nr =bswap_32 (nr); -if (nr > (u32 )cpu_nr) { -pr_debug ("core_id number is too big." -"You may need to upgrade the perf tool.\n" ); - goto free_cpu; - } ph->env.cpu[i].core_id = nr; ret =readn (fd, &nr,sizeof (nr));
Signature · 1 line
2.1.0
Quoted 4 lines · Sukadev Bhattiprolu
From
b6bb5d9182f89cd7c6f1eff3cd5a6d3f947b8b0cMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 3 Dec 2015 18:26:40 -0500
Subject: [PATCH 1/1] perf: Remove 'core_id' check in topo test
hi,
looks like this one fell through the cracks
Arnaldo, could you please queue it..
thanks,
jirka
Quoted 82 lines
The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online.
There are 8 online CPUs:
$ cat /sys/devices/system/cpu/online 0-7but core-ids are not sequential and some core-ids exceed the number of online CPUs.
$ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10Looks like we can safely remove the check. Output before:
$ ./perf --version perf version 4.4.rc1.g34258a$ ./perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED!and after:
./perf test -v topo
36: Test topology in session :
--- start ---
test child forked, pid 6532
templ file:/tmp/perf-test-y10wFJ
CPU 0, core 0, socket 0
CPU 1, core 1, socket 0
CPU 2, core 9, socket 0
CPU 3, core 10, socket 0
CPU 4, core 0, socket 1
CPU 5, core 1, socket 1
CPU 6, core 9, socket 1
CPU 7, core 10, socket 1
test child finished with 0
---- end ----
Test topology in session: OkSigned-off-by Sukadev Bhattiprolu <[email protected]>Cc Jiri Olsa <[email protected]>--- tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-)tools/perf/util/header.c +0
-5@@ -1652,11 +1652,6 @@ static int process_cpu_topology(struct perf_file_section *section,if (ph->needs_swap) nr =bswap_32 (nr); -if (nr > (u32 )cpu_nr) { -pr_debug ("core_id number is too big." -"You may need to upgrade the perf tool.\n" ); - goto free_cpu; - } ph->env.cpu[i].core_id = nr; ret =readn (fd, &nr,sizeof (nr));Signature · 1 line
2.1.0
A message that is not in the archive (sent off-list or not yet received): CA+JHD91sxsyzfQt3NhyXdjtTFYjWfN7jj7kAWuj0v2+D=tpSNg@mail.gmail.com
Quoted 2 lines · Arnaldo Carvalho de Melo
Its in perf/core as if a few days ago, IIRC
Le 13 mars 2016 3:54 PM, "Jiri Olsa" <[email protected]> a écrit :
cool, thanks
jirka
Quoted 103 lines
Quoted 103 lines · Sukadev Bhattiprolu
Quoted 4 lines
From
b6bb5d9182f89cd7c6f1eff3cd5a6d3f947b8b0cMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 3 Dec 2015 18:26:40 -0500
Subject: [PATCH 1/1] perf: Remove 'core_id' check in topo testhi,
looks like this one fell through the cracksArnaldo, could you please queue it..
Acked-by Jiri Olsa <[email protected]> ;-)thanks,
jirkatools/perf/util/header.c static int process_cpu_topology(struct
Quoted 68 lines
The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online.
There are 8 online CPUs:
$ cat /sys/devices/system/cpu/online 0-7but core-ids are not sequential and some core-ids exceed the number of online CPUs.
$ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10Looks like we can safely remove the check. Output before:
$ ./perf --version perf version 4.4.rc1.g34258a$ ./perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED!and after:
./perf test -v topo
36: Test topology in session :
--- start ---
test child forked, pid 6532
templ file:/tmp/perf-test-y10wFJ
CPU 0, core 0, socket 0
CPU 1, core 1, socket 0
CPU 2, core 9, socket 0
CPU 3, core 10, socket 0
CPU 4, core 0, socket 1
CPU 5, core 1, socket 1
CPU 6, core 9, socket 1
CPU 7, core 10, socket 1
test child finished with 0
---- end ----
Test topology in session: OkSigned-off-by Sukadev Bhattiprolu <[email protected]>Cc Jiri Olsa <[email protected]>--- tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-)tools/perf/util/header.c +0
-0@@ -1652,11 +1652,6 @@ static int process_cpu_topology(struct
perf_file_section*section,tools/perf/util/header.c static int process_cpu_topology(struct perf_file_section *section,
Quoted 6 lines
tools/perf/util/header.c +0
-3if (ph->needs_swap) nr =bswap_32 (nr); - if (nr > (u32)cpu_nr) { - pr_debug("core_id number is too big." - "You may need to upgrade the perftool.\n");
Quoted 8 lines
tools/perf/util/header.c +0
-3- goto free_cpu; - } ph->env.cpu[i].core_id = nr; ret =readn (fd, &nr,sizeof (nr)); --2.1.0
tip-bot for Sukadev Bhattiprolu
merge bot[tip:perf/urgent] perf test: Remove 'core_id' check in topo test
In reply to Sukadev Bhattiproluperf test: Remove 'core_id' check in topo test
Commit-ID: 4c9d6c18fdebfcfb18918a656355a3c7c3d45e13 Gitweb: http://git.kernel.org/tip/4c9d6c18fdebfcfb18918a656355a3c7c3d45e13 Author: Sukadev Bhattiprolu <[email protected]> AuthorDate: Thu, 3 Dec 2015 18:26:40 -0500 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 11 Mar 2016 13:45:04 -0300
perf test: Remove 'core_id' check in topo test
The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online.
There are 8 online CPUs:
$ cat /sys/devices/system/cpu/online 0-7
but core-ids are not sequential and some core-ids exceed the number of online CPUs.
$ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10
Looks like we can safely remove the check. Output before:
$ perf --version perf version 4.4.rc1.g34258a
$ perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED!
and after:
$ perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 6532 templ file: /tmp/perf-test-y10wFJ CPU 0, core 0, socket 0 CPU 1, core 1, socket 0 CPU 2, core 9, socket 0 CPU 3, core 10, socket 0 CPU 4, core 0, socket 1 CPU 5, core 1, socket 1 CPU 6, core 9, socket 1 CPU 7, core 10, socket 1 test child finished with 0 ---- end ---- Test topology in session: Ok
--- tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-)
tools/perf/util/header.c +0 -5
@@ -1872,11 +1872,6 @@ static int process_cpu_topology(struct perf_file_section *section,if (ph->needs_swap) nr =bswap_32 (nr); -if (nr > (u32 )cpu_nr) { -pr_debug ("core_id number is too big." -"You may need to upgrade the perf tool.\n" ); - goto free_cpu; - } ph->env.cpu[i].core_id = nr; ret =readn (fd, &nr,sizeof (nr));