aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/futex-contention.py
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <[email protected]>2024-02-22 20:33:24 -0500
committerSteven Rostedt (Google) <[email protected]>2024-03-18 10:33:05 -0400
commitcca990c7b565af0dc61a8f647c00833453cf5bff (patch)
tree4a0af7f7b91086e09ff48c5fe7e7790751bf673f /tools/perf/scripts/python/futex-contention.py
parent70a6ed553f7d3504febac467cb4a0bae621ba3c6 (diff)
tracing: Fix snapshot counter going between two tracers that use it
Running the ftrace selftests caused the ring buffer mapping test to fail. Investigating, I found that the snapshot counter would be incremented every time a tracer that uses the snapshot is enabled even if the snapshot was used by the previous tracer. That is: # cd /sys/kernel/tracing # echo wakeup_rt > current_tracer # echo wakeup_dl > current_tracer # echo nop > current_tracer would leave the snapshot counter at 1 and not zero. That's because the enabling of wakeup_dl would increment the counter again but the setting the tracer to nop would only decrement it once. Do not arm the snapshot for a tracer if the previous tracer already had it armed. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Vincent Donnefort <[email protected]> Fixes: 16f7e48ffc53a ("tracing: Add snapshot refcount") Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions