<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/perf/Documentation, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>perf bench: Add atomic operations benchmark</title>
<updated>2026-10-21T22:25:29+00:00</updated>
<author>
<name>Changbin Du</name>
<email>changbin.du@gmail.com</email>
</author>
<published>2026-10-16T07:55:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6bfe62df93de50425e27831643c2bb06d1b252ec'/>
<id>6bfe62df93de50425e27831643c2bb06d1b252ec</id>
<content type='text'>
Add a new 'atomic' collection to perf bench for benchmarking
atomic read-modify-write operations with multi-threaded
contention testing. It provides two subcommands:

  - atomic cas: contended compare-and-swap operations
    (__atomic_compare_exchange_n)
  - atomic inc: contended fetch-add operations (__atomic_fetch_add)

Both support a configurable thread count and runtime to measure
atomic contention effects.

Why this benchmark is needed:
- Atomic read-modify-write operations are fundamental to lock-free
  algorithms and data structures. Understanding their performance
  characteristics under contention is critical for designing
  high-performance concurrent applications.
- The benchmark helps identify atomic operation latency and
  scalability issues across different thread counts, revealing
  contention patterns that are not visible in single-threaded tests.
- Useful for evaluating atomic implementation quality on different
  architectures and for regression testing after changes to atomic
  primitives or memory ordering.

Measurement methodology:
- By default two threads contend for the counter, enough to expose
  the contention effect; use -t to scale the count.
- Each thread starts a private timer (clock_gettime CLOCK_MONOTONIC)
  after synchronizing on a pthread_barrier, ensuring all threads
  begin simultaneously.
- Each thread performs a hot loop of the selected atomic operation
  (compare-and-swap or fetch-add) on a shared unsigned long counter
  for a fixed runtime. It counts its own completed operations in a
  local variable, and the loop runs in batches so the termination
  flag is only polled between batches.
- The main thread sleeps for the runtime and then sets the flag; the
  throughput of a repeat is the total operation count divided by the
  measured wall time (the max per-thread runtime).
- The shared counter is cache-line aligned (64 bytes) to isolate
  contention to the target cache line and avoid false sharing.
- The per-thread operation counts of the last repeat show whether
  any thread failed to make progress under contention.
- The first repeat is excluded from statistics as a warmup phase
  to avoid cache-cold effects.

Example usage:
  $ perf bench atomic all
  # Running atomic/cas benchmark...
    Threads: 2, runtime: 2 sec, repeats: 10 (warmup: 1)
    Avg throughput: 68,599,954 ops/sec (+- 0.13%)
    Per-thread ops (last repeat):
      fastest:  74,842,112 ops
      slowest:  63,176,704 ops
      avg:      69,009,408 ops

  # Running atomic/inc benchmark...
    Threads: 2, runtime: 2 sec, repeats: 10 (warmup: 1)
    Avg throughput: 128,428,772 ops/sec (+- 0.54%)
    Per-thread ops (last repeat):
      fastest:  146,230,272 ops
      slowest:  112,825,344 ops
      avg:      129,527,808 ops

Output fields explained:
- Threads: number of contending threads
- runtime: seconds each thread runs per repeat
- repeats: number of test runs (first is warmup)
- Avg throughput: mean aggregate ops/sec across repeats
- +- %: relative standard error of the mean throughput across repeats
- Per-thread ops: fastest/slowest/avg operations per thread in the
  last repeat (shows scheduling imbalance and lack of progress)

Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Assisted-by: opencode:DeepSeek-V4-Pro
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new 'atomic' collection to perf bench for benchmarking
atomic read-modify-write operations with multi-threaded
contention testing. It provides two subcommands:

  - atomic cas: contended compare-and-swap operations
    (__atomic_compare_exchange_n)
  - atomic inc: contended fetch-add operations (__atomic_fetch_add)

Both support a configurable thread count and runtime to measure
atomic contention effects.

Why this benchmark is needed:
- Atomic read-modify-write operations are fundamental to lock-free
  algorithms and data structures. Understanding their performance
  characteristics under contention is critical for designing
  high-performance concurrent applications.
- The benchmark helps identify atomic operation latency and
  scalability issues across different thread counts, revealing
  contention patterns that are not visible in single-threaded tests.
- Useful for evaluating atomic implementation quality on different
  architectures and for regression testing after changes to atomic
  primitives or memory ordering.

Measurement methodology:
- By default two threads contend for the counter, enough to expose
  the contention effect; use -t to scale the count.
- Each thread starts a private timer (clock_gettime CLOCK_MONOTONIC)
  after synchronizing on a pthread_barrier, ensuring all threads
  begin simultaneously.
- Each thread performs a hot loop of the selected atomic operation
  (compare-and-swap or fetch-add) on a shared unsigned long counter
  for a fixed runtime. It counts its own completed operations in a
  local variable, and the loop runs in batches so the termination
  flag is only polled between batches.
- The main thread sleeps for the runtime and then sets the flag; the
  throughput of a repeat is the total operation count divided by the
  measured wall time (the max per-thread runtime).
- The shared counter is cache-line aligned (64 bytes) to isolate
  contention to the target cache line and avoid false sharing.
- The per-thread operation counts of the last repeat show whether
  any thread failed to make progress under contention.
- The first repeat is excluded from statistics as a warmup phase
  to avoid cache-cold effects.

Example usage:
  $ perf bench atomic all
  # Running atomic/cas benchmark...
    Threads: 2, runtime: 2 sec, repeats: 10 (warmup: 1)
    Avg throughput: 68,599,954 ops/sec (+- 0.13%)
    Per-thread ops (last repeat):
      fastest:  74,842,112 ops
      slowest:  63,176,704 ops
      avg:      69,009,408 ops

  # Running atomic/inc benchmark...
    Threads: 2, runtime: 2 sec, repeats: 10 (warmup: 1)
    Avg throughput: 128,428,772 ops/sec (+- 0.54%)
    Per-thread ops (last repeat):
      fastest:  146,230,272 ops
      slowest:  112,825,344 ops
      avg:      129,527,808 ops

Output fields explained:
- Threads: number of contending threads
- runtime: seconds each thread runs per repeat
- repeats: number of test runs (first is warmup)
- Avg throughput: mean aggregate ops/sec across repeats
- +- %: relative standard error of the mean throughput across repeats
- Per-thread ops: fastest/slowest/avg operations per thread in the
  last repeat (shows scheduling imbalance and lack of progress)

Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Assisted-by: opencode:DeepSeek-V4-Pro
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf test: Take turns using the perf mlock budget in the mmaping tests</title>
<updated>2026-10-17T13:30:20+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-10-12T12:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba2a0285a6266fc551f8fb900b94ab681ba09a23'/>
<id>ba2a0285a6266fc551f8fb900b94ab681ba09a23</id>
<content type='text'>
The mmap size used when none is asked for is derived from
kernel.perf_event_mlock_kb itself (see perf_event_mlock_kb_in_pages()),
that after rounding down to a power of two number of pages ends up being
about all of a single CPU's share of that per user budget, so with 'perf
test' starting all the selected tests at once, any further mapping done
while another test still has its ring buffers mapped fails with:

  Permission error mapping pages.
  Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
  or try again with a smaller value of -m/--mmap_pages.

that then shows up as a failure or, worse, as an "unsupp" skip in tests
like the attr ones, i.e. as a false pass.

Instead of making those tests exclusive, which would serialize them
against every other test, keep them running in parallel with the tests
that don't map ring buffers and have them take turns using the budget,
via a robust, process-shared mutex (see mutex_init_pshared_robust()) in
a MAP_SHARED|MAP_ANONYMOUS area that is inherited by the forked test
processes: a test killed by a signal doesn't leave the budget locked,
the kernel marks the mutex owner-died and the next locker takes it over;
a signal that is caught rather than kills ends up the same way, with the
longjmp out of child_test_sig_handler() leaving it held until the child
exits and the kernel hands it over.

Perf's struct mutex is used, so the lock discipline is checked in clang
builds via -Wthread-safety; as the thread safety analysis can't verify
conditionally held locks, the tests that map ring buffers run through a
helper taking the mutex unconditionally around the test function call.

Robust mutexes aren't always available, at build time or, as glibc and
musl can do when get_robust_list(2)/set_robust_list(2) aren't usable, at
run time: in that case the budget is not shared and the tests run as
before, failing or skipping on starvation instead of hanging on a lock
left behind by a test killed by a signal.

Taking turns is unnecessary when nothing can exhaust the budget: once it is
spent, whatever maps on top of it is charged against RLIMIT_MEMLOCK and the
mapping is refused with EPERM when that runs out too, but only for the
processes the kernel is paranoid about and that have no CAP_IPC_LOCK to
lift the check, see perf_mmap_calc_limits().  Root, then, has no turns to
take: it never has a mapping refused, so the turnstile only buys it the
wall clock cost measured below, for a budget nothing is contending for.

The area is shared by the tests of one 'perf test' invocation only: a
second invocation running at the same time maps its own, so the two
don't take turns with each other.

The sysctl is left alone.  Growing it, to leave room for whatever else
the user has running, would need the original value shared between the
invocations, so that the last one out puts it back, and it only helps a
user who can write the sysctl but lacks CAP_IPC_LOCK, the one capability
that lifts the limit.

Raising the soft RLIMIT_MEMLOCK to the hard one when a mapping is refused
is left for a follow-up: it would buy back the wall clock above without
taking turns, where the hard limit allows the raise.

None of this is done when just one of the selected tests maps ring
buffers, as there is nothing to share the budget with in that case.

Taking turns isn't free: a test that hangs while holding the budget now
holds with it every other test mapping ring buffers, where before it
would fail, or skip, by itself.  And there is a cost even when nothing
goes wrong, this being the whole suite on a Ryzen 9 9950X3D, kernel 7.2.7,
32 CPUs, with the default 516 KiB budget, before and after taking turns:

  budget not shared:   42 s wall clock,  72 tests Ok, 28 failed
  tests take turns:   133 s wall clock, 101 tests Ok, 10 failed

Both are non-root runs of the whole series applied, the shell test markings
included, and none of the ten failures is about the budget: eight of them
pass as root, where it can't be exhausted, and the two that fail there too,
the addr2line inline unwinding one, with no branch stack sampling to ask
this machine for, and the BPF metadata collection one, whose output isn't
what the test expects, are not budget related either.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mmap size used when none is asked for is derived from
kernel.perf_event_mlock_kb itself (see perf_event_mlock_kb_in_pages()),
that after rounding down to a power of two number of pages ends up being
about all of a single CPU's share of that per user budget, so with 'perf
test' starting all the selected tests at once, any further mapping done
while another test still has its ring buffers mapped fails with:

  Permission error mapping pages.
  Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
  or try again with a smaller value of -m/--mmap_pages.

that then shows up as a failure or, worse, as an "unsupp" skip in tests
like the attr ones, i.e. as a false pass.

Instead of making those tests exclusive, which would serialize them
against every other test, keep them running in parallel with the tests
that don't map ring buffers and have them take turns using the budget,
via a robust, process-shared mutex (see mutex_init_pshared_robust()) in
a MAP_SHARED|MAP_ANONYMOUS area that is inherited by the forked test
processes: a test killed by a signal doesn't leave the budget locked,
the kernel marks the mutex owner-died and the next locker takes it over;
a signal that is caught rather than kills ends up the same way, with the
longjmp out of child_test_sig_handler() leaving it held until the child
exits and the kernel hands it over.

Perf's struct mutex is used, so the lock discipline is checked in clang
builds via -Wthread-safety; as the thread safety analysis can't verify
conditionally held locks, the tests that map ring buffers run through a
helper taking the mutex unconditionally around the test function call.

Robust mutexes aren't always available, at build time or, as glibc and
musl can do when get_robust_list(2)/set_robust_list(2) aren't usable, at
run time: in that case the budget is not shared and the tests run as
before, failing or skipping on starvation instead of hanging on a lock
left behind by a test killed by a signal.

Taking turns is unnecessary when nothing can exhaust the budget: once it is
spent, whatever maps on top of it is charged against RLIMIT_MEMLOCK and the
mapping is refused with EPERM when that runs out too, but only for the
processes the kernel is paranoid about and that have no CAP_IPC_LOCK to
lift the check, see perf_mmap_calc_limits().  Root, then, has no turns to
take: it never has a mapping refused, so the turnstile only buys it the
wall clock cost measured below, for a budget nothing is contending for.

The area is shared by the tests of one 'perf test' invocation only: a
second invocation running at the same time maps its own, so the two
don't take turns with each other.

The sysctl is left alone.  Growing it, to leave room for whatever else
the user has running, would need the original value shared between the
invocations, so that the last one out puts it back, and it only helps a
user who can write the sysctl but lacks CAP_IPC_LOCK, the one capability
that lifts the limit.

Raising the soft RLIMIT_MEMLOCK to the hard one when a mapping is refused
is left for a follow-up: it would buy back the wall clock above without
taking turns, where the hard limit allows the raise.

None of this is done when just one of the selected tests maps ring
buffers, as there is nothing to share the budget with in that case.

Taking turns isn't free: a test that hangs while holding the budget now
holds with it every other test mapping ring buffers, where before it
would fail, or skip, by itself.  And there is a cost even when nothing
goes wrong, this being the whole suite on a Ryzen 9 9950X3D, kernel 7.2.7,
32 CPUs, with the default 516 KiB budget, before and after taking turns:

  budget not shared:   42 s wall clock,  72 tests Ok, 28 failed
  tests take turns:   133 s wall clock, 101 tests Ok, 10 failed

Both are non-root runs of the whole series applied, the shell test markings
included, and none of the ten failures is about the budget: eight of them
pass as root, where it can't be exhausted, and the two that fail there too,
the addr2line inline unwinding one, with no branch stack sampling to ask
this machine for, and the BPF metadata collection one, whose output isn't
what the test expects, are not budget related either.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf tests: Introduce a 'needs_mlock' suite flag</title>
<updated>2026-10-17T13:30:19+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-10-08T13:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d068b2363ae599225ded0ee61faceebc65dfdf52'/>
<id>d068b2363ae599225ded0ee61faceebc65dfdf52</id>
<content type='text'>
Each perf instance maps one ring buffer per CPU, all charged to the same
per user budget set in kernel.perf_event_mlock_kb, so suites that map
them need to be told apart from the ones that don't, to later have them
take turns using that budget while the other tests keep running in
parallel.

Add the flag to 'struct test_suite' and a DEFINE_SUITE_NEEDS_MLOCK()
variant for the suites using the DEFINE_SUITE() form.

Shell tests run perf, that maps ring buffers, so they are taken to need
room in that budget by default; the requisites, a comma separated list in
the parens ending their description line, name what a test needs and take
a "no_" prefix to waive it, e.g.:

  # perf stat tests (no_mlock)

"mlock" is room in that budget, so stating it only spells the default
out, "no_mlock" waives it, and "exclusive" is the catch-all that keeps a
test from running alongside any other, so it runs alone, in sequence, and
implies every other requisite, which is why it can't be waived either.
More requisites are to come, each stating what a test needs, till the
catch-all isn't needed anymore.

'perf test requisites' lists what each test needs, reusing the listing
routine and taking the same test name fragments and numbers as 'list'.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each perf instance maps one ring buffer per CPU, all charged to the same
per user budget set in kernel.perf_event_mlock_kb, so suites that map
them need to be told apart from the ones that don't, to later have them
take turns using that budget while the other tests keep running in
parallel.

Add the flag to 'struct test_suite' and a DEFINE_SUITE_NEEDS_MLOCK()
variant for the suites using the DEFINE_SUITE() form.

Shell tests run perf, that maps ring buffers, so they are taken to need
room in that budget by default; the requisites, a comma separated list in
the parens ending their description line, name what a test needs and take
a "no_" prefix to waive it, e.g.:

  # perf stat tests (no_mlock)

"mlock" is room in that budget, so stating it only spells the default
out, "no_mlock" waives it, and "exclusive" is the catch-all that keeps a
test from running alongside any other, so it runs alone, in sequence, and
implies every other requisite, which is why it can't be waived either.
More requisites are to come, each stating what a test needs, till the
catch-all isn't needed anymore.

'perf test requisites' lists what each test needs, reusing the listing
routine and taking the same test name fragments and numbers as 'list'.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf report: Add --no-progress option</title>
<updated>2026-10-07T09:40:29+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-10-06T14:57:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a98990010d9d512fef0943cff80d222c90287a6'/>
<id>6a98990010d9d512fef0943cff80d222c90287a6</id>
<content type='text'>
Now that --progress is being added for the stdio case, wire up its
counterpart for the browsers: the TUI and GTK ones present progress of
their own and there is no way to turn it off.  Install the no-op
ui_progress ops, the ones already used until a backend sets theirs,
after setup_browser() installed the ones of the browser in use.  The
phases are still counted, nothing is shown for them, and no second
option is needed for it: parse-options provides --no-progress as the
negation of --progress, report.progress_set saying that it was asked
for, report.progress being false both when nothing was asked for and
when --no-progress was.

Suggested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Assisted-by: LLM
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that --progress is being added for the stdio case, wire up its
counterpart for the browsers: the TUI and GTK ones present progress of
their own and there is no way to turn it off.  Install the no-op
ui_progress ops, the ones already used until a backend sets theirs,
after setup_browser() installed the ones of the browser in use.  The
phases are still counted, nothing is shown for them, and no second
option is needed for it: parse-options provides --no-progress as the
negation of --progress, report.progress_set saying that it was asked
for, report.progress being false both when nothing was asked for and
when --no-progress was.

Suggested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Assisted-by: LLM
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf report: Add --progress option</title>
<updated>2026-10-07T09:40:29+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-10-06T14:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=44ce6270eb89deadac06bd98cb3266c864c07d7e'/>
<id>44ce6270eb89deadac06bd98cb3266c864c07d7e</id>
<content type='text'>
Processing a large session with stdio output gives no feedback about
which phase perf is in or how far along it is: ui_progress updates are
only shown by the TUI.  Add --progress, installing a stdio backend
(ui/stdio/progress.c) that prints the phase title, percentage and
counts:

  Processing events... [ 42.3%] 317M / 746M

Phases can be nested, so the backend tracks the ones started to
complete the right one on ui_progress__finish(); that requires
init()/finish() pairs, fixed in ordered-events.c and the pipe and
directory event processing.

With a pager both stdout and stderr lead to it, so isatty(stderr)
turns false and the updates end up printed one per line in the
pager's output: use /dev/tty in that case, so that the updates keep
updating in place, untouched by the pager.

Assisted-by: LLM
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Processing a large session with stdio output gives no feedback about
which phase perf is in or how far along it is: ui_progress updates are
only shown by the TUI.  Add --progress, installing a stdio backend
(ui/stdio/progress.c) that prints the phase title, percentage and
counts:

  Processing events... [ 42.3%] 317M / 746M

Phases can be nested, so the backend tracks the ones started to
complete the right one on ui_progress__finish(); that requires
init()/finish() pairs, fixed in ordered-events.c and the pipe and
directory event processing.

With a pager both stdout and stderr lead to it, so isatty(stderr)
turns false and the updates end up printed one per line in the
pager's output: use /dev/tty in that case, so that the updates keep
updating in place, untouched by the pager.

Assisted-by: LLM
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf timechart: Add an interactive --tui mode</title>
<updated>2026-10-03T09:41:36+00:00</updated>
<author>
<name>Alice Rogers</name>
<email>alice.mei.rogers@gmail.com</email>
</author>
<published>2026-10-02T18:26:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e7a72d6919804e5e5a10e13d71e259acbc7510bc'/>
<id>e7a72d6919804e5e5a10e13d71e259acbc7510bc</id>
<content type='text'>
Add ttimechart.py, a textual based interactive timechart, and a --tui
option to perf timechart that launches it through perf script. Rather
than writing an SVG file, per-CPU (busy, frequency and idle state),
per-task (running, runnable and blocked) and I/O timelines are shown in
the terminal along with a summary table. The timelines can be zoomed,
panned and the state of the selected row at the cursor is described,
including the task that woke it. The -i, -P, -T and -p options are
passed to the script.

The data is loaded in a background thread and the timelines are shown
and updated as it loads. A --dump option prints a text summary without
the UI.

Committer testing:

Fist record a short session with:

  root@x2:/home/acme/git/perf-tools-next# perf timechart record
  ^C[ perf record: Woken up 9 times to write data ]
  [ perf record: Captured and wrote 4.489 MB perf.data (29719 samples) ]
  root@x2:/home/acme/git/perf-tools-next#

Then try the TUI with:

  root@x2:/home/acme/git/perf-tools-next# tools/perf/python/ttimechart.py

or:

  root@x2:/home/acme/git/perf-tools-next# perf timechart --tui

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Alice Rogers &lt;alice.mei.rogers@gmail.com&gt;
Co-developed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add ttimechart.py, a textual based interactive timechart, and a --tui
option to perf timechart that launches it through perf script. Rather
than writing an SVG file, per-CPU (busy, frequency and idle state),
per-task (running, runnable and blocked) and I/O timelines are shown in
the terminal along with a summary table. The timelines can be zoomed,
panned and the state of the selected row at the cursor is described,
including the task that woke it. The -i, -P, -T and -p options are
passed to the script.

The data is loaded in a background thread and the timelines are shown
and updated as it loads. A --dump option prints a text summary without
the UI.

Committer testing:

Fist record a short session with:

  root@x2:/home/acme/git/perf-tools-next# perf timechart record
  ^C[ perf record: Woken up 9 times to write data ]
  [ perf record: Captured and wrote 4.489 MB perf.data (29719 samples) ]
  root@x2:/home/acme/git/perf-tools-next#

Then try the TUI with:

  root@x2:/home/acme/git/perf-tools-next# tools/perf/python/ttimechart.py

or:

  root@x2:/home/acme/git/perf-tools-next# perf timechart --tui

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Alice Rogers &lt;alice.mei.rogers@gmail.com&gt;
Co-developed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf list: Add a --tui option to launch ilist</title>
<updated>2026-10-03T09:22:44+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-10-02T18:26:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab8834953ba082788d78bdf1af95f7a71db646a6'/>
<id>ab8834953ba082788d78bdf1af95f7a71db646a6</id>
<content type='text'>
Add a --tui option to perf list that launches the textual based ilist
script through perf script, similar to perf timechart --tui. Rather
than printing the events, the PMUs, events and metrics can be browsed
interactively and the selected event or metric is counted on each CPU.
Arguments after '--' are passed to the script.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a --tui option to perf list that launches the textual based ilist
script through perf script, similar to perf timechart --tui. Rather
than printing the events, the PMUs, events and metrics can be browsed
interactively and the selected event or metric is counted on each CPU.
Arguments after '--' are passed to the script.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf build: Fix clean and install target dependencies</title>
<updated>2026-10-01T15:54:35+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-10-01T05:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=148cd3adf2df9e53fd9b3070ae1178d4876f8c67'/>
<id>148cd3adf2df9e53fd9b3070ae1178d4876f8c67</id>
<content type='text'>
Fix several missing dependencies and ordering issues for clean and
install targets:

1. In tools/perf/Makefile, order 'install*' goals (excluding
   'install-build-deps', which is ordered before build/install goals)
   after 'all' when both are passed on the command line (e.g.
   'make -j clean all install') so two concurrent Makefile.perf
   sub-makes do not race in the same build directory, and mark 'all' and
   'clean' as .PHONY.

2. In tools/perf/Makefile.perf, when 'clean' is passed alongside build
   or install goals (e.g. 'make -f Makefile.perf clean install'), run
   'clean' sequentially before 'fixdep' and 'sub-make' rather than
   running 'clean' in parallel with the build inside 'sub-make'.

3. Ensure '$(OUTPUT)python' is created inside the recipe for
   '$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX)' rather than only at
   Makefile parse time, in case 'clean' removed the directory.

4. Add '$(LANG_BINDINGS)' as a prerequisite of 'install-python_ext' so
   the Python C extension is built with the proper compiler/linker flags
   and perf libraries before 'setup.py install' runs.

5. Add 'install-bin', 'install-tools', 'install-tests',
   'install-python_ext', '$(DOC_TARGETS)', and '$(INSTALL_DOC_TARGETS)'
   to .PHONY in Makefile.perf.

6. Prefix targets emitted by Documentation/build-docdep.perl with
   '$(OUTPUT)' so '$(OUTPUT)doc.dep' matches out-of-tree documentation
   targets when 'O=' is specified.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix several missing dependencies and ordering issues for clean and
install targets:

1. In tools/perf/Makefile, order 'install*' goals (excluding
   'install-build-deps', which is ordered before build/install goals)
   after 'all' when both are passed on the command line (e.g.
   'make -j clean all install') so two concurrent Makefile.perf
   sub-makes do not race in the same build directory, and mark 'all' and
   'clean' as .PHONY.

2. In tools/perf/Makefile.perf, when 'clean' is passed alongside build
   or install goals (e.g. 'make -f Makefile.perf clean install'), run
   'clean' sequentially before 'fixdep' and 'sub-make' rather than
   running 'clean' in parallel with the build inside 'sub-make'.

3. Ensure '$(OUTPUT)python' is created inside the recipe for
   '$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX)' rather than only at
   Makefile parse time, in case 'clean' removed the directory.

4. Add '$(LANG_BINDINGS)' as a prerequisite of 'install-python_ext' so
   the Python C extension is built with the proper compiler/linker flags
   and perf libraries before 'setup.py install' runs.

5. Add 'install-bin', 'install-tools', 'install-tests',
   'install-python_ext', '$(DOC_TARGETS)', and '$(INSTALL_DOC_TARGETS)'
   to .PHONY in Makefile.perf.

6. Prefix targets emitted by Documentation/build-docdep.perl with
   '$(OUTPUT)' so '$(OUTPUT)doc.dep' matches out-of-tree documentation
   targets when 'O=' is specified.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf trace: Add an option to disable syscall augmentation</title>
<updated>2026-10-01T15:47:15+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-28T18:25:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e827cc9413abc43d93044bb23066fa81bbcb04be'/>
<id>e827cc9413abc43d93044bb23066fa81bbcb04be</id>
<content type='text'>
'perf trace' falls back to the raw_syscalls tracepoints, filtering in user
space, when the augmentation BPF programs can't be loaded.

Add --no-syscall-augment to use that path even when they can, so both
can be tested.

Suggest it when tasks are lost, as the tracepoints' per-task events
don't limit how many tasks are traced.

Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'perf trace' falls back to the raw_syscalls tracepoints, filtering in user
space, when the augmentation BPF programs can't be loaded.

Add --no-syscall-augment to use that path even when they can, so both
can be tested.

Suggest it when tasks are lost, as the tracepoints' per-task events
don't limit how many tasks are traced.

Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf sched stats: Reject mismatched or incomplete snapshots</title>
<updated>2026-09-30T18:34:17+00:00</updated>
<author>
<name>Tianyi Chen</name>
<email>hi@tychen.cc</email>
</author>
<published>2026-09-16T16:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9910ee15c9fc024e713b66403edf23976d33a857'/>
<id>9910ee15c9fc024e713b66403edf23976d33a857</id>
<content type='text'>
The before and after records are paired by list position. If a CPU or
domain disappears, counters can be subtracted from a different record
or left as absolute values. An extra record can also advance the cursor
past the list.

Identify the second snapshot by its timestamp or CPU ordering, and
require matching CPU/domain IDs and versions before subtracting. Check
that every record has a counterpart before printing, and propagate
errors from either input of diff.

Add a shell test with synthetic snapshots, including equal timestamps,
CPU filtering, and missing or reordered CPU/domain records.

Fixes: 5a357ae6ad63fd10 ("perf sched stats: Add support for report subcommand")
Reviewed-by: Swapnil Sapkal &lt;swapnil.sapkal@amd.com&gt;
Assisted-by: LLM
Signed-off-by: Tianyi Chen &lt;hi@tychen.cc&gt;
Tested-by: Swapnil Sapkal &lt;swapnil.sapkal@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The before and after records are paired by list position. If a CPU or
domain disappears, counters can be subtracted from a different record
or left as absolute values. An extra record can also advance the cursor
past the list.

Identify the second snapshot by its timestamp or CPU ordering, and
require matching CPU/domain IDs and versions before subtracting. Check
that every record has a counterpart before printing, and propagate
errors from either input of diff.

Add a shell test with synthetic snapshots, including equal timestamps,
CPU filtering, and missing or reordered CPU/domain records.

Fixes: 5a357ae6ad63fd10 ("perf sched stats: Add support for report subcommand")
Reviewed-by: Swapnil Sapkal &lt;swapnil.sapkal@amd.com&gt;
Assisted-by: LLM
Signed-off-by: Tianyi Chen &lt;hi@tychen.cc&gt;
Tested-by: Swapnil Sapkal &lt;swapnil.sapkal@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
