linux/tools/perf/tests
Wang Nan ee74701ed8 perf tests: Add test to check backward ring buffer
This test checks reading from backward ring buffer.

Test result:

  # ~/perf test 'ring buffer'
  45: Test backward reading from ring buffer                   : Ok

The test case is a while loop which calls prctl(PR_SET_NAME) multiple
times.  Each prctl should issue 2 events: one PERF_RECORD_SAMPLE, one
PERF_RECORD_COMM.

The first round creates a relative large ring buffer (256 pages). It can
afford all events. Read from it and check the count of each type of
events.

The second round creates a small ring buffer (1 page) and makes it
overwritable. Check the correctness of the buffer.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1462758471-89706-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-05-09 18:11:22 -03:00
..
attr
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
Build perf tests: Add test to check backward ring buffer 2016-05-09 18:11:22 -03:00
attr.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
attr.py
backward-ring-buffer.c perf tests: Add test to check backward ring buffer 2016-05-09 18:11:22 -03:00
bp_signal.c perf tests: Fix build on older systems where 'signal' is reserved 2016-02-15 17:33:26 -03:00
bp_signal_overflow.c
bpf-script-example.c
bpf-script-test-kbuild.c
bpf-script-test-prologue.c
bpf-script-test-relocation.c perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
bpf.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
builtin-test.c perf tests: Add test to check backward ring buffer 2016-05-09 18:11:22 -03:00
code-reading.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
cpumap.c perf cpu_map: Add cpu_map__new_event function 2015-12-17 14:38:18 -03:00
dso-data.c perf tests: Do not use sizeof on pointer type 2016-04-28 15:37:52 -03:00
dwarf-unwind.c perf tests: Forward the perf_sample in the dwarf unwind test 2016-03-23 12:03:07 -03:00
event-times.c perf tests: Add test to check for event times 2016-03-30 11:14:08 -03:00
event_update.c perf tests: Replace assignment with comparison on assert check 2016-04-25 20:24:26 -03:00
evsel-roundtrip-name.c
evsel-tp-sched.c
fdarray.c
hists_common.c perf hists: Move sort__need_collapse into struct perf_hpp_list 2016-05-05 21:03:58 -03:00
hists_common.h
hists_cumulate.c perf hists: Move sort__need_collapse into struct perf_hpp_list 2016-05-05 21:03:58 -03:00
hists_filter.c perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack 2016-04-27 10:29:07 -03:00
hists_link.c perf hists: Move sort__need_collapse into struct perf_hpp_list 2016-05-05 21:03:58 -03:00
hists_output.c perf hists: Move sort__need_collapse into struct perf_hpp_list 2016-05-05 21:03:58 -03:00
keep-tracking.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
kmod-path.c
llvm.c perf config: Bring perf_default_config to the very beginning at main() 2016-02-26 19:49:16 -03:00
llvm.h perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
make perf build: Add libcrypto feature detection 2016-02-05 09:46:45 -03:00
mmap-basic.c
mmap-thread-lookup.c
openat-syscall-all-cpus.c
openat-syscall-tp-fields.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
openat-syscall.c
parse-events.c perf tools: Enable config and setting names for legacy cache events 2016-02-19 19:12:51 -03:00
parse-no-sample-id-all.c
perf-record.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -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
python-use.c
sample-parsing.c
stat.c perf tools: Add stat round event synthesize function 2015-12-17 14:55:44 -03:00
sw-clock.c
switch-tracking.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
task-exit.c
tests.h perf tests: Add test to check backward ring buffer 2016-05-09 18:11:22 -03:00
thread-map.c perf thread_map: Add thread_map__new_event function 2015-12-17 14:38:16 -03:00
thread-mg-share.c
topology.c
vmlinux-kallsyms.c perf test: Add missing verbose output explaining the reason for failure 2016-04-19 12:39:36 -03:00