Commit 73faab3a421351c342b10b0177fec9eea1a1d809

Authored by Namhyung Kim
Committed by Arnaldo Carvalho de Melo
1 parent 67c1e4a53b

perf trace: Beautify fifth argument of mmap() as fd

The fifth argument of mmap syscall is fd and it often contains -1 as a
value for anon mappings.  Without this patch it doesn't show the file
name as well as it shows -1 as 4294967295.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1384237500-22991-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

tools/perf/builtin-trace.c
... ... @@ -951,7 +951,8 @@
951 951 { .name = "mmap", .hexret = true,
952 952 .arg_scnprintf = { [0] = SCA_HEX, /* addr */
953 953 [2] = SCA_MMAP_PROT, /* prot */
954   - [3] = SCA_MMAP_FLAGS, /* flags */ }, },
  954 + [3] = SCA_MMAP_FLAGS, /* flags */
  955 + [4] = SCA_FD, /* fd */ }, },
955 956 { .name = "mprotect", .errmsg = true,
956 957 .arg_scnprintf = { [0] = SCA_HEX, /* start */
957 958 [2] = SCA_MMAP_PROT, /* prot */ }, },