Re: [PATCH v2 06/14] perf auxtrace: Turn Intel BTS snapshot search into a generic one

[email protected]
Newsgroups org.kernel.vger.linux-perf-users
Message-ID <[email protected]>
> Currently each auxtrace user has to implement both the snapshot search
> and the logic to fixup the 'head' and 'old' values after finding a wrap.
> IntelPT and BTS have the same fixup logic but different wrap searches.
> BTS and Arm SPE have the same search but SPE modifies head differently
> (although it probably shouldn’t), and Arm Coresight doesn't have a
> search at all, but later it will want its own search and same fixup
> logic.
> 
> Start moving towards a system where the pointers are always fixed up in
> the same way by auxtrace.c, and users only have to provide a search
> function or can use the generic one without reimplementing it.
> 
> The new auxtrace_find_snapshot() calls the search callback if it's
> implemented, handles pointer fixup in a consistent way and is based on
> intel_bts_find_snapshot(). auxtrace_record__has_wrapped() is the generic
> search function based on intel_bts_has_wrapped() and includes the
> caching from intel_bts_find_snapshot(). The old find_snapshot callback
> will eventually be removed.
> 
> No functional changes intended apart from changing the pr_debug3()s
> to print hex to match __auxtrace_mmap__read() and no longer leaking
> snapshot_refs when expanding the array length.
> 
> Signed-off-by: James Clark <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260821-james-cs-unformatted-per-thread-fix-v2-0-00c4fd0701b4@linaro.org?part=6
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.