<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/perf/Documentation/perf-test.txt, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-01-16T19:01:03Z</updated>
<entry>
<title>perf test: Improve verbose documentation</title>
<updated>2025-01-16T19:01:03Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-01-10T04:57:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e38f2814f02ed2768a4f293088375528121afed'/>
<id>urn:sha1:4e38f2814f02ed2768a4f293088375528121afed</id>
<content type='text'>
Add a little more detail on the output expectations for each verbose
level.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20250110045736.598281-6-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Add a runs-per-test flag</title>
<updated>2025-01-16T19:01:03Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-01-10T04:57:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1c0d9816e9cb9548c74e04971300ec9cecf2c0d7'/>
<id>urn:sha1:1c0d9816e9cb9548c74e04971300ec9cecf2c0d7</id>
<content type='text'>
To detect flakes it is useful to run tests more than once. Add a
runs-per-test flag that will run each test multiple times. Example
output:

```
$ perf test -r 3 lbr -v
122: perf record LBR tests                                           : Ok
122: perf record LBR tests                                           : Ok
122: perf record LBR tests                                           : Ok
```

Update the documentation for the runs-per-test option.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20250110045736.598281-5-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Fix parallel/sequential option documentation</title>
<updated>2025-01-16T19:01:03Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-01-10T04:57:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4dd8bc4bf58e973eea3fdf5e2013011d83fba6c4'/>
<id>urn:sha1:4dd8bc4bf58e973eea3fdf5e2013011d83fba6c4</id>
<content type='text'>
The parallel option was removed in commit 94d1a913bdc4 ("perf test:
Make parallel testing the default"). Update the sequential
documentation to reflect it isn't the default except for "exclusive"
tests.

Fixes: 94d1a913bdc4 ("perf test: Make parallel testing the default")
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20250110045736.598281-4-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Document the -w/--workload option</title>
<updated>2024-10-22T04:10:50Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2024-10-20T02:18:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=915a377627f7ad91983377f68c3096b3594961a4'/>
<id>urn:sha1:915a377627f7ad91983377f68c3096b3594961a4</id>
<content type='text'>
Wasn't documented so far, mention that it is mostly used in the shell
regression tests.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Clark Williams &lt;williams@redhat.com&gt;
Link: https://lore.kernel.org/r/20241020021842.1752770-4-acme@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Reintroduce -p/--parallel and make -S/--sequential the default</title>
<updated>2024-04-27T01:28:08Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2024-04-26T20:26:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8c618b58c89ce4c24c0030bd42340938bdf8e29c'/>
<id>urn:sha1:8c618b58c89ce4c24c0030bd42340938bdf8e29c</id>
<content type='text'>
We can't default to doing parallel tests as there are tests that compete
for the same resources and thus clash, for instance tests that put in
place 'perf probe' probes, that clean the probes without regard to other
tests needs, ARM64 coresight tests, Intel PT ones, etc.

So reintroduce --p/--parallel and make -S/--sequential the default.

We need to come up with infrastructure that state which tests can't run
in parallel because they need exclusive access to some resource,
something as simple as "probes" that would then avoid 'perf probe' tests
from running while other such test is running, or make the tests more
resilient, till then we can't use parallel mode as default.

While at it, document all these options in the 'perf test' man page.

Reported-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reported-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Reported-by: James Clark &lt;james.clark@arm.com&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/lkml/Ziwm18BqIn_vc1vn@x1
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Add Symbols test</title>
<updated>2023-01-22T21:09:56Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2023-01-20T12:34:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1b69346e7a0bd18a9c3b00bdd6219d4d8ad73466'/>
<id>urn:sha1:1b69346e7a0bd18a9c3b00bdd6219d4d8ad73466</id>
<content type='text'>
Add a test to check function symbols do not overlap and are not zero
length.

The main motivation for the test is to make it easier to review changes
to PLT symbol synthesis i.e. changes to dso__synthesize_plt_symbols().

By default the test uses the perf executable as a test DSO, but a
specific DSO can be specified via a new perf test option "--dso".

The test is useful in the following ways:

 - Any DSO can be tested, even ones that do not run on the current
 architecture. For example, using cross-compiled DSOs to see how
 well perf handles different architectures.

 - With verbose &gt; 1 (e.g. -vv), all the symbols are printed, which
 makes it easier to see issues.

 - perf removes duplicate symbols and expands zero-length symbols
 to reach the next symbol, however that is done before adding
 synthesized symbols, so the test is checking those also.

Example:

  $ perf test -v Symbols
   74: Symbols                                                         :
  --- start ---
  test child forked, pid 154918
  Testing /home/user/bin/perf
  Overlapping symbols:
   7d000-7f3a0 g _init
   7d030-7d040 g __printf_chk@plt
  test child finished with -1
  ---- end ----
  Symbols: FAILED!

Note the test fails because perf expands the _init symbol over the PLT
because there are no PLT symbols at that point, but then
dso__synthesize_plt_symbols() creates them.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Acked-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/r/20230120123456.12449-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Add -F/--dont-fork option</title>
<updated>2016-06-30T21:27:45Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2016-06-28T11:29:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7fa9b8fba0b55edd1ff5b8ea696ec75fc5f6194c'/>
<id>urn:sha1:7fa9b8fba0b55edd1ff5b8ea696ec75fc5f6194c</id>
<content type='text'>
Adding -F/--dont-fork option to bypass forking for each test. It's
useful for debugging test.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Tested-by: Nilay Vaish &lt;nilayvaish@gmail.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1467113345-12669-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf Documentation: Fix typos in perf/Documentation</title>
<updated>2014-10-15T20:39:02Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2014-09-09T15:18:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=96355f2cfb61bb057df9bc0712cd7323dba28080'/>
<id>urn:sha1:96355f2cfb61bb057df9bc0712cd7323dba28080</id>
<content type='text'>
This patch fix spelling typos found in tool/perf/Documentation.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: http://lkml.kernel.org/r/1410275930-17207-1-git-send-email-standby24x7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Allow skipping tests</title>
<updated>2013-01-24T19:40:53Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2013-01-24T19:22:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2ae828786c65ab8f587647bd0f22f8fe00f1f238'/>
<id>urn:sha1:2ae828786c65ab8f587647bd0f22f8fe00f1f238</id>
<content type='text'>
Sometimes a test is problematic for some reason and one wants to skip it,
for instance:

[root@sandy ~]# perf test
   1: vmlinux symtab matches kallsyms                        : Ok
   2: detect open syscall event                              : Ok
   3: detect open syscall event on all cpus                  : Ok
   4: read samples using the mmap interface                  : Ok
   5: parse events tests                                     :  Warning: bad op token {
    Warning: bad op token {
    Warning: bad op token {
    Warning: bad op token {
    Warning: bad op token {
    Warning: function is_writable_pte not defined
  Segmentation fault (core dumped)

So now we can use -s/--skip while the problematic tests are being fixed,
allowing us to test all the other entries:

  [root@sandy ~]# perf test -s 5
   1: vmlinux symtab matches kallsyms                        : Ok
   2: detect open syscall event                              : Ok
   3: detect open syscall event on all cpus                  : Ok
   4: read samples using the mmap interface                  : Ok
   5: parse events tests                                     : Skip (user override)
   6: x86 rdpmc test                                         : Ok
   7: Validate PERF_RECORD_* events &amp; perf_sample fields     : Ok
   8: Test perf pmu format parsing                           : Ok
   9: Test dso data interface                                : Ok
  10: roundtrip evsel-&gt;name check                            : Ok
  11: Check parsing of sched tracepoints fields              : Ok
  12: Generate and check syscalls:sys_enter_open event fields: Ok
  13: struct perf_event_attr setup                           : Ok
  14: Test matching and linking mutliple hists               : Ok
  15: Try 'use perf' in python, checking link problems       : Ok
  [root@sandy ~]#

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-klzd8p57jzdryafqkmlppcb1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Allow running just a subset of the available tests</title>
<updated>2011-11-29T16:04:35Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2011-11-29T14:52:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e60770a01bd889707faaaeb794f1e278e7160458'/>
<id>urn:sha1:e60770a01bd889707faaaeb794f1e278e7160458</id>
<content type='text'>
To obtain a list of available tests:

[root@emilia linux]# perf test list
 1: vmlinux symtab matches kallsyms
 2: detect open syscall event
 3: detect open syscall event on all cpus
 4: read samples using the mmap interface
 5: parse events tests
[root@emilia linux]#

To list just a subset:

[root@emilia linux]# perf test list syscall
 2: detect open syscall event
 3: detect open syscall event on all cpus
[root@emilia linux]#

To run a subset:

[root@emilia linux]# perf test detect
 2: detect open syscall event: Ok
 3: detect open syscall event on all cpus: Ok
[root@emilia linux]#

Specific tests can be chosen by number:

[root@emilia linux]# perf test 1 3 parse
 1: vmlinux symtab matches kallsyms: Ok
 3: detect open syscall event on all cpus: Ok
 5: parse events tests: Ok
[root@emilia linux]#

Now to write more tests!

Suggested-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-nqec2145qfxdgimux28aw7v8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
