perf trace: Beautify the umount's 'name' argument
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Oct 2018 16:23:25 +0000 (13:23 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 30 Oct 2018 14:46:23 +0000 (11:46 -0300)
By using the SCA_FILENAME beautifier, that works when either the
probe:vfs_getname probe is in place or with the eBPF program
tools/perf/examples/bpf/augmented_syscalls.c:

  # perf probe -l
  probe:vfs_getname (on getname_flags:73@acme/git/linux/fs/namei.c with pathname)
  # perf trace -e umount
  9630.332 ( 9.521 ms): umount/8082 umount2(name: /mnt) = 0
  #

The augmented syscalls one will be done in the next patch.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Benjamin Peterson <benjamin@python.org>
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: https://lkml.kernel.org/n/tip-hegbzlpd2nrn584l5jxn7sy2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c

index db8711061ca3b1469a054c802f049c4e63f93018..d286f73ef2e5b8b07066984411f0fcec9910bf79 100644 (file)
@@ -838,7 +838,8 @@ static struct syscall_fmt {
          .arg = { [2] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
        { .name     = "tkill",
          .arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
-       { .name     = "umount2", .alias = "umount", },
+       { .name     = "umount2", .alias = "umount",
+         .arg = { [0] = { .scnprintf = SCA_FILENAME, /* name */ }, }, },
        { .name     = "uname", .alias = "newuname", },
        { .name     = "unlinkat",
          .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },