Thread (9 messages) flat view 9 messages, 2 authors, 3d ago

Re: [PATCH v4 5/6] rtla: Unconditionally clean any pre-existing filters for user-provided events

From: Tomas Glozar <tglozar@redhat.com>
Date: 2026-08-10 11:24:40
Also in: lkml

út 4. 8. 2026 v 19:43 odesílatel Valentin Schneider
[off-list ref] napsal:
A later commit will apply a filter to events recorded to the trace
output. To prevent any user confusion, remove pre-existing filters when
enabling an event provided via the '-e' command line argument.

Suggested-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
I found that I missed one case when suggesting this: the user might
supply an event twice. With this change, it will now clear the filter
the second time the event is applied:

$ rtla timerlat hist --no-aa --on-threshold trace \
    --on-threshold shell,command="grep sched_switch timerlat_trace.txt
| grep -Fv '[000]' | head -n1" \
    -i 1 -e sched:sched_switch -e sched:sched_switch --filter "cpu == 0"

Without this commit:
 Saving trace to timerlat_trace.txt
# RTLA timerlat histogram
...
With this commit:
 Saving trace to timerlat_trace.txt
         <idle>-0       [002] d..2. 423185.347008: sched_switch: ...
# RTLA timerlat histogram
...
(Note that events are processed in opposite order to the command line.)

This is unexpected and might break scripts that for some reason enable
an event twice. So I'm not sure if my suggestion was the best
solution.
[truncated]
Tomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help