From: Arnaldo Carvalho de Melo Date: Wed, 19 Jul 2017 15:16:15 +0000 (-0300) Subject: perf trace beauty mmap: Ignore 'fd' and 'offset' args for MAP_ANONYMOUS X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d57da8c9a5e11e7786931cfa1fd744969f530b2e;p=openwrt%2Fstaging%2Fblogic.git perf trace beauty mmap: Ignore 'fd' and 'offset' args for MAP_ANONYMOUS Just suppress them, not used by the kernel. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-atpt07y2x9a8ttlwja94ow3j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c index af1cfde6b97b..754558f9009d 100644 --- a/tools/perf/trace/beauty/mmap.c +++ b/tools/perf/trace/beauty/mmap.c @@ -34,6 +34,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size, { int printed = 0, flags = arg->val; + if (flags & MAP_ANONYMOUS) + arg->mask |= (1 << 4) | (1 << 5); /* Mask 4th ('fd') and 5th ('offset') args, ignored */ + #define P_MMAP_FLAG(n) \ if (flags & MAP_##n) { \ printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \