• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

README A D22-Aug-20254 KiB7264

base-record A D22-Aug-2025613 4241

base-record-spe A D22-Aug-2025550 4140

base-stat A D22-Aug-2025600 4241

system-wide-dummy A D22-Aug-2025911 5352

test-record-C0 A D22-Aug-2025463 2519

test-record-basic A D22-Aug-2025111 75

test-record-branch-any A D22-Aug-2025154 97

test-record-branch-filter-any A D22-Aug-2025158 97

test-record-branch-filter-any_call A D22-Aug-2025164 97

test-record-branch-filter-any_ret A D22-Aug-2025163 97

test-record-branch-filter-hv A D22-Aug-2025157 97

test-record-branch-filter-ind_call A D22-Aug-2025164 97

test-record-branch-filter-k A D22-Aug-2025156 97

test-record-branch-filter-u A D22-Aug-2025156 97

test-record-count A D22-Aug-2025160 108

test-record-data A D22-Aug-2025281 119

test-record-dummy-C0 A D22-Aug-2025873 5654

test-record-freq A D22-Aug-2025137 86

test-record-graph-default A D22-Aug-2025203 108

test-record-graph-default-aarch64 A D22-Aug-2025180 108

test-record-graph-dwarf A D22-Aug-2025292 1311

test-record-graph-fp A D22-Aug-2025202 108

test-record-graph-fp-aarch64 A D22-Aug-2025193 108

test-record-group-sampling A D22-Aug-2025647 4133

test-record-group-sampling1 A D22-Aug-2025945 5140

test-record-group-sampling2 A D22-Aug-20251 KiB6249

test-record-group1 A D22-Aug-2025344 2421

test-record-group2 A D22-Aug-2025489 3128

test-record-group3 A D22-Aug-2025501 3229

test-record-no-buffering A D22-Aug-2025173 108

test-record-no-inherit A D22-Aug-2025142 97

test-record-no-samples A D22-Aug-2025131 86

test-record-period A D22-Aug-2025148 97

test-record-pfm-period A D22-Aug-2025197 108

test-record-raw A D22-Aug-2025132 86

test-record-spe-period A D22-Aug-2025229 1310

test-record-spe-period-term A D22-Aug-2025232 1310

test-record-spe-physical-address A D22-Aug-2025302 1210

test-record-user-regs-no-sve-aarch64 A D22-Aug-2025320 109

test-record-user-regs-old-sve-aarch64 A D22-Aug-2025317 1110

test-record-user-regs-sve-aarch64 A D22-Aug-2025381 1513

test-stat-C0 A D22-Aug-2025204 119

test-stat-basic A D22-Aug-2025114 86

test-stat-default A D22-Aug-20253.5 KiB230202

test-stat-detailed-1 A D22-Aug-20254.5 KiB272238

test-stat-detailed-2 A D22-Aug-20255.9 KiB332292

test-stat-detailed-3 A D22-Aug-20256.3 KiB352310

test-stat-group1 A D22-Aug-2025257 1815

test-stat-no-inherit A D22-Aug-2025128 97

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 -e '{cycles,cache-misses}:S' kill (test-record-group-sampling1)
55  perf record -c 10000 -e '{cycles,cache-misses}:S' kill (test-record-group-sampling2)
56  perf record -D kill                           (test-record-no-delay)
57  perf record -i kill                           (test-record-no-inherit)
58  perf record -n kill                           (test-record-no-samples)
59  perf record -c 100 -P kill                    (test-record-period)
60  perf record -c 1 --pfm-events=cycles:period=2 (test-record-pfm-period)
61  perf record -R kill                           (test-record-raw)
62  perf record -c 2 -e arm_spe_0// -- kill       (test-record-spe-period)
63  perf record -e arm_spe_0/period=3/ -- kill    (test-record-spe-period-term)
64  perf record -e arm_spe_0/pa_enable=1/ -- kill (test-record-spe-physical-address)
65  perf stat -e cycles kill                      (test-stat-basic)
66  perf stat kill                                (test-stat-default)
67  perf stat -d kill                             (test-stat-detailed-1)
68  perf stat -dd kill                            (test-stat-detailed-2)
69  perf stat -ddd kill                           (test-stat-detailed-3)
70  perf stat -e '{cycles,instructions}' kill     (test-stat-group1)
71  perf stat -i -e cycles kill                   (test-stat-no-inherit)
72