diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2018-08-02 10:30:08 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-08-02 10:30:08 -0300 |
| commit | 6a648b534d3d4f6532241fd9b97c0dab7b0c3f89 (patch) | |
| tree | 85d2a1d6bcb51bee3b7ccebd0a3d2d6cfc39eae8 /tools/perf/scripts/python | |
| parent | ec2cb7a526d49b65576301e183448fb51ee543a6 (diff) | |
perf trace: Associate vfs_getname()'ed pathname with fd returned from 'openat'
When the vfs_getname() wannabe tracepoint is in place:
# perf probe -l
probe:vfs_getname (on getname_flags:73@acme/git/linux/fs/namei.c with pathname)
#
'perf trace' will use it to get the pathname when it is copied from
userspace to the kernel, right after syscalls:sys_enter_open, copied
in the 'probe:vfs_getname', stash it somewhere and then, at
syscalls:sys_exit_open time, if the 'open' return is not -1, i.e. a
successfull open syscall, associate that pathname to this return, i.e.
the fd.
We were not doing this for the 'openat' syscall, which would cause 'perf
trace' to fallback to using /proc to get the fd, change it so that we
use what we got from probe:vfs_getname, reducing the 'openat'
beautification process cost, ditching the syscalls performed to read
procfs state and avoiding some possible races in the process.
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: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions