1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
perf-test(1)
============
NAME
----
perf-test - Runs sanity tests.
SYNOPSIS
--------
[verse]
'perf test [<options>] [{list|requisites} [<test-name-fragment>]|[<test-name-fragments>|<test-numbers>]]'
DESCRIPTION
-----------
This command does assorted sanity tests, initially through linked routines but
also will look for a directory with more tests in the form of scripts.
To get a list of available tests use 'perf test list', specifying a test name
fragment will show all tests that have it.
To get a list of what the tests need, i.e. of their requisites (see below), use
'perf test requisites', that takes the same test name fragments and numbers as
'list'.
To run just specific tests, inform test name fragments or the numbers obtained
from 'perf test list'.
REQUISITES
----------
Shell tests run perf, that maps ring buffers, so they are taken to need room
in the per user budget set in kernel.perf_event_mlock_kb, shared by the tests
running at the same time, that take turns using it. Tests state what they
need, or waive, in a comma separated list in the parens ending their
description line, e.g.:
# perf stat tests (no_mlock)
Each requisite is named in that list, "mlock" being room in the budget set in
kernel.perf_event_mlock_kb, and takes a "no_" prefix to waive it: "(mlock)"
states the default, "(no_mlock)" waives it, for tests that don't map ring
buffers. Leaving a requisite out states nothing about it, so what happens
then is up to each kind of test: shell ones run perf, that maps ring buffers,
so they are taken to need room in the budget unless they waive it, while C
suites say which ones map, see DEFINE_SUITE_NEEDS_MLOCK() in tests.h.
"exclusive" is a catch-all: the test can't run alongside any other one, so
it runs alone, in sequence, and implies every other requisite; it can't be
waived. More requisites are to come, each stating what a test needs, till
the catch-all isn't needed anymore.
Use 'perf test requisites' to list what each test needs. That listing states
the needs, not the requisites form used in the scripts: a test listed as
needing "mlock" is one whose script doesn't say "(no_mlock)".
OPTIONS
-------
-s::
--skip::
Tests to skip (comma separated numeric list).
-v::
-vv::
-vvv::
--verbose::
With a single '-v', verbose level 1, only failing test output
is displayed. With '-vv' and higher all test output is shown.
-S::
--sequential::
Run all tests one after the other. By default the tests asking to be
"exclusive" (see REQUISITES) run sequentially, but other tests run in
parallel to speed execution.
-r::
--runs-per-test::
Run each test the given number of times, by default once. This
option can be useful to determine if a test is flaky.
-F::
--dont-fork::
Do not fork child for each test, run all tests within single process, this
sets sequential mode.
--dso::
Specify a DSO for the "Symbols" test.
-w::
--workload=::
Run a built-in workload, to list them use '--list-workloads', current
ones include: noploop, thloop, leafloop, sqrtloop, brstack, datasym,
context_switch_loop, deterministic, named_threads, landlock and
callchain.
Used with the shell script regression tests.
Some accept an extra parameter:
seconds: leafloop, noploop, sqrtloop, thloop
nrloops: brstack, context_switch_loop
'named_threads' accepts the number of threads and the number of loops to
do in each thread.
The datasym, landlock, deterministic and callchain workloads don't accept
any.
--list-workloads::
List the available workloads to use with -w/--workload.
--record-ctl=fifo:ctl-fifo[,ack-fifo]::
This option is used to communicate with a perf record session in order
to control the recording scope to only the workload and avoid recording
setup and teardown code. When specifying this option, the same FIFO path
must be specified in the record session via:
perf record -D -1 --control=fifo:ctl-fifo[,ack-fifo] ...
Perf test sends 'enable' and 'disable' commands through ctl-fifo to
control event recording. If 'ack-fifo' is provided, the workload runner
waits for an 'ack' response after each command.
|