linux-stable/tools/perf/tests
Arnaldo Carvalho de Melo e498f336d6 perf test shell: Add test using vfs_getname + 'perf trace'
Uses the 'perf test shell' library to add probe:vfs_getname to the
system then use it with 'perf trace' using 'touch' to write to a temp
file, then checks that that was captured by the vfs_getname was used by
'perf trace', that already handles "probe:vfs_getname" if present, and
used in the "open" syscall "filename" argument beautifier.

Testing it:

  # perf test "trace + vfs_getname"
  61: Check open filename arg using perf trace + vfs_getname: Ok
  #

  # perf test -v "trace + vfs_getname"
  61: Check open filename arg using perf trace + vfs_getname:
  --- start ---
  test child forked, pid 30846
  Added new event:
    probe:vfs_getname    (on getname_flags:72 with pathname=result->name:string)

  You can now use it in all perf tools, such as:

  	perf record -e probe:vfs_getname -aR sleep 1

       2.237 ( 0.012 ms): touch/30855 open(filename: /tmp/temporary_file.kmoWQ, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3
  test child finished with 0
  ---- end ----
  Check open filename arg using perf trace + vfs_getname: Ok
  #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-j02nobfvvn9c7yrphdsnbqx0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-08-11 16:06:30 -03:00
..
attr perf tests attr: Add optional term 2017-07-18 23:14:22 -03:00
shell perf test shell: Add test using vfs_getname + 'perf trace' 2017-08-11 16:06:30 -03:00
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
Build perf tools: Fix build with ARCH=x86_64 2017-06-14 15:44:29 -03:00
attr.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
attr.py perf tests attr: Add optional term 2017-07-18 23:14:22 -03:00
backward-ring-buffer.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bitmap.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bp_signal.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bp_signal_overflow.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bpf-script-example.c perf tests bpf: Use SyS_epoll_wait alias 2016-08-03 19:40:48 -03:00
bpf-script-test-kbuild.c perf test: Enhance the LLVM tests: add kbuild test 2015-11-06 17:49:50 -03:00
bpf-script-test-prologue.c perf test llvm: Avoid error when PROFILE_ALL_BRANCHES is set 2017-06-19 16:11:26 -03:00
bpf-script-test-relocation.c perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
bpf.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
builtin-test.c perf test: Make 'list' use same filtering code as main 'perf test' 2017-08-11 16:06:27 -03:00
clang.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
code-reading.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
cpumap.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
dso-data.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
dwarf-unwind.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
event-times.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
event_update.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
evsel-roundtrip-name.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
evsel-tp-sched.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
expr.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
fdarray.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_common.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00
hists_common.h perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_cumulate.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_filter.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_link.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_output.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
is_printable_array.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
keep-tracking.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
kmod-path.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
llvm.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
llvm.h perf clang: Update test case to use real BPF script 2016-12-05 15:51:44 -03:00
make Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-12-17 16:24:13 -08:00
mmap-basic.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
mmap-thread-lookup.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
openat-syscall-all-cpus.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
openat-syscall-tp-fields.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
openat-syscall.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
parse-events.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
parse-no-sample-id-all.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-hooks.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-record.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-targz-src-pkg perf tests: Fix tarpkg build test error output redirection 2016-03-24 12:26:41 -03:00
pmu.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
python-use.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
sample-parsing.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
sdt.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
stat.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
sw-clock.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
switch-tracking.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
task-exit.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
tests.h perf test: Add infrastructure to run shell based tests 2017-08-11 16:06:22 -03:00
thread-map.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
thread-mg-share.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
topology.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
unit_number__scnprintf.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
vmlinux-kallsyms.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00