summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPaolo Bertinetti <paolobertinetti200f4@proton.me>2026-11-03 13:07:48 +0000
committerPeter Zijlstra <peterz@infradead.org>2026-11-06 11:45:14 +0100
commitfb3f6b21b04f1e8b8982e90e9bf62db9f0dcb5e4 (patch)
treea94aca7c5f7af0eae06c25cb09525df8bd466e64 /tools/perf/scripts/python
parent0ae655bce1934857fa3e316ddcb4be38c30dbd38 (diff)
tracing/perf: Clear stop state in perf_trace_add()
Since commit 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage"), __perf_event_overflow() stops the event with pmu->stop() and disables it when the PERF_EVENT_IOC_REFRESH limit is reached. When userspace re-arms the event with PERF_EVENT_IOC_REFRESH, the event is enabled again and pmu->add() is called with PERF_EF_START. perf_trace_add() sets PERF_HES_STOPPED when PERF_EF_START is missing, but never clears it. The flag set by pmu->stop() stays, and perf_tp_event_match() drops every later hit. A tracepoint, kprobe or uprobe event re-armed this way delivers only its first overflow. This breaks self-profilers such as async-profiler, and the "Event re-armed with PERF_EVENT_IOC_REFRESH" perf test fails: 1000 events, count 1, 1 overflows (1 POLL_HUP), re-arm errno 0 Tracepoint event : FAILED! Set the state from PERF_EF_START on every add, as perf_swevent_add() does. Fixes: 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage") Closes: https://lore.kernel.org/r/20261021131006.2101248-1-nigro.fra@gmail.com/ Reported-by: Francesco Nigro <nigro.fra@gmail.com> Assisted-by: LLM Signed-off-by: Paolo Bertinetti <paolobertinetti200f4@proton.me> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://github.com/async-profiler/async-profiler/issues/1813 Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261103130732.764081-2-paolobertinetti200f4@proton.me
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions