linux-stable/tools/perf
Arnaldo Carvalho de Melo dda9ac966d perf bpf: Add 'syscall_enter' probe helper for syscall enter tracepoints
Allowing one to hook into the syscalls:sys_enter_NAME tracepoints,
an example is provided that hooks into the 'openat' syscall.

Using it with the probe:vfs_getname probe into getname_flags to get the
filename args as it is copied from userspace:

  # perf probe -l
  probe:vfs_getname    (on getname_flags:73@acme/git/linux/fs/namei.c with pathname)
  # perf trace -e probe:*getname,tools/perf/examples/bpf/sys_enter_openat.c cat /etc/passwd > /dev/null
     0.000 probe:vfs_getname:(ffffffffbd2a8983) pathname="/etc/ld.so.preload"
     0.022 syscalls:sys_enter_openat:dfd: CWD, filename: 0xafbe8da8, flags: CLOEXEC
     0.027 probe:vfs_getname:(ffffffffbd2a8983) pathname="/etc/ld.so.cache"
     0.054 syscalls:sys_enter_openat:dfd: CWD, filename: 0xafdf0ce0, flags: CLOEXEC
     0.057 probe:vfs_getname:(ffffffffbd2a8983) pathname="/lib64/libc.so.6"
     0.316 probe:vfs_getname:(ffffffffbd2a8983) pathname="/usr/lib/locale/locale-archive"
     0.375 syscalls:sys_enter_openat:dfd: CWD, filename: 0xe2b2b0b4
     0.379 probe:vfs_getname:(ffffffffbd2a8983) pathname="/etc/passwd"
  #

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: https://lkml.kernel.org/n/tip-2po9jcqv1qgj0koxlg8kkg30@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-08 15:55:44 -03:00
..
arch perf auxtrace: Support for perf report -D for s390 2018-08-03 10:34:18 -03:00
bench tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' 2018-07-30 12:36:51 -03:00
Documentation perf list: Add missing documentation for --desc and --debug options 2018-07-24 14:49:57 -03:00
examples/bpf perf bpf: Add 'syscall_enter' probe helper for syscall enter tracepoints 2018-08-08 15:55:44 -03:00
include/bpf perf bpf: Add 'syscall_enter' probe helper for syscall enter tracepoints 2018-08-08 15:55:44 -03:00
jvmti perf tools: Fix compilation errors on gcc8 2018-07-11 09:39:57 -04:00
pmu-events perf vendor events arm64: Enable JSON events for eMAG 2018-08-08 15:55:43 -03:00
python
scripts perf scripts python: Add Python 3 support to EventClass.py 2018-07-11 10:01:50 -03:00
tests perf tools: Drop unneeded bitmap_zero() calls 2018-08-08 15:55:44 -03:00
trace perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg 2018-07-31 10:52:47 -03:00
ui perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
util perf tools: Drop unneeded bitmap_zero() calls 2018-08-08 15:55:44 -03:00
.gitignore
Build
builtin-annotate.c perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] 2018-06-25 11:59:37 -03:00
builtin-bench.c
builtin-buildid-cache.c perf buildid-cache: Warn --purge-all failures 2018-05-15 10:32:16 -03:00
builtin-buildid-list.c
builtin-c2c.c perf c2c report: Fix crash for empty browser 2018-07-31 10:53:20 -03:00
builtin-config.c
builtin-data.c
builtin-diff.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-evlist.c
builtin-ftrace.c
builtin-help.c perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT 2018-04-12 10:33:31 -03:00
builtin-inject.c perf thread: Make thread__find_map() return the map 2018-04-26 13:47:08 -03:00
builtin-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kmem.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kvm.c perf tools: Ditch the symbol_conf.nr_events global 2018-06-04 10:28:52 -03:00
builtin-list.c
builtin-lock.c
builtin-mem.c perf mem: Allow all record/report options 2018-04-18 15:35:48 -03:00
builtin-probe.c perf tools: No need to check if the argument to __get() function is NULL 2018-06-04 10:28:50 -03:00
builtin-record.c
builtin-report.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-sched.c perf sched: Use sched->show_callchain where appropriate 2018-06-05 10:09:54 -03:00
builtin-script.c perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] 2018-06-25 11:59:37 -03:00
builtin-stat.c perf stat: Get rid of extra clock display function 2018-07-24 14:54:58 -03:00
builtin-timechart.c perf thread: Make thread__find_symbol() return the symbol searched 2018-04-26 13:47:09 -03:00
builtin-top.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-trace.c perf trace: Use perf_evsel__sc_tp_{uint,ptr} for "id"/"args" handling syscalls:* events 2018-08-02 15:39:00 -03:00
builtin-version.c perf version: Print status for syscall_table 2018-04-12 10:33:34 -03:00
builtin.h
check-headers.sh tools include uapi: Grab a copy of linux/in.h 2018-07-31 10:52:37 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Fix installation directory for eBPF 2018-07-31 10:54:50 -03:00
Makefile.perf perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg 2018-07-31 10:52:47 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Remove dead quote.[ch] code 2018-06-04 10:28:50 -03:00
perf.h perf tools: Allow overriding MAX_NR_CPUS at compile time 2018-08-01 12:33:24 -03:00