Re: [PATCH v4 00/19] perf cs-etm: Per-thread mode fixes and snapshot wrap support

From: Namhyung Kim

Date: Fri Nov 27 2026 - 16:50:39 EST


Hi James,

On Tue, Nov 24, 2026 at 05:35:37PM +0000, James Clark wrote:
>
>
> On 05/11/2026 11:44, James Clark wrote:
> > This series depends on:
> > https://lore.kernel.org/linux-perf-users/20261030-perf_cs_etm_fix_non_taken-v3-0-7629b52ab047@xxxxxxx/
> >
> > Fix a few issues with per-thread mode:
> > - On nVHE, everything looks like guest trace instead of host
> > - Tracing multiple threads didn't really work
> >
> > After adding a tests for those, it turns out there were some snapshot
> > bugs not picked up by the other snapshot tests. That showed that the
> > different snapshot searches for Intel BTS and Arm SPE were inconsistent
> > and I think all tracers can benefit from using the same pointer fixup
> > logic, so that gets refactored into the common auxtrace.c. Then SPE can
> > just share the Intel BTS search as it was obviously copied from it
> > originally. IntelPT keeps the more advanced duplicate data search, but
> > in the future that could probably be made the common one and all tracers
> > would benefit from using it (except maybe BTS if it always has a very
> > small buffer, but I doubt the overhead of the duplicate search would be
> > an issue). For now this is more of a refactor rather than behavioral
> > change so don't do that yet.
> >
> > Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
> > ---
> > Changes in v4:
> > - Change test snapshot size to 128K for 64K machines
> > - Put patchset depencency in cover letter text
> > - Link to v3: https://patch.msgid.link/20261102-james-cs-unformatted-per-thread-fix-v3-0-dbcb0c281b9b@xxxxxxxxxx
> >
> > Changes in v3:
> > - Keep the find_snapshot() callback instead of adding
> > snapshot_has_wrapped() and monotonic_snapshot_head boolean (Adrian)
> > - Add auxtrace_record__default_find_snapshot() for the simple search for
> > BTS and SPE (Adrian)
> > - Add auxtrace_record__snapshot_fixup() for any snapshot search
> > implementation to use to update the pointers (Adrian)
>
> Hi Adrian,
>
> Did you get a chance to check these changes? Sorry it took a while to send
> the V3 after your comments.

I've tried to apply it with Adrian's ack but it's didn't work. Can you
please rebase?

Thanks,
Namhyung