1 From foo@baz Wed Aug 22 10:28:26 CEST 2018
2 From: Thomas Richter <tmricht@linux.ibm.com>
3 Date: Mon, 11 Jun 2018 09:31:53 +0200
4 Subject: perf test session topology: Fix test on s390
6 From: Thomas Richter <tmricht@linux.ibm.com>
8 [ Upstream commit b930e62ecd362843002bdf84c2940439822af321 ]
10 On s390 this test case fails because the socket identifiction numbers
11 assigned to the CPU are higher than the CPU identification numbers.
13 F/ix this by adding the platform architecture into the perf data header
14 flag information. This helps identifiing the test platform and handles
15 s390 specifics in process_cpu_topology().
19 [root@p23lp27 perf]# perf test -vvvvv -F 39
20 39: Session topology :
22 templ file: /tmp/perf-test-iUv755
23 socket_id number is too big.You may need to upgrade the perf tool.
25 Session topology: Skip
30 [root@p23lp27 perf]# perf test -vvvvv -F 39
31 39: Session topology :
33 templ file: /tmp/perf-test-8X8VTs
34 CPU 0, core 0, socket 6
35 CPU 1, core 1, socket 3
40 Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
41 Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
42 Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
43 Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
44 Fixes: c84974ed9fb6 ("perf test: Add entry to test cpu topology")
45 Link: http://lkml.kernel.org/r/20180611073153.15592-2-tmricht@linux.ibm.com
46 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
47 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
48 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
50 tools/perf/tests/topology.c | 1 +
51 1 file changed, 1 insertion(+)
53 --- a/tools/perf/tests/topology.c
54 +++ b/tools/perf/tests/topology.c
55 @@ -42,6 +42,7 @@ static int session_write_header(char *pa
57 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY);
58 perf_header__set_feat(&session->header, HEADER_NRCPUS);
59 + perf_header__set_feat(&session->header, HEADER_ARCH);
61 session->header.data_size += DATA_SIZE;