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 <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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

+3
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)