Re: [PATCH 04/25] coresight: perf: End AUX output when an event is throttled

From: Leo Yan

Date: Mon Nov 23 2026 - 06:53:40 EST


On Mon, Nov 23, 2026 at 11:01:04AM +0000, Suzuki K Poulose wrote:

[...]

> > @@ -748,13 +748,16 @@ static void etm_event_stop(struct perf_event *event, int mode)
> > * handle due to lack of buffer space), we don't
> > * have to do anything here.
> > */
> > - if (handle->event && (mode & PERF_EF_UPDATE)) {
> > + if (!handle->event)
> > + goto out;
> > +
> > + if (mode & PERF_EF_UPDATE) {
> > if (WARN_ON_ONCE(handle->event != event))
> > - return;
> > + goto out;
>
> We seem to be disabling the path in this case, which is a new side
> effect ? Do we want this ?

Yes, it is intentional to disable path for this case. By this point,
the source has already been disabled and the event marked stopped,
so I intend to complete teardown of the whole path.

> Also, could we not move this out of the if condition ?

I initially left the check in its existing position to keep the
validation changes together in patch 05, which reworks the AUX-state
checks with perf_get_aux().

I can update condition check like:

if (!handle->event || WARN_ON_ONCE(handle->event != event))
goto out;

If this is okay for you, I will update patch and send out.

Thanks,
Leo