<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/tests/shell/record.sh, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-02-04T19:36:14Z</updated>
<entry>
<title>perf test: Use cycles event in perf record test for leader_sampling</title>
<updated>2025-02-04T19:36:14Z</updated>
<author>
<name>Thomas Richter</name>
</author>
<published>2025-01-31T10:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90d97674d4ad0166c038ca9a672c6e79e95d6d3c'/>
<id>urn:sha1:90d97674d4ad0166c038ca9a672c6e79e95d6d3c</id>
<content type='text'>
On s390 the event instructions can not be used for recording.
This event is only supported by perf stat.

Change the event from instructions to cycles in subtest
test_leader_sampling.

Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Suggested-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250131102756.4185235-3-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Fix perf record test for precise_max</title>
<updated>2025-02-04T19:34:25Z</updated>
<author>
<name>Thomas Richter</name>
</author>
<published>2025-01-31T10:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=859199431d768091ff60351319a1c2886c18b592'/>
<id>urn:sha1:859199431d768091ff60351319a1c2886c18b592</id>
<content type='text'>
On s390 the event instructions can not be used for recording.
This event is only supported by perf stat.

Test that each event cycles and instructions supports sampling.
If the event can not be sampled, skip it.

Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Suggested-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20250131102756.4185235-2-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tests: Make leader sampling test work without branch event</title>
<updated>2024-11-16T19:30:39Z</updated>
<author>
<name>James Clark</name>
</author>
<published>2024-11-15T16:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=180fd0c1eac7cd8c5aa9a9f8b54088a61d9e05db'/>
<id>urn:sha1:180fd0c1eac7cd8c5aa9a9f8b54088a61d9e05db</id>
<content type='text'>
Arm a57 only has speculative branch events so this test fails there. The
test doesn't depend on branch instructions so change it to instructions
which is pretty much guaranteed to be everywhere. The
test_branch_counter() test above already tests for the existence of the
branches event and skips if its not present.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Veronika Molnarova &lt;vmolnaro@redhat.com&gt;
Link: https://lore.kernel.org/r/20241115161600.228994-1-james.clark@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Tag parallel failing shell tests with "(exclusive)"</title>
<updated>2024-10-28T16:32:58Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2024-10-25T19:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2532be3d219d8819e59dc52a5ead4696b8354a82'/>
<id>urn:sha1:2532be3d219d8819e59dc52a5ead4696b8354a82</id>
<content type='text'>
Some shell tests compete for resources and so can't run with other
tests, tag such tests.  The "(exclusive)" stems from shared/exclusive
to describe how the tests run as if holding a lock.

For ARM/coresight tests:
Suggested-by: James Clark &lt;james.clark@linaro.org&gt;

Additional failing tests:
Suggested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;

Tested-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Cc: Howard Chu &lt;howardchu95@gmail.com&gt;
Cc: Weilin Wang &lt;weilin.wang@intel.com&gt;
Cc: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Athira Jajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Cc: Michael Petlan &lt;mpetlan@redhat.com&gt;
Cc: Veronika Molnarova &lt;vmolnaro@redhat.com&gt;
Link: https://lore.kernel.org/r/20241025192109.132482-6-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Add precise_max subtest to the perf record shell test</title>
<updated>2024-10-22T16:55:08Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2024-10-16T06:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36fae9f93e5f00eb3e410784ce99a4d7503aa12e'/>
<id>urn:sha1:36fae9f93e5f00eb3e410784ce99a4d7503aa12e</id>
<content type='text'>
It's a very simply test just to run with cycles:P and instructions:P
events.

Cc: Ravi Bangoria &lt;ravi.bangoria@amd.com&gt;
Cc: James Clark &lt;james.clark@arm.com&gt;
Cc: Atish Patra &lt;atishp@atishpatra.org&gt;
Cc: Mingwei Zhang &lt;mizhang@google.com&gt;
Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Link: https://lore.kernel.org/r/20241016062359.264929-10-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Speed up some tests using perf list</title>
<updated>2024-10-17T16:55:58Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2024-10-16T06:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3662f82f16814636aaa152cdbd8db4b96984abea'/>
<id>urn:sha1:3662f82f16814636aaa152cdbd8db4b96984abea</id>
<content type='text'>
On my system, perf list is very slow to print the whole events.  I think
there's a performance issue in SDT and uprobes event listing.  I noticed
this issue while running perf test on x86 but it takes long to check
some CoreSight event which should be skipped quickly.

Anyway, some test uses perf list to check whether the required event is
available before running the test.  The perf list command can take an
argument to specify event class or (glob) pattern.  But glob pattern is
only to suppress output for unmatched ones after checking all events.

In this case, specifying event class is better to reduce the number of
events it checks and to avoid buggy subsystems entirely.

No functional changes intended.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: German Gomez &lt;german.gomez@arm.com&gt;
Cc: Carsten Haitzler &lt;carsten.haitzler@arm.com&gt;
Cc: Leo Yan &lt;leo.yan@arm.com&gt;
Link: https://lore.kernel.org/r/20241016065654.269994-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tests: Add topdown events counting and sampling tests</title>
<updated>2024-09-30T22:23:44Z</updated>
<author>
<name>Dapeng Mi</name>
</author>
<published>2024-09-13T08:47:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0836aa60083a478cbc788f19fd2f389574a921bf'/>
<id>urn:sha1:0836aa60083a478cbc788f19fd2f389574a921bf</id>
<content type='text'>
Add counting and leader sampling tests to verify topdown events including
raw format can be reordered correctly.

Reviewed-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Signed-off-by: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Yongwei Ma &lt;yongwei.ma@intel.com&gt;
Link: https://lore.kernel.org/r/20240913084712.13861-6-dapeng1.mi@linux.intel.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tests: Add leader sampling test in record tests</title>
<updated>2024-09-30T22:23:44Z</updated>
<author>
<name>Dapeng Mi</name>
</author>
<published>2024-09-13T08:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=387892723ad4044ff139ad7433e4dd24f7cfe303'/>
<id>urn:sha1:387892723ad4044ff139ad7433e4dd24f7cfe303</id>
<content type='text'>
Add leader sampling test to validate event counts are captured into
record and the count value is consistent.

Suggested-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Reviewed-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Signed-off-by: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Yongwei Ma &lt;yongwei.ma@intel.com&gt;
Link: https://lore.kernel.org/r/20240913084712.13861-5-dapeng1.mi@linux.intel.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Add cgroup sampling test</title>
<updated>2024-08-19T19:32:32Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2024-08-18T21:29:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5cc698bad72667cf80097dece6b91efbb4a1a0a7'/>
<id>urn:sha1:5cc698bad72667cf80097dece6b91efbb4a1a0a7</id>
<content type='text'>
Add it to the record.sh shell test to verify if it tracks cgroup
information correctly.  It records with --all-cgroups option can check
if it has PERF_RECORD_CGROUP and the names are not "unknown".

  $ sudo ./perf test -vv 95
   95: perf record tests:
  --- start ---
  test child forked, pid 2871922
   169c90-169cd0 g test_loop
  perf does have symbol 'test_loop'
  Basic --per-thread mode test
  Basic --per-thread mode test [Success]
  Register capture test
  Register capture test [Success]
  Basic --system-wide mode test
  Basic --system-wide mode test [Success]
  Basic target workload test
  Basic target workload test [Success]
  Branch counter test
  branch counter feature not supported on all core PMUs (/sys/bus/event_source/devices/cpu) [Skipped]
  Cgroup sampling test
  Cgroup sampling test [Success]
  ---- end(0) ----
   95: perf record tests                                               : Ok

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20240818212948.2873156-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test record.sh: Raise limit of open file descriptors</title>
<updated>2024-08-14T15:55:48Z</updated>
<author>
<name>Veronika Molnarova</name>
</author>
<published>2024-04-29T08:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27ac597c0e2f596f53963db4a2cf53cd84657cda'/>
<id>urn:sha1:27ac597c0e2f596f53963db4a2cf53cd84657cda</id>
<content type='text'>
Subtest for system-wide record with '--threads=cpu' option fails due
to a limit of open file descriptors on systems with 128 or more CPUs
as the default limit is set to 1024.

The number of open file descriptors should be slightly above
nmb_events*nmb_cpus + nmb_cpus(for perf.data.n) + 4*nmb_cpus(for pipes),
which equals 8*nmb_cpus. Therefore, temporarily raise the limit to
16*nmb_cpus for the test.

Committer notes:

Instead of disabling ShellCheck warnings all the uses of 'uname -n',
i.e. those:

  In tests/shell/record.sh line 35:
  default_fd_limit=$(ulimit -Sn)
                            ^-^ SC3045 (warning): In POSIX sh, ulimit -S is undefined.

We can just switch from using '/bin/sh' to '/bin/bash' for this test, as
bash _has_ 'ulimit -n', so ShellCheck will not emit that warning.

There are dozens of 'perf test' shell tests that do just that,
'/bin/bash' is a reasonable expectation for those tests.

Signed-off-by: Veronika Molnarova &lt;vmolnaro@redhat.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Cc: Michael Petlan &lt;mpetlan@redhat.com&gt;
Cc: Radostin Stoyanov &lt;rstoyano@redhat.com&gt;
Link: https://lore.kernel.org/linux-perf-users/20240429085721.10122-1-vmolnaro@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
