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

..--

READMED25-Jun-20163.3 KiB6557

base-recordD25-Jun-2016558 4241

base-statD25-Jun-2016551 4241

test-record-C0D25-Jun-2016270 1410

test-record-basicD25-Jun-201678 64

test-record-branch-anyD25-Jun-2016138 97

test-record-branch-filter-anyD25-Jun-2016142 97

test-record-branch-filter-any_callD25-Jun-2016148 97

test-record-branch-filter-any_retD25-Jun-2016147 97

test-record-branch-filter-hvD25-Jun-2016141 97

test-record-branch-filter-ind_callD25-Jun-2016148 97

test-record-branch-filter-kD25-Jun-2016140 97

test-record-branch-filter-uD25-Jun-2016140 97

test-record-countD25-Jun-2016124 97

test-record-dataD25-Jun-2016264 129

test-record-freqD25-Jun-2016103 75

test-record-graph-defaultD25-Jun-201697 75

test-record-graph-dwarfD25-Jun-2016241 119

test-record-graph-fpD25-Jun-2016110 75

test-record-groupD25-Jun-2016278 2118

test-record-group-samplingD25-Jun-2016483 3728

test-record-group1D25-Jun-2016281 2219

test-record-no-delayD25-Jun-2016144 108

test-record-no-inheritD25-Jun-2016107 86

test-record-no-samplesD25-Jun-201697 75

test-record-periodD25-Jun-2016113 86

test-record-rawD25-Jun-2016117 86

test-stat-C0D25-Jun-2016182 108

test-stat-basicD25-Jun-201696 75

test-stat-defaultD25-Jun-20161,009 6554

test-stat-detailed-1D25-Jun-20161.8 KiB10286

test-stat-detailed-2D25-Jun-20163.1 KiB156134

test-stat-detailed-3D25-Jun-20163.6 KiB174150

test-stat-groupD25-Jun-2016210 1613

test-stat-group1D25-Jun-2016206 1613

test-stat-no-inheritD25-Jun-2016109 86

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 --call-graph dwarf kill		(test-record-graph-dwarf)
49  perf record --call-graph fp kill              (test-record-graph-fp)
50  perf record --group -e cycles,instructions kill (test-record-group)
51  perf record -e '{cycles,instructions}' kill   (test-record-group1)
52  perf record -D kill                           (test-record-no-delay)
53  perf record -i kill                           (test-record-no-inherit)
54  perf record -n kill                           (test-record-no-samples)
55  perf record -c 100 -P kill                    (test-record-period)
56  perf record -R kill                           (test-record-raw)
57  perf stat -e cycles kill                      (test-stat-basic)
58  perf stat kill                                (test-stat-default)
59  perf stat -d kill                             (test-stat-detailed-1)
60  perf stat -dd kill                            (test-stat-detailed-2)
61  perf stat -ddd kill                           (test-stat-detailed-3)
62  perf stat --group -e cycles,instructions kill (test-stat-group)
63  perf stat -e '{cycles,instructions}' kill     (test-stat-group1)
64  perf stat -i -e cycles kill                   (test-stat-no-inherit)
65