rtla/timerlat: Give timerlat auto analysis its own instance
authorDaniel Bristot de Oliveira <bristot@kernel.org>
Tue, 6 Jun 2023 16:12:19 +0000 (18:12 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 13 Jun 2023 20:31:35 +0000 (16:31 -0400)
commitc66552be9ec9f83705a911cb2219cffc39c42a0c
tree894317667eac682e68096b88a312db732941dfb5
parentc58a3f8c7f974d171d1b6897a71a078a3bc7afd3
rtla/timerlat: Give timerlat auto analysis its own instance

Currently, the auto-analysis is attached to the timerlat top instance.
The idea was to avoid creating another instance just for that, so one
instance could be reused.

The drawback is that, by doing so, the auto-analysis run for the entire
session, consuming CPU time. On my 24 box CPUs for timerlat with a 100
us period consumed 50 % with auto analysis, but only 16 % without.

By creating an instance for auto-analysis, we can keep the processing
stopped until a stop tracing condition is hit. Once it happens,
timerlat auto-analysis can use its own trace instance to parse only
the end of the trace.

By doing so, auto-analysis stop consuming cpu time when it is not
needed.

If the --aa-only is passed, the timerlat top instance is reused for
auto analysis.

Link: https://lkml.kernel.org/r/346b7168c1bae552a415715ec6d23c129a43bdb7.1686066600.git.bristot@kernel.org
Cc: William White <chwhite@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/timerlat_aa.c
tools/tracing/rtla/src/timerlat_aa.h
tools/tracing/rtla/src/timerlat_top.c