Skip to content

Commit d57da8c

Browse files
committed
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>
1 parent 6f8fe61 commit d57da8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/perf/trace/beauty/mmap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size,
3434
{
3535
int printed = 0, flags = arg->val;
3636

37+
if (flags & MAP_ANONYMOUS)
38+
arg->mask |= (1 << 4) | (1 << 5); /* Mask 4th ('fd') and 5th ('offset') args, ignored */
39+
3740
#define P_MMAP_FLAG(n) \
3841
if (flags & MAP_##n) { \
3942
printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \

0 commit comments

Comments
 (0)