1 From 83457f8bacf8800e66d82e06ad9feed89e2a1cd0 Mon Sep 17 00:00:00 2001
2 From: Thomas Richter <tmricht@linux.ibm.com>
3 Date: Mon, 11 Feb 2019 11:06:27 +0100
4 Subject: perf report: Add s390 diagnosic sampling descriptor size
6 [ Upstream commit 2187d87eacd46f6214ce3dc9cfd7a558375a4153 ]
8 On IBM z13 machine types 2964 and 2965 the descriptor
9 sizes for sampling and diagnostic sampling entries
10 might be missing in the trailer entry and are set to zero.
12 This leads to a perf report failure when processing diagnostic
15 This patch adds missing descriptor sizes when the trailer entry
16 contains zero for these fields.
19 [root@s38lp82 perf]# ./perf report --stdio | fgrep Samples
20 0xabbf0 [0x8]: failed to process type: 68
22 failed to process sample
26 [root@s38lp82 perf]# ./perf report --stdio | fgrep Samples
27 # Total Lost Samples: 0
28 # Samples: 3K of event 'SF_CYCLES_BASIC_DIAG'
29 # Samples: 162 of event 'CF_DIAG'
32 Fixes: 2b1444f2e28b ("perf report: Add raw report support for s390 auxiliary trace")
34 Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
35 Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
36 Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
37 Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
38 Link: http://lkml.kernel.org/r/20190211100627.85714-1-tmricht@linux.ibm.com
39 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
40 Signed-off-by: Sasha Levin <sashal@kernel.org>
42 tools/perf/util/s390-cpumsf.c | 5 +++++
43 1 file changed, 5 insertions(+)
45 diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c
46 index aa7f8c11fbb7..910f2621d211 100644
47 --- a/tools/perf/util/s390-cpumsf.c
48 +++ b/tools/perf/util/s390-cpumsf.c
49 @@ -294,6 +294,11 @@ static bool s390_cpumsf_validate(int machine_type,
59 /* Illegal trailer entry */