NameDateSize

..15-Mar-202484

base-recordH A D21-Jan-2024572

base-record-speH A D28-Mar-2022510

base-statH A D30-Jun-2023559

READMEH A D18-Dec-20223.8 KiB

system-wide-dummyH A D05-Nov-2023859

test-record-basicH A D01-May-2019105

test-record-branch-anyH A D01-May-2019146

test-record-branch-filter-anyH A D01-May-2019150

test-record-branch-filter-any_callH A D01-May-2019156

test-record-branch-filter-any_retH A D01-May-2019155

test-record-branch-filter-hvH A D01-May-2019149

test-record-branch-filter-ind_callH A D01-May-2019156

test-record-branch-filter-kH A D01-May-2019148

test-record-branch-filter-uH A D01-May-2019148

test-record-C0H A D05-Nov-2023419

test-record-countH A D01-May-2019151

test-record-dataH A D01-May-2019271

test-record-dummy-C0H A D05-Nov-2023818

test-record-freqH A D01-May-2019130

test-record-graph-defaultH A D18-Feb-2022194

test-record-graph-default-aarch64H A D18-Feb-2022171

test-record-graph-dwarfH A D01-May-2019280

test-record-graph-fpH A D18-Feb-2022193

test-record-graph-fp-aarch64H A D18-Feb-2022184

test-record-group-samplingH A D17-Oct-2022566

test-record-group1H A D17-Oct-2022321

test-record-group2H A D17-Oct-2022439

test-record-no-bufferingH A D01-May-2019164

test-record-no-inheritH A D01-May-2019134

test-record-no-samplesH A D01-May-2019124

test-record-periodH A D01-May-2019140

test-record-pfm-periodH A D11-Aug-2020188

test-record-rawH A D01-May-2019125

test-record-spe-periodH A D28-Mar-2022217

test-record-spe-period-termH A D28-Mar-2022220

test-record-spe-physical-addressH A D30-Apr-2022291

test-record-user-regs-no-sve-aarch64H A D21-Jan-2024311

test-record-user-regs-old-sve-aarch64H A D18-Dec-2022307

test-record-user-regs-sve-aarch64H A D21-Jan-2024367

test-stat-basicH A D09-Dec-2017107

test-stat-C0H A D09-Dec-2017194

test-stat-defaultH A D30-Jun-20232.7 KiB

test-stat-detailed-1H A D30-Jun-20233.6 KiB

test-stat-detailed-2H A D30-Jun-20234.9 KiB

test-stat-detailed-3H A D30-Jun-20235.4 KiB

test-stat-group1H A D09-Dec-2017240

test-stat-no-inheritH A D09-Dec-2017120

README

1The struct perf_event_attr test (attr tests) support
2====================================================
3This testing support is embedded into perf directly and is governed
4by the PERF_TEST_ATTR environment variable and hook inside the
5sys_perf_event_open function.
6
7The general idea is to store 'struct perf_event_attr' details for
8each event created within single perf command. Each event details
9are stored into separate text file. Once perf command is finished
10these files are checked for values we expect for command.
11
12The attr tests consist of following parts:
13
14tests/attr.c
15------------
16This is the sys_perf_event_open hook implementation. The hook
17is triggered when the PERF_TEST_ATTR environment variable is
18defined. It must contain name of existing directory with access
19and write permissions.
20
21For each sys_perf_event_open call event details are stored in
22separate file. Besides 'struct perf_event_attr' values we also
23store 'fd' and 'group_fd' values to allow checking for groups.
24
25tests/attr.py
26-------------
27This is the python script that does all the hard work. It reads
28the test definition, executes it and checks results.
29
30tests/attr/
31-----------
32Directory containing all attr test definitions.
33Following tests are defined (with perf commands):
34
35  perf record kill                              (test-record-basic)
36  perf record -b kill                           (test-record-branch-any)
37  perf record -j any kill                       (test-record-branch-filter-any)
38  perf record -j any_call kill                  (test-record-branch-filter-any_call)
39  perf record -j any_ret kill                   (test-record-branch-filter-any_ret)
40  perf record -j hv kill                        (test-record-branch-filter-hv)
41  perf record -j ind_call kill                  (test-record-branch-filter-ind_call)
42  perf record -j k kill                         (test-record-branch-filter-k)
43  perf record -j u kill                         (test-record-branch-filter-u)
44  perf record -c 123 kill                       (test-record-count)
45  perf record -d kill                           (test-record-data)
46  perf record -F 100 kill                       (test-record-freq)
47  perf record -g kill                           (test-record-graph-default)
48  perf record -g kill                           (test-record-graph-default-aarch64)
49  perf record --call-graph dwarf kill		(test-record-graph-dwarf)
50  perf record --call-graph fp kill              (test-record-graph-fp)
51  perf record --call-graph fp kill              (test-record-graph-fp-aarch64)
52  perf record -e '{cycles,instructions}' kill   (test-record-group1)
53  perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)
54  perf record -D kill                           (test-record-no-delay)
55  perf record -i kill                           (test-record-no-inherit)
56  perf record -n kill                           (test-record-no-samples)
57  perf record -c 100 -P kill                    (test-record-period)
58  perf record -c 1 --pfm-events=cycles:period=2 (test-record-pfm-period)
59  perf record -R kill                           (test-record-raw)
60  perf record -c 2 -e arm_spe_0// -- kill       (test-record-spe-period)
61  perf record -e arm_spe_0/period=3/ -- kill    (test-record-spe-period-term)
62  perf record -e arm_spe_0/pa_enable=1/ -- kill (test-record-spe-physical-address)
63  perf stat -e cycles kill                      (test-stat-basic)
64  perf stat kill                                (test-stat-default)
65  perf stat -d kill                             (test-stat-detailed-1)
66  perf stat -dd kill                            (test-stat-detailed-2)
67  perf stat -ddd kill                           (test-stat-detailed-3)
68  perf stat -e '{cycles,instructions}' kill     (test-stat-group1)
69  perf stat -i -e cycles kill                   (test-stat-no-inherit)
70