<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/tools/perf/tests, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-08T21:13:52+00:00</updated>
<entry>
<title>perf test: Avoid call to missing cleanup function</title>
<updated>2026-09-08T21:13:52+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-04T19:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4bbcb0fb9b866d05a2dd2db8bccd78be9d0476a9'/>
<id>urn:sha1:4bbcb0fb9b866d05a2dd2db8bccd78be9d0476a9</id>
<content type='text'>
Cleanup function was removed by writing to /dev/null rather than
temporary files. The exit path still had a call.

Fixes: 44f6b44027910eb9 ("perf test: Fix hybrid testing of event fallback test")
Reviewed-by: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test waiting.sh: Replace timestamp polling with sleep</title>
<updated>2026-09-08T21:06:01+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2026-09-08T15:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee32ee73cc78a5068c571da2a71dd5f34b818058'/>
<id>urn:sha1:ee32ee73cc78a5068c571da2a71dd5f34b818058</id>
<content type='text'>
The waiting helpers implement timeouts using:

  date +%s%1N

This relies on GNU coreutils date truncating %N to the specified width,
so %1N yields tenths of a second.

Rust coreutils (uutils) interprets the width differently and does not
truncate the nanoseconds field.  Consequently "date +%1N" returns all
nine nanosecond digits, causing the elapsed-time calculation to be done
in nanoseconds while timeout values remain in tenths of a second.

As a result, timeout comparisons succeed immediately and the waiting
helpers time out on their first iteration.  This causes
test_intel_pt.sh to fail on systems using uutils "date".

Avoid implementation-specific date formatting entirely.  Instead, wait
for 100 ms on each iteration and count the timeout down.  Besides fixing
the portability issue, this removes the busy-waiting behaviour in
wait_for_perf_to_start(), which could otherwise consume CPU while
waiting for perf record to start.

Since the timeout is now based on repeated sleeps, it is only
approximate.  Update the comments accordingly.  Also make is_running()
wait for exactly the documented number of tenths by changing its timeout
test from -gt to the new logic, and quote tm_out in the modified code.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: perf stat tests fails on s390</title>
<updated>2026-09-08T20:54:53+00:00</updated>
<author>
<name>Thomas Richter</name>
<email>tmricht@linux.ibm.com</email>
</author>
<published>2026-09-03T07:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=454e049a3f6528a04f96afb4cbef1fcbb49c2d0f'/>
<id>urn:sha1:454e049a3f6528a04f96afb4cbef1fcbb49c2d0f</id>
<content type='text'>
The test case 'perf stat tests' fails on s390 z/VM machines. The
root cause is the unsupported CPU measurement facility on z/VM.
Therefore the events cycles and instructions do not exist and
are unsupported. This cause the subtest
  Hide zero events stat test
to fail.

Output before:
 # perf test 116
 116: perf stat tests  : FAILED!

 === Test Summary ===
 Passed main tests : 0
 Passed subtests   : 0
 Skipped tests     : 0
 Failed tests      : 1
 List of failed tests:
  116: perf stat tests
 #

Output after:
 # ./perf test 116
 116: perf stat tests  : Ok

 === Test Summary ===
 Passed main tests : 1
 Passed subtests   : 0
 Skipped tests     : 0
 Failed tests      : 0
 #

Fixes: 64724095a33fbee8 ("perf stat: Add --hide-zero-events option to suppress zero-count events")
Reviewed-by: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf evsel: Validate RAW sample before byte swapping</title>
<updated>2026-09-05T00:08:43+00:00</updated>
<author>
<name>Mark Amirkan</name>
<email>markdamirkan@gmail.com</email>
</author>
<published>2026-09-03T11:04:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=02f6847e1822714a4201b87e42f92b0d43e8549d'/>
<id>urn:sha1:02f6847e1822714a4201b87e42f92b0d43e8549d</id>
<content type='text'>
For an opposite-endian RAW sample, __evsel__parse_sample() passes the
input-controlled size to mem_bswap_64() before checking whether the
payload fits in the event. A truncated record can therefore make the helper
read and write past the event boundary.

A crafted perf.data file makes perf report crash with SIGSEGV. ASan
reports the out-of-bounds access. A regression test puts backed data past
the declared end and shows that it is changed before the parser returns
-EFAULT.

Move the bounds checks before mem_bswap_64(). Check the rounded length too,
because the helper accesses complete 64-bit words. Complete records are
handled as before.

Fixes: f9d8adb345d7adbb ("perf evsel: Fix swap for samples with raw data")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: Symbolic
Signed-off-by: Mark Amirkan &lt;markdamirkan@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf evsel: Validate branch stack before byte swapping</title>
<updated>2026-09-05T00:08:16+00:00</updated>
<author>
<name>Mark Amirkan</name>
<email>markdamirkan@gmail.com</email>
</author>
<published>2026-09-03T11:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2148e094671b0f6a44f033787b7da4ed14e96c27'/>
<id>urn:sha1:2148e094671b0f6a44f033787b7da4ed14e96c27</id>
<content type='text'>
When perf reads an opposite-endian branch stack, __evsel__parse_sample()
swaps each entry before checking whether all entries fit in the event. A
truncated sample can therefore make the swap loop read and write past the
event boundary.

A truncated perf.data file makes perf report crash with SIGSEGV. ASan
reports an out-of-bounds read. A regression test puts an entry just past
the declared end and shows that its flags are changed before the parser
returns -EFAULT.

Move the bounds check before the byte-swap loop. Valid samples are handled
as before.

Fixes: 63c12ae2f246dcdc ("perf evsel: Add bitfield_swap() to handle branch_stack endian issue")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: Symbolic
Signed-off-by: Mark Amirkan &lt;markdamirkan@gmail.com&gt;
Cc: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add test for weight annotation</title>
<updated>2026-09-04T21:21:00+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2026-08-30T19:34:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=64de6b64b62115258b1368109433514605fba2a5'/>
<id>urn:sha1:64de6b64b62115258b1368109433514605fba2a5</id>
<content type='text'>
Add a test case to check if --stdio weight annotation works

Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Assisted-by: omp:GPT-5.6-Luna
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests: Add shell test for kernel symbol beautifier</title>
<updated>2026-09-04T21:14:52+00:00</updated>
<author>
<name>Aaron Tomlin</name>
<email>atomlin@atomlin.com</email>
</author>
<published>2026-08-24T13:31:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=35770d96fc707be3989ab7c2d9650759d8475c17'/>
<id>urn:sha1:35770d96fc707be3989ab7c2d9650759d8475c17</id>
<content type='text'>
Add a dedicated shell test script, trace_ksym_beautifier.sh, to verify
that 'perf trace' properly symbolises kernel virtual addresses (e.g.
call_site in kmem:kmalloc) and function pointer fields (e.g. function in
timer:hrtimer_start) using the kernel symbol beautifier (SCA_KSYM).

Committer testing:

  root@number:~# perf test "kernel sym"
  145: perf trace kernel symbol beautifier tests                                                                 : Ok

  === Test Summary ===
  Passed main tests : 1
  Passed subtests   : 0
  Skipped tests     : 0
  Failed tests      : 0
  root@number:~# perf test -vv "kernel sym"
  145: perf trace kernel symbol beautifier tests:
  ---- start ----
  test child forked, pid 920749
  Testing perf trace kernel symbol beautifier (call_site)
  Testing perf trace kernel symbol beautifier (function pointer)
  ---- end(0) ----
  145: perf trace kernel symbol beautifier tests                                                                 : Ok

  === Test Summary ===
  Passed main tests : 1
  Passed subtests   : 0
  Skipped tests     : 0
  Failed tests      : 0
  root@number:~# perf test -vvv "kernel sym"
  145: perf trace kernel symbol beautifier tests:
  ---- start ----
  test child forked, pid 920784
  Testing perf trace kernel symbol beautifier (call_site)
  Testing perf trace kernel symbol beautifier (function pointer)
  ---- end(0) ----
  145: perf trace kernel symbol beautifier tests                                                                 : Ok

  === Test Summary ===
  Passed main tests : 1
  Passed subtests   : 0
  Skipped tests     : 0
  Failed tests      : 0
  root@number:~#

Signed-off-by: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Tested-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test sample-parsing: Validate PERF_FORMAT_GROUP values without LOST</title>
<updated>2026-08-15T13:37:18+00:00</updated>
<author>
<name>PVS Narasimha Rao</name>
<email>venkatasuryapala@gmail.com</email>
</author>
<published>2026-08-10T06:19:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6ae6fb96ccd48032b00a38d5f8e0e0a2cce4972b'/>
<id>urn:sha1:6ae6fb96ccd48032b00a38d5f8e0e0a2cce4972b</id>
<content type='text'>
The sample parsing test only validates grouped read values when
PERF_FORMAT_LOST is present.

For PERF_FORMAT_GROUP without PERF_FORMAT_LOST, the contents of
read.group.values[] are not validated, allowing corruption of the parsed
value and id fields to go undetected.

The values are also handed to the synthesis as a plain array of struct
sample_read_value, which always has a 24-byte stride, while
read.group.values is expected to be packed according to read_format --
evsel__parse_sample() points it into the event data.  Without
PERF_FORMAT_LOST the stride is 16, so both the synthesis and the
comparison walk overlapping bytes and the test passes regardless of the
contents.

Validate value and id for grouped reads and continue to validate lost
when PERF_FORMAT_LOST is present, walking the entries with
next_sample_read_value().  Also build the input packed using
sample_read_value_size() so the compared fields are the real ones.

Verified with a deliberate stride bug in copy_read_group_values(): the
test still passes without this change and fails at read_format 0xc with
it applied.

Signed-off-by: PVS Narasimha Rao &lt;venkatasuryapala@gmail.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test: Fix skiplist leak in cmd_test</title>
<updated>2026-08-10T04:58:11+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-08-09T07:14:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=44e82c4d2ff37f073946b594840fd549ab6b9fb8'/>
<id>urn:sha1:44e82c4d2ff37f073946b594840fd549ab6b9fb8</id>
<content type='text'>
Fix a memory leak in cmd_test() where skiplist was not freed on
exit paths.

Assisted-by: Antigravity:gemini-3.1-pro
Fixes: 2ae828786c65 ("perf test: Allow skipping tests")
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf sched latency: Add histogram and time interval options</title>
<updated>2026-08-07T17:56:23+00:00</updated>
<author>
<name>Aaron Tomlin</name>
<email>atomlin@atomlin.com</email>
</author>
<published>2026-08-06T15:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf10e6ee2ac3034c9068e03eed418fd16961984e'/>
<id>urn:sha1:bf10e6ee2ac3034c9068e03eed418fd16961984e</id>
<content type='text'>
While 'perf sched latency' reports task runtime and delay statistics
(average and maximum delay), it does not provide a visual representation
of how task wait times are distributed across latency ranges between
snapshots (start and finish of the analysis window).

The --histogram option collects CPU wait latencies (time between when
a task becomes runnable and when it gets scheduled onto a CPU) into 22
latency buckets, displaying an ASCII bar chart distribution.

The --hist-mode option configures the bucketing scheme:
  - log (default). Logarithmic latency buckets ranging from
    sub-microsecond (&lt; 1 us) up to &gt;= 1.05 seconds

  - linear. Equal-width linear latency buckets
    (i.e., 100 us steps up to &gt;= 2.1 ms)

The --time option allows filtering trace event processing to a
specific time interval [start,stop].

Example histogram output excerpt:

    ❯ sudo perf sched latency --histogram --CPU 0

     CPU Wait Latency Distribution Histogram (between snapshots) (total samples: 36114)
     -------------------------------------------------------------------
      Latency Range    |      Count |    Pct | Histogram Graph
     -------------------------------------------------------------------
      &lt; 1 us           |         17 |   0.0% | #
      2 - 4 us         |        673 |   1.9% | #
      4 - 8 us         |       6237 |  17.3% | ######
      8 - 16 us        |       3224 |   8.9% | ###
      16 - 32 us       |       1388 |   3.8% | #
      32 - 64 us       |        709 |   2.0% | #
      64 - 128 us      |        690 |   1.9% | #
      128 - 256 us     |        789 |   2.2% | #
      256 - 512 us     |        541 |   1.5% | #
      512 - 1024 us    |       2256 |   6.2% | ##
      1 - 2 ms         |       3577 |   9.9% | ###
      2 - 4 ms         |      13259 |  36.7% | ##############
      4 - 8 ms         |       2523 |   7.0% | ##
      8 - 16 ms        |        222 |   0.6% | #
      16 - 32 ms       |         10 |   0.0% | #
      &gt;= 1.05 s        |          3 |   0.0% | #
     -------------------------------------------------------------------

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
</feed>
