linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf report: Add s390 diagnosic sampling descriptor size
@ 2019-02-11 10:06 Thomas Richter
  2019-02-11 11:49 ` Arnaldo Carvalho de Melo
  2019-02-15  9:26 ` [tip:perf/core] " tip-bot for Thomas Richter
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Richter @ 2019-02-11 10:06 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter

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")

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
---
 tools/perf/util/s390-cpumsf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c
index 68b2570304ec..08073a4d59a4 100644
--- a/tools/perf/util/s390-cpumsf.c
+++ b/tools/perf/util/s390-cpumsf.c
@@ -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;
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf report: Add s390 diagnosic sampling descriptor size
  2019-02-11 10:06 [PATCH] perf report: Add s390 diagnosic sampling descriptor size Thomas Richter
@ 2019-02-11 11:49 ` Arnaldo Carvalho de Melo
  2019-02-15  9:26 ` [tip:perf/core] " tip-bot for Thomas Richter
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-11 11:49 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-perf-users, brueckner, schwidefsky, heiko.carstens

Em Mon, Feb 11, 2019 at 11:06:27AM +0100, Thomas Richter escreveu:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf report: Add s390 diagnosic sampling descriptor size
  2019-02-11 10:06 [PATCH] perf report: Add s390 diagnosic sampling descriptor size Thomas Richter
  2019-02-11 11:49 ` Arnaldo Carvalho de Melo
@ 2019-02-15  9:26 ` tip-bot for Thomas Richter
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Thomas Richter @ 2019-02-15  9:26 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: brueckner, linux-kernel, tglx, hpa, schwidefsky, mingo, tmricht,
	heiko.carstens, acme

Commit-ID:  2187d87eacd46f6214ce3dc9cfd7a558375a4153
Gitweb:     https://git.kernel.org/tip/2187d87eacd46f6214ce3dc9cfd7a558375a4153
Author:     Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Mon, 11 Feb 2019 11:06:27 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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")

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20190211100627.85714-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/s390-cpumsf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c
index d9525d220db1..c215704931dc 100644
--- a/tools/perf/util/s390-cpumsf.c
+++ b/tools/perf/util/s390-cpumsf.c
@@ -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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-15  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 10:06 [PATCH] perf report: Add s390 diagnosic sampling descriptor size Thomas Richter
2019-02-11 11:49 ` Arnaldo Carvalho de Melo
2019-02-15  9:26 ` [tip:perf/core] " tip-bot for Thomas Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).