Skip to contentSkip to conversation

perf report: Add s390 diagnosic sampling descriptor size

PATCH Applied Thomas Richter 3 participants 3 messages Feb 11, 2019 – Feb 15, 2019 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf report: Add s390 diagnosic sampling descriptor size

On IBM z13 machine types 2964 and 2965 the descriptor sizes for sampling and diagnostic sampling entries might be missing in the trailer entry and are set to zero.

This leads to a perf report failure when processing diagnostic sampling entries.

This patch adds missing descriptor sizes when the trailer entry contains zero for these fields.

Output before:
[root@s38lp82 perf]# ./perf report --stdio | fgrep Samples 0xabbf0 [0x8]: failed to process type: 68
Error:
failed to process sample
[root@s38lp82 perf]#

Output after:
[root@s38lp82 perf]# ./perf report --stdio | fgrep Samples # Total Lost Samples: 0
# Samples: 3K of event 'SF_CYCLES_BASIC_DIAG'
# Samples: 162 of event 'CF_DIAG'
[root@s38lp82 perf]#

Fixes 2b1444f2e28b ("perf report: Add raw report support for s390 auxiliary trace")
---
 tools/perf/util/s390-cpumsf.c | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/util/s390-cpumsf.c +5 -0
index 68b2570304ec..08073a4d59a4 100644
@@ -301,6 +301,11 @@ static bool s390_cpumsf_validate(int machine_type,
 			*dsdes = 85;
 			*bsdes = 32;
 			break;
+		case 2964:
+		case 2965:
+			*dsdes = 112;
+			*bsdes = 32;
+			break;
 		default:
 			/* Illegal trailer entry */
 			return false;
Signature · 1 line
2.19.1
maintainer Applied
#1 lore raw

Em Mon, Feb 11, 2019 at 11:06:27AM +0100, Thomas Richter escreveu:

Quoted 9 lines

On IBM z13 machine types 2964 and 2965 the descriptor sizes for sampling and diagnostic sampling entries might be missing in the trailer entry and are set to zero.

This leads to a perf report failure when processing diagnostic sampling entries.

This patch adds missing descriptor sizes when the trailer entry contains zero for these fields.

Thanks, applied.

- Arnaldo

#2 lore raw
In reply to Thomas Richter
perf report: Add s390 diagnosic sampling descriptor size
Commit-ID:  2187d87eacd46f6214ce3dc9cfd7a558375a4153
Gitweb:     https://git.kernel.org/tip/2187d87eacd46f6214ce3dc9cfd7a558375a4153
Author:     Thomas Richter <[email protected]>
AuthorDate: Mon, 11 Feb 2019 11:06:27 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 14 Feb 2019 13:31:08 -0300

perf report: Add s390 diagnosic sampling descriptor size

On IBM z13 machine types 2964 and 2965 the descriptor sizes for sampling and diagnostic sampling entries might be missing in the trailer entry and are set to zero.

This leads to a perf report failure when processing diagnostic sampling entries.

This patch adds missing descriptor sizes when the trailer entry contains zero for these fields.

Output before:
[root@s38lp82 perf]# ./perf report --stdio | fgrep Samples 0xabbf0 [0x8]: failed to process type: 68
Error:
failed to process sample
[root@s38lp82 perf]#

Output after:
[root@s38lp82 perf]# ./perf report --stdio | fgrep Samples # Total Lost Samples: 0
# Samples: 3K of event 'SF_CYCLES_BASIC_DIAG'
# Samples: 162 of event 'CF_DIAG'
[root@s38lp82 perf]#

Fixes 2b1444f2e28b ("perf report: Add raw report support for s390 auxiliary trace")
---
 tools/perf/util/s390-cpumsf.c | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/util/s390-cpumsf.c +5 -0
index d9525d220db1..c215704931dc 100644
@@ -352,6 +352,11 @@ static bool s390_cpumsf_validate(int machine_type,
 			*dsdes = 85;
 			*bsdes = 32;
 			break;
+		case 2964:
+		case 2965:
+			*dsdes = 112;
+			*bsdes = 32;
+			break;
 		default:
 			/* Illegal trailer entry */
 			return false;