summaryrefslogtreecommitdiffstats
path: root/tools/perf/trace
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-07-19 17:16:15 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-20 14:55:51 +0200
commitd57da8c9a5e11e7786931cfa1fd744969f530b2e (patch)
treef3f322feb5f880c55c311930eba8d932c103ea1b /tools/perf/trace
parentperf trace: Add missing ' = ' in the default formatting of syscall returns (diff)
downloadlinux-d57da8c9a5e11e7786931cfa1fd744969f530b2e.tar.xz
linux-d57da8c9a5e11e7786931cfa1fd744969f530b2e.zip
perf trace beauty mmap: Ignore 'fd' and 'offset' args for MAP_ANONYMOUS
Just suppress them, not used by the kernel. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-atpt07y2x9a8ttlwja94ow3j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/trace')
-rw-r--r--tools/perf/trace/beauty/mmap.c3
1 files changed, 3 insertions, 0 deletions
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); \