Ășt 4. 8. 2026 v 19:43 odesĂlatel Valentin Schneider
<[email protected]> 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 <[email protected]>
> Signed-off-by: Valentin Schneider <[email protected]>
> ---
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