<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/perf/tests/shell, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.15.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-06-19T13:40:17Z</updated>
<entry>
<title>perf tests metric-only perf stat: Fix tests 84 and 86 s390</title>
<updated>2025-06-19T13:40:17Z</updated>
<author>
<name>Thomas Richter</name>
<email>tmricht@linux.ibm.com</email>
</author>
<published>2025-04-24T13:33:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4bfb6060e29376966c0006fdf7b4aaf9ec23d4ac'/>
<id>urn:sha1:4bfb6060e29376966c0006fdf7b4aaf9ec23d4ac</id>
<content type='text'>
[ Upstream commit ccd4b5cdf00f358acae9f396d13029e7ae78522e ]

On s390x KVM and z/VM machines the CPU Measurement Facility is not
available. Events cycles and instructions do not exist.  Running above
tests on s390 KVM and z/VM guests always fail with this error:

  # ./perf test 84 86
  84: perf stat JSON output linter          : FAILED!
  86: perf stat STD output linter           : FAILED!
  #

Root cause is command:

  # perf stat -j --metric-only -e instructions,cycles -- true
  {"metric-value" : "none"}
  #

Which fails due to unsupported events and returns "none".
Do not execute this test case on s390 KVM and z/VM machines.

Output after:
  # ./perf test 84 86
  84: perf stat JSON output linter          : Ok
  86: perf stat STD output linter           : Ok
  #

Fixes: 45a86d017adf4d6c ("perf test: Add --metric-only to perf stat output tests")
Suggested-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Suggested-by: Sumanth Korikkar &lt;sumanthk@linux.ibm.com&gt;
Reviewed-by: Sumanth Korikkar &lt;sumanthk@linux.ibm.com&gt;
Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20250424133310.37452-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/timers: Rename the hrtimer_init event to hrtimer_setup</title>
<updated>2025-04-05T08:30:17Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-02-05T10:55:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=244132c4e5777fe0a4544ef23afba0d9a50e5ec5'/>
<id>urn:sha1:244132c4e5777fe0a4544ef23afba0d9a50e5ec5</id>
<content type='text'>
The function hrtimer_init() doesn't exist anymore. It was replaced by
hrtimer_setup().

Thus, rename the hrtimer_init trace event to hrtimer_setup to keep it
consistent.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/all/cba84c3d853c5258aa3a262363a6eac08e2c7afc.1738746927.git.namcao@linutronix.de
</content>
</entry>
<entry>
<title>perf bpf-filter: Fix a parsing error with comma</title>
<updated>2025-03-25T00:29:58Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2025-03-07T22:09:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=35d13f841a3d8159ef20d5e32a9ed3faa27875bc'/>
<id>urn:sha1:35d13f841a3d8159ef20d5e32a9ed3faa27875bc</id>
<content type='text'>
The previous change to support cgroup filters introduced a bug that
pathname can include commas.  It confused the lexer to treat an item and
the trailing comma as a single token.  And it resulted in a parse error:

  $ sudo perf record -e cycles:P --filter 'period &gt; 0, ip &gt; 64' -- true
  perf_bpf_filter: Error: Unexpected item: 0,
  perf_bpf_filter: syntax error, unexpected BFT_ERROR, expecting BFT_NUM

   Usage: perf record [&lt;options&gt;] [&lt;command&gt;]
      or: perf record [&lt;options&gt;] -- &lt;command&gt; [&lt;options&gt;]

          --filter &lt;filter&gt;
                            event filter

It should get "0" and "," separately.

An easiest fix would be to remove "," from the possible pathname
characters.  As it's for cgroup names, probably ok to assume it won't
have commas in the pathname.

I found that the existing BPF filtering test didn't have any complex
filter condition with commas.  Let's update the group filter test which
is supposed to test filter combinations like this.

Link: https://lore.kernel.org/r/20250307220922.434319-1-namhyung@kernel.org
Fixes: 91e88437d5156b20 ("perf bpf-filter: Support filtering on cgroups")
Reported-by: Sally Shi &lt;sshii@google.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tools: annotate asm_pure_loop.S</title>
<updated>2025-03-24T16:39:54Z</updated>
<author>
<name>Marcus Meissner</name>
<email>meissner@suse.de</email>
</author>
<published>2025-03-23T08:53:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9a352a90e88a041f4b26d359493e12a7f5ae1a6a'/>
<id>urn:sha1:9a352a90e88a041f4b26d359493e12a7f5ae1a6a</id>
<content type='text'>
Annotate so it is built with non-executable stack.

Fixes: 8b97519711c3 ("perf test: Add asm pureloop test tool")
Signed-off-by: Marcus Meissner &lt;meissner@suse.de&gt;
Reviewed-by: Leo Yan &lt;leo.yan@arm.com&gt;
Link: https://lore.kernel.org/r/20250323085410.23751-1-meissner@suse.de
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Address attr.py mypy error</title>
<updated>2025-03-24T16:38:20Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-03-11T21:36:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=21944462d5a90e1b87637a5f2fa3f5d76bbc042b'/>
<id>urn:sha1:21944462d5a90e1b87637a5f2fa3f5d76bbc042b</id>
<content type='text'>
ConfigParser existed in python2 but not in python3 causing mypy to
fail.
Whilst removing a python2 workaround remove reference to __future__.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250311213628.569562-6-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Add pipe output testing for annotate</title>
<updated>2025-03-15T01:16:33Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-03-11T21:16:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=658b34cc9f9c6a8b439fe7d0d8cac883a00bc8ec'/>
<id>urn:sha1:658b34cc9f9c6a8b439fe7d0d8cac883a00bc8ec</id>
<content type='text'>
Parameterize the basic testing to generate directly a perf.data file
or to generate/use one from pipe input or output.  To simplify the
refactor move some of the head/grep logic around. Use "-q" with grep
to make the test output cleaner.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250311211635.541090-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Fixes to variable expansion and stdout for diff test</title>
<updated>2025-03-15T01:15:13Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-03-12T00:18:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3a86d63e6fa51b2171310a1a1b60d5830f6f521b'/>
<id>urn:sha1:3a86d63e6fa51b2171310a1a1b60d5830f6f521b</id>
<content type='text'>
When make_data fails its error message needs to go to stderr rather
than stdout and the stdout value is captured in a variable.  Quote the
$err value so that it is always a valid input for test.  This error is
commonly encountered if no sample data is gathered by the test.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250312001841.1515779-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test stat_all_pmu.sh: Correctly check 'perf stat' result</title>
<updated>2025-03-14T17:41:34Z</updated>
<author>
<name>Veronika Molnarova</name>
<email>vmolnaro@redhat.com</email>
</author>
<published>2024-11-22T23:12:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=02ba09c8ab9406f30c5c63b7cfd4b300c3c2c32c'/>
<id>urn:sha1:02ba09c8ab9406f30c5c63b7cfd4b300c3c2c32c</id>
<content type='text'>
Test case "stat_all_pmu.sh" is not correctly checking 'perf stat' output
due to a poor design. Firstly, having the 'set -e' option with a trap
catching the sigexit causes the shell to exit immediately if 'perf stat' ends
with any non-zero value, which is then caught by the trap reporting an
unexpected signal. This causes events that should be parsed by the if-else
statement to be caught by the trap handler and are reported as errors:

    $ perf test -vv "perf all pmu"
    Testing i915/actual-frequency/
    Unexpected signal in main
    Error:
    Access to performance monitoring and observability operations is limited.

Secondly, the if-else branches are not exclusive as the checking if the
event is present in the output log covers also the "&lt;not supported&gt;"
events, which should be accepted, and also the "Bad name events", which
should be rejected.

Remove the "set -e" option from the test case, correctly parse the
"perf stat" output log and check its return value. Add the missing
outputs for the 'perf stat' result and also add logs messages to
report the branch that parsed the event for more info.

Fixes: 7e73ea40295620e7 ("perf test: Ignore security failures in all PMU test")
Signed-off-by: Veronika Molnarova &lt;vmolnaro@redhat.com&gt;
Tested-by: Qiao Zhao &lt;qzhao@redhat.com&gt;
Link: https://lore.kernel.org/r/20241122231233.79509-1-vmolnaro@redhat.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test stat: Additional topdown grouping tests</title>
<updated>2025-03-12T02:05:04Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-03-07T02:39:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5b562763d78a99e26054268003e3d0952e3ea89f'/>
<id>urn:sha1:5b562763d78a99e26054268003e3d0952e3ea89f</id>
<content type='text'>
Add a loop and helper function to avoid repetition, the loop uses
arrays so switch the shell to bash. Add additional topdown group tests
where a topdown event needs to be moved beyond others and the slots
event isn't first in the target group. This replicates issues that
occur on hybrid systems where the other events are for the cpu_atom
PMU. Test with both PMU and software events. Place the slots event
later in the event list.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250307023906.1135613-5-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tests: Fix data symbol test with LTO builds</title>
<updated>2025-03-07T22:07:07Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2025-02-26T23:01:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36e7748d33bf6a82e558009e03448e9321465e05'/>
<id>urn:sha1:36e7748d33bf6a82e558009e03448e9321465e05</id>
<content type='text'>
With LTO builds, although regular builds could also see this as
all the code is in one file, the datasym workload can realize the
buf1.reserved data is never accessed. The compiler moves the
variable to bss and only keeps the data1 and data2 parts as
separate variables. This causes the symbol check to fail in the
test. Make the variable volatile to disable the more aggressive
optimization. Rename the variable to make which buf1 in perf is
being referred to.

Before:

  $ perf test -vv "data symbol"
  126: Test data symbol:
  --- start ---
  test child forked, pid 299808
  perf does not have symbol 'buf1'
  perf is missing symbols - skipping test
  ---- end(-2) ----
  126: Test data symbol                                                : Skip
  $ nm perf|grep buf1
  0000000000a5fa40 b buf1.0
  0000000000a5fa48 b buf1.1

After:

  $ nm perf|grep buf1
  0000000000a53a00 d buf1
  $ perf test -vv "data symbol"126: Test data symbol:
  --- start ---
  test child forked, pid 302166
   a53a00-a53a39 l buf1
  perf does have symbol 'buf1'
  Recording workload...
  Waiting for "perf record has started" message
  OK
  Cleaning up files...
  ---- end(0) ----
  126: Test data symbol                                                : Ok

Fixes: 3dfc01fe9d12 ("perf test: Add 'datasym' test workload")
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250226230109.314580-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
</feed>
