public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 02/11] perf trace: Add mmap alias for s390
Date: Tue,  6 Jun 2017 16:26:41 -0300	[thread overview]
Message-ID: <20170606192650.20737-3-acme@kernel.org> (raw)
In-Reply-To: <20170606192650.20737-1-acme@kernel.org>

From: Jiri Olsa <jolsa@kernel.org>

The s390 architecture maps sys_mmap (nr 90) into sys_old_mmap.  For this
reason perf trace can't find the proper syscall event to get args format
from and displays it wrongly as 'continued'.

To fix that fill the "alias" field with "old_mmap" for trace's mmap record
to get the correct translation.

Before:
     0.042 ( 0.011 ms): vest/43052 fstat(statbuf: 0x3ffff89fd90                ) = 0
     0.042 ( 0.028 ms): vest/43052  ... [continued]: mmap()) = 0x3fffd6e2000
     0.072 ( 0.025 ms): vest/43052 read(buf: 0x3fffd6e2000, count: 4096        ) = 6

After:
     0.045 ( 0.011 ms): fstat(statbuf: 0x3ffff8a0930                           ) = 0
     0.057 ( 0.018 ms): mmap(arg: 0x3ffff8a0858                                ) = 0x3fffd14a000
     0.076 ( 0.025 ms): read(buf: 0x3fffd14a000, count: 4096                   ) = 6

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170531113557.19175-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d014350adc52..4b2a5d298197 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -681,6 +681,10 @@ static struct syscall_fmt {
 	{ .name	    = "mlockall",   .errmsg = true,
 	  .arg_scnprintf = { [0] = SCA_HEX, /* addr */ }, },
 	{ .name	    = "mmap",	    .hexret = true,
+/* The standard mmap maps to old_mmap on s390x */
+#if defined(__s390x__)
+	.alias = "old_mmap",
+#endif
 	  .arg_scnprintf = { [0] = SCA_HEX,	  /* addr */
 			     [2] = SCA_MMAP_PROT, /* prot */
 			     [3] = SCA_MMAP_FLAGS, /* flags */ }, },
-- 
2.9.4

  parent reply	other threads:[~2017-06-06 19:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 19:26 [GIT PULL 00/11] perf/urgent fixes Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 01/11] perf annotate: Fix failure when filename has special chars Arnaldo Carvalho de Melo
2017-06-06 19:26 ` Arnaldo Carvalho de Melo [this message]
2017-06-06 19:26 ` [PATCH 03/11] perf annotate: Fix branch instruction with multiple operands Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 04/11] perf stat: Only print NMI watchdog hint when enabled Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 05/11] perf header: Set proper module name when build-id event found Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 06/11] perf symbols: Set module info " Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 07/11] perf symbols: Use correct filename for compressed modules in build-id cache Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 08/11] perf test: Disable breakpoint signal tests for powerpc Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 09/11] perf annotate: Add missing powerpc triplet Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 10/11] perf report: Include partial stacks unwound with libdw Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 11/11] perf report: Ensure the perf DSO mapping matches what libdw sees Arnaldo Carvalho de Melo
2017-06-07 15:51 ` [GIT PULL 00/11] perf/urgent fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170606192650.20737-3-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox