• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

READMED06-Mar-20243.8 KiB7062

base-recordD06-Mar-2024570 4241

base-record-speD06-Mar-2024510 4140

base-statD06-Mar-2024559 4241

system-wide-dummyD06-Mar-2024761 5150

test-record-C0D06-Mar-2024409 2317

test-record-basicD06-Mar-2024105 75

test-record-branch-anyD06-Mar-2024146 97

test-record-branch-filter-anyD06-Mar-2024150 97

test-record-branch-filter-any_callD06-Mar-2024156 97

test-record-branch-filter-any_retD06-Mar-2024155 97

test-record-branch-filter-hvD06-Mar-2024149 97

test-record-branch-filter-ind_callD06-Mar-2024156 97

test-record-branch-filter-kD06-Mar-2024148 97

test-record-branch-filter-uD06-Mar-2024148 97

test-record-countD06-Mar-2024151 108

test-record-dataD06-Mar-2024271 119

test-record-freqD06-Mar-2024130 86

test-record-graph-defaultD06-Mar-2024194 108

test-record-graph-default-aarch64D06-Mar-2024171 108

test-record-graph-dwarfD06-Mar-2024280 1311

test-record-graph-fpD06-Mar-2024193 108

test-record-graph-fp-aarch64D06-Mar-2024184 108

test-record-group-samplingD06-Mar-2024566 4032

test-record-group1D06-Mar-2024321 2421

test-record-group2D06-Mar-2024439 3027

test-record-no-bufferingD06-Mar-2024164 108

test-record-no-inheritD06-Mar-2024134 97

test-record-no-samplesD06-Mar-2024124 86

test-record-periodD06-Mar-2024140 97

test-record-pfm-periodD06-Mar-2024188 108

test-record-rawD06-Mar-2024125 86

test-record-spe-periodD06-Mar-2024217 1310

test-record-spe-period-termD06-Mar-2024220 1310

test-record-spe-physical-addressD06-Mar-2024291 1210

test-record-user-regs-no-sve-aarch64D06-Mar-2024311 109

test-record-user-regs-old-sve-aarch64D06-Mar-2024307 1110

test-record-user-regs-sve-aarch64D06-Mar-2024367 1513

test-stat-C0D06-Mar-2024194 119

test-stat-basicD06-Mar-2024107 86

test-stat-defaultD06-Mar-20242.7 KiB186162

test-stat-detailed-1D06-Mar-20243.6 KiB228198

test-stat-detailed-2D06-Mar-20244.9 KiB288252

test-stat-detailed-3D06-Mar-20245.4 KiB308270

test-stat-group1D06-Mar-2024240 1815

test-stat-no-inheritD06-Mar-2024120 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 -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