linux-stable/tools/perf/tests
Michael Petlan 194cb6b50f perf test: Allow multiple probes in record+script_probe_vfs_getname.sh
Sometimes when adding a kprobe by perf, it results in multiple probe
points, such as the following:

  # ./perf probe -l
    probe:vfs_getname    (on getname_flags:73@fs/namei.c with pathname)
    probe:vfs_getname_1  (on getname_flags:73@fs/namei.c with pathname)
    probe:vfs_getname_2  (on getname_flags:73@fs/namei.c with pathname)
  # cat /sys/kernel/debug/tracing/kprobe_events
  p:probe/vfs_getname _text+5501804 pathname=+0(+0(%gpr31)):string
  p:probe/vfs_getname_1 _text+5505388 pathname=+0(+0(%gpr31)):string
  p:probe/vfs_getname_2 _text+5508396 pathname=+0(+0(%gpr31)):string

In this test, we need to record all of them and expect any of them in
the perf-script output, since it's not clear which one will be used for
the desired syscall:

  # perf stat -e probe:vfs_getname\* -- touch /tmp/nic

   Performance counter stats for 'touch /tmp/nic':

                31      probe:vfs_getname_2
                 0      probe:vfs_getname_1
                 1      probe:vfs_getname
       0.001421826 seconds time elapsed

       0.001506000 seconds user
       0.000000000 seconds sys

If the test relies only on probe:vfs_getname, it might easily miss the
relevant data.

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
LPU-Reference: 20200722135845.29958-1-mpetlan@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-08-13 09:34:26 -03:00
..
attr perf test: Ensure sample_period is set libpfm4 events 2020-07-30 07:01:49 -03:00
shell perf test: Allow multiple probes in record+script_probe_vfs_getname.sh 2020-08-13 09:34:26 -03:00
.gitignore
api-io.c
attr.c
attr.py
backward-ring-buffer.c
bitmap.c
bp_account.c
bp_signal.c
bp_signal_overflow.c
bpf-script-example.c
bpf-script-test-kbuild.c
bpf-script-test-prologue.c
bpf-script-test-relocation.c
bpf.c
Build perf tests: Add parse metric test for ipc metric 2020-06-22 16:28:09 -03:00
builtin-test.c perf tests: Add parse metric test for ipc metric 2020-06-22 16:28:09 -03:00
clang.c
code-reading.c perf evlist: Fix the class prefix for 'struct evlist' strerror methods 2020-06-22 16:28:09 -03:00
cpumap.c
demangle-java-test.c perf tests: Add test for the java demangler 2020-05-28 10:03:28 -03:00
dso-data.c
dwarf-unwind.c perf test: Initialize memory in dwarf-unwind 2020-06-01 12:24:23 -03:00
event-times.c
event_update.c
evsel-roundtrip-name.c
evsel-tp-sched.c
expr.c perf metric: Add 'struct expr_id_data' to keep expr value 2020-07-17 09:09:48 -03:00
fdarray.c libperf: Add flags to fdarray fds objects 2020-07-21 09:52:51 -03:00
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c
hists_filter.c
hists_link.c
hists_output.c
is_printable_array.c
keep-tracking.c
kmod-path.c
llvm.c
llvm.h
make perf build: Add a LIBPFM4=1 build test entry 2020-05-29 16:51:38 -03:00
maps.c
mem.c
mem2node.c
mmap-basic.c
mmap-thread-lookup.c
openat-syscall-all-cpus.c perf counts: Rename perf_evsel__*counts() to evsel__*counts() 2020-05-28 10:03:24 -03:00
openat-syscall-tp-fields.c
openat-syscall.c
parse-events.c perf tools: Fix term parsing for raw syntax 2020-07-30 07:01:48 -03:00
parse-metric.c perf metric: Add metric group test 2020-07-30 07:01:50 -03:00
parse-no-sample-id-all.c
perf-hooks.c
perf-record.c perf script: Show text poke address symbol 2020-07-10 08:39:14 -03:00
perf-targz-src-pkg
pfm.c perf tools: Add optional support for libpfm4 2020-05-29 16:51:38 -03:00
pmu-events.c perf metric: Rename expr__add_id() to expr__add_val() 2020-07-17 09:09:48 -03:00
pmu.c perf parse-events: Make add PMU verbose output clearer 2020-05-28 10:03:26 -03:00
python-use.c
sample-parsing.c
sdt.c
stat.c
sw-clock.c
switch-tracking.c
task-exit.c
tests.h perf tests: Add parse metric test for ipc metric 2020-06-22 16:28:09 -03:00
thread-map.c
thread-maps-share.c
time-utils-test.c
topology.c
unit_number__scnprintf.c
vmlinux-kallsyms.c
wp.c