lkml.org 
[lkml]   [2018]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 3.18 063/102] perf trace: Add mmap alias for s390
    Date
    From: Jiri Olsa <jolsa@kernel.org>

    [ Upstream commit 54265664c15a68905d8d67d19205e9a767636434 ]

    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>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.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 fb126459b134..7e74d8aea99b 100644
    --- a/tools/perf/builtin-trace.c
    +++ b/tools/perf/builtin-trace.c
    @@ -1020,6 +1020,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.14.1
    \
     
     \ /
      Last update: 2018-03-19 17:37    [W:3.023 / U:0.404 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site