From: sashiko-bot@kernel.org
To: "Paolo Bertinetti" <paolobertinetti200f4@proton.me>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/2] tracing/perf: Clear stop state in perf_trace_add()
Date: Tue, 03 Nov 2026 13:14:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-195313@kernel.org> (raw)
In-Reply-To: <20261103130732.764081-2-paolobertinetti200f4@proton.me>
> 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")
> Reported-by: Francesco Nigro <nigro.fra@gmail.com>
> Closes: https://lore.kernel.org/r/20261021131006.2101248-1-nigro.fra@gmail.com/
> Assisted-by: LLM
> Signed-off-by: Paolo Bertinetti <paolobertinetti200f4@proton.me>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103130732.764081-1-paolobertinetti200f4@proton.me?part=1
next prev parent reply other threads:[~2026-11-03 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 13:07 [PATCH 0/2] perf: Fix PERF_EVENT_IOC_REFRESH for tracepoints and breakpoints Paolo Bertinetti
2026-11-03 13:07 ` [PATCH 1/2] tracing/perf: Clear stop state in perf_trace_add() Paolo Bertinetti
2026-11-03 13:14 ` sashiko-bot [this message]
2026-11-03 13:07 ` [PATCH 2/2] perf/hw_breakpoint: Clear stop state in hw_breakpoint_add() Paolo Bertinetti
2026-11-03 13:12 ` sashiko-bot
-- strict thread matches above, loose matches on Subject: below --
2026-11-03 13:09 [PATCH 1/2] tracing/perf: Clear stop state in perf_trace_add() Paolo Bertinetti
2026-11-03 13:14 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-195313@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=paolobertinetti200f4@proton.me \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox