]> git.ipfire.org Git - thirdparty/linux.git/commit
rtla: Set stop threshold after all instances are enabled
authorCrystal Wood <crwood@redhat.com>
Wed, 12 Nov 2025 15:25:29 +0000 (09:25 -0600)
committerTomas Glozar <tglozar@redhat.com>
Wed, 7 Jan 2026 14:57:15 +0000 (15:57 +0100)
commitc219d4ee1d63b772d5fa8ed453b9cec18a9e2f6a
tree42d389f30801e39fd2b4f1f998997d06efc1fd4c
parent11aa4a18094f04a8ba7e403c272a9a5d85c9c9fc
rtla: Set stop threshold after all instances are enabled

This avoids startup races where one of the instances hit a threshold
before all instances were enabled, and thus tracing stops without
the relevant event.  In particular, this is not uncommon with the
tests that set a very tight threshold and then complain if there's
no analysis.

This also ensures that we don't stop tracing during a warmup.

The downside is a small chance of having an event over the threshold
early in the output, without stopping on it, which could cause user
confusion.  This should be less likely if the warmup feature is used, but
that doesn't eliminate the race window, just the odds of an unusual spike
right at that moment.

Signed-off-by: Crystal Wood <crwood@redhat.com>
Link: https://lore.kernel.org/r/20251112152529.956778-6-crwood@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/common.c
tools/tracing/rtla/src/common.h
tools/tracing/rtla/src/osnoise.c
tools/tracing/rtla/src/osnoise.h
tools/tracing/rtla/src/timerlat.c