<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/perf/ui/stdio/progress.c, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/perf/ui/stdio/progress.c?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/perf/ui/stdio/progress.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-10-07T09:40:29Z</updated>
<entry>
<title>perf report: Add --progress option</title>
<updated>2026-10-07T09:40:29Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-10-06T14:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=44ce6270eb89deadac06bd98cb3266c864c07d7e'/>
<id>urn:sha1: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>
</entry>
</feed>
