Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Leo Yan" <leo.yan@arm.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3] perf/core: Fix ITRACE start suppression for inherited events
Date: Wed, 02 Dec 2026 18:06:21 +0000	[thread overview]
Message-ID: <sashiko-outbox-246403@kernel.org> (raw)
In-Reply-To: <20261202-perf_core_itrace_start_fix_inherit_event-v3-1-72e96d7e1f30@arm.com>

> ITRACE_START supplies the initial PID/TID for AUX trace decoding. For
> inherited events, perf_log_itrace_start() checks the parent, but
> perf_event_itrace_started() marks the child. If a child starts first,
> the parent's flag stays clear and subsequent schedule-ins can emit
> redundant records.
> 
> One option is to set PERF_ATTACH_ITRACE in the parent's attach_state.
> The child holds its own context lock during schedule-in, so this update
> could race with parent teardown and overwrite changes to other flags.
> Taking the parent's lock as well would require nesting the two context
> locks in a consistent order.
> 
> Use a separate bool on the event to record whether the PMU has reported
> a trace start for it or any of its children. This lets subsequent
> schedule-ins suppress ITRACE_START independently of event attachment.
> 
> On the tested x86-64 and arm64 builds, the bool fits in existing
> padding, preserving sizeof(struct perf_event) and the offsets of all
> existing members.
> 
> Reported-by: Sashiko AI <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/linux-perf-users/20260901164705.042781F000E9@smtp.kernel.org/
> Fixes: 9a6694cfa239 ("perf/x86/intel/pt: Do not force sync packets on every schedule-in")
> Signed-off-by: Leo Yan <leo.yan@arm.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-perf_core_itrace_start_fix_inherit_event-v3-1-72e96d7e1f30@arm.com?part=1

      reply	other threads:[~2026-12-02 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 17:58 [PATCH v3] perf/core: Fix ITRACE start suppression for inherited events Leo Yan
2026-12-02 18:06 ` sashiko-bot [this message]

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-246403@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=leo.yan@arm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --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