Skip to content

Commit a663134

Browse files
committed
perf beauty mmap: Print mmap's 'offset' arg in hexadecimal
Also to make it match 'strace' output, for regression testing. Both now produce this option, when 'perf trace' uses a .perfconfig asking for the strace like output: mmap(0x7faf66e6a000, 1363968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7faf66e6a000 Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-27qhouo1kaac2iyl85nfnsf5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 1355e09 commit a663134

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/perf/builtin-trace.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,8 @@ static struct syscall_fmt {
756756
.alias = "old_mmap",
757757
#endif
758758
.arg = { [2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ },
759-
[3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ }, }, },
759+
[3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ },
760+
[5] = { .scnprintf = SCA_HEX, /* offset */ }, }, },
760761
{ .name = "mount",
761762
.arg = { [0] = { .scnprintf = SCA_FILENAME, /* dev_name */ },
762763
[3] = { .scnprintf = SCA_MOUNT_FLAGS, /* flags */

0 commit comments

Comments
 (0)