Home | History | Annotate | only in /external/linux-tools-perf/perf-3.12.0/tools/perf/tests/attr
Up to higher level directory
NameDateSize
base-record03-Dec-2014522
base-stat03-Dec-2014515
README03-Dec-20143.4K
test-record-basic03-Dec-201478
test-record-branch-any03-Dec-2014138
test-record-branch-filter-any03-Dec-2014142
test-record-branch-filter-any_call03-Dec-2014148
test-record-branch-filter-any_ret03-Dec-2014147
test-record-branch-filter-hv03-Dec-2014141
test-record-branch-filter-ind_call03-Dec-2014148
test-record-branch-filter-k03-Dec-2014140
test-record-branch-filter-u03-Dec-2014140
test-record-C003-Dec-2014270
test-record-count03-Dec-2014124
test-record-data03-Dec-2014264
test-record-freq03-Dec-2014103
test-record-graph-default03-Dec-2014100
test-record-graph-dwarf03-Dec-2014231
test-record-graph-fp03-Dec-2014100
test-record-group03-Dec-2014278
test-record-group-sampling03-Dec-2014483
test-record-group103-Dec-2014281
test-record-no-delay03-Dec-2014144
test-record-no-inherit03-Dec-2014107
test-record-no-samples03-Dec-201497
test-record-period03-Dec-2014113
test-record-raw03-Dec-2014117
test-stat-basic03-Dec-201496
test-stat-C003-Dec-2014182
test-stat-default03-Dec-20141,009
test-stat-detailed-103-Dec-20141.8K
test-stat-detailed-203-Dec-20143.1K
test-stat-detailed-303-Dec-20143.6K
test-stat-group03-Dec-2014210
test-stat-group103-Dec-2014206
test-stat-no-inherit03-Dec-2014109

README

      1 The struct perf_event_attr test (attr tests) support
      2 ====================================================
      3 This testing support is embedded into perf directly and is governed
      4 by the PERF_TEST_ATTR environment variable and hook inside the
      5 sys_perf_event_open function.
      6 
      7 The general idea is to store 'struct perf_event_attr' details for
      8 each event created within single perf command. Each event details
      9 are stored into separate text file. Once perf command is finished
     10 these files are checked for values we expect for command.
     11 
     12 The attr tests consist of following parts:
     13 
     14 tests/attr.c
     15 ------------
     16 This is the sys_perf_event_open hook implementation. The hook
     17 is triggered when the PERF_TEST_ATTR environment variable is
     18 defined. It must contain name of existing directory with access
     19 and write permissions.
     20 
     21 For each sys_perf_event_open call event details are stored in
     22 separate file. Besides 'struct perf_event_attr' values we also
     23 store 'fd' and 'group_fd' values to allow checking for groups.
     24 
     25 tests/attr.py
     26 -------------
     27 This is the python script that does all the hard work. It reads
     28 the test definition, executes it and checks results.
     29 
     30 tests/attr/
     31 -----------
     32 Directory containing all attr test definitions.
     33 Following 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 dwarf -- kill                  (test-record-graph-dwarf)
     49   perf record -g 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