]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtla/actions: Restore continue flag in actions_perform()
authorTomas Glozar <tglozar@redhat.com>
Tue, 26 May 2026 10:25:20 +0000 (12:25 +0200)
committerTomas Glozar <tglozar@redhat.com>
Thu, 28 May 2026 11:02:15 +0000 (13:02 +0200)
commitdd520daffbc901f10d49a51a58313547d417b506
treeed30825b6177a806356440a50849c0b029cfd5ed
parentf03a59f949176ce4312cb466245d1243aaf40389
rtla/actions: Restore continue flag in actions_perform()

Currently, actions_perform() only ever sets the continue flag (when
performing the continue action), but never resets it. That leads to
RTLA continuing tracing even if the continue action was not performed in
the current iteration.

For example, the following command:

$ rtla timerlat hist -T 100 --on-threshold shell,command='
    echo Spike!
    if [ -f /tmp/a ]
    then
      exit 1
    else
      touch /tmp/a
    fi' --on-threshold continue

should print Spike! at most once, because after hitting the threshold
for the first time, /tmp/a exists, the shell action will fail, and the
continue action is not performed. However, unless /tmp/a exists before
the measurement, it will print Spike! until stopped, as the continue
flag stays set.

Set the continue flag to false in the beginning of actions_perform() to
make RTLA continue only if the action was actually performed.

Fixes: 8d933d5c89e8 ("rtla/timerlat: Add continue action")
Link: https://lore.kernel.org/r/20260526102523.2662391-1-tglozar@redhat.com
[ correct Fixes tag to include 12 characters of hash ]
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/actions.c