]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/perf-report-add-s390-diagnosic-sampling-descriptor-s.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / queue-4.19 / perf-report-add-s390-diagnosic-sampling-descriptor-s.patch
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
5
6 [ Upstream commit 2187d87eacd46f6214ce3dc9cfd7a558375a4153 ]
7
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.
11
12 This leads to a perf report failure when processing diagnostic
13 sampling entries.
14
15 This patch adds missing descriptor sizes when the trailer entry
16 contains zero for these fields.
17
18 Output before:
19 [root@s38lp82 perf]# ./perf report --stdio | fgrep Samples
20 0xabbf0 [0x8]: failed to process type: 68
21 Error:
22 failed to process sample
23 [root@s38lp82 perf]#
24
25 Output after:
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'
30 [root@s38lp82 perf]#
31
32 Fixes: 2b1444f2e28b ("perf report: Add raw report support for s390 auxiliary trace")
33
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>
41 ---
42 tools/perf/util/s390-cpumsf.c | 5 +++++
43 1 file changed, 5 insertions(+)
44
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,
50 *dsdes = 85;
51 *bsdes = 32;
52 break;
53 + case 2964:
54 + case 2965:
55 + *dsdes = 112;
56 + *bsdes = 32;
57 + break;
58 default:
59 /* Illegal trailer entry */
60 return false;
61 --
62 2.19.1
63