From: Namhyung Kim Date: Tue, 12 Nov 2013 06:24:59 +0000 (+0900) Subject: perf trace: Beautify fifth argument of mmap() as fd X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=73faab3a421351c342b10b0177fec9eea1a1d809;p=linux-beck.git 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 Acked-by: David Ahern Cc: David Ahern Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1384237500-22991-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index c3008b1c369c..aeb6296a76bd 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -951,7 +951,8 @@ static struct syscall_fmt { { .name = "mmap", .hexret = true, .arg_scnprintf = { [0] = SCA_HEX, /* addr */ [2] = SCA_MMAP_PROT, /* prot */ - [3] = SCA_MMAP_FLAGS, /* flags */ }, }, + [3] = SCA_MMAP_FLAGS, /* flags */ + [4] = SCA_FD, /* fd */ }, }, { .name = "mprotect", .errmsg = true, .arg_scnprintf = { [0] = SCA_HEX, /* start */ [2] = SCA_MMAP_PROT, /* prot */ }, },