mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] perf auxtrace: Support multiple AUX events
@ 2024-08-06 20:48 Leo Yan
  2024-08-06 20:48 ` [PATCH v3 1/5] perf/core: Allow multiple AUX PMU events with the same module Leo Yan
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Leo Yan @ 2024-08-06 20:48 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Ian Rogers, Adrian Hunter, Liang,
	Kan, James Clark, linux-perf-users, linux-kernel
  Cc: Leo Yan

This series is to support multiple events with the *same* type in Perf
AUX trace. As the events are same type, the trace data shares the same
format and can be decoded by the same decoder.

This patch series is dependent on auxtrace refactoring patch series:
https://lore.kernel.org/lkml/20240806204130.720977-1-leo.yan@arm.com/T/#mae62825a677381797a13252c1d071caf18d957d7

Note, a more complex case - different types of AUX events, (e.g. Arm
CoreSight event and Arm SPE events are enabled simultaneously) - is
still not supported.

Patch 01 is to change the perf core layer in the kernel to allow
multiple AUX events to output to single FD, so that '--per-thread' mode
can be supported.

Patch 02 validates the AUX events' CPU map. It presumes the AUX events
do not overlap for CPU maps, otherwise, it returns failure.

Patches 03, 04, 05 is to support multiple AUX events for buffer mapped
index.

As the first enabled instance, the patch series has been tested with
multiple Arm SPE events (e.g. arm_spe_0, arm_spe_1, etc). And verified
this patch series on Intel-PT for no regression.


Changes from v2:
- Added patch 01 for support per-thread mode (Adrian).
- Added patch 02 for verifying CPU maps without overlapping (Adrian).
- Reworked patches to fix the regression on Intel-PT (Ian).

Changes from v1:
- Added comment in patch 01 for iterating AUX events (Adrian)
- Added patch 02 for removing unused field 'pmu' (Adrian)


Leo Yan (5):
  perf/core: Allow multiple AUX PMU events with the same module
  perf auxtrace: Introduce auxtrace_record__validate_events()
  perf auxtrace: Refactor evlist__enable_event_idx()
  perf auxtrace: Bails out after finding the event for the map index
  perf auxtrace: Iterate all AUX events when finish reading

 kernel/events/core.c        |   3 +-
 tools/perf/builtin-record.c |   4 ++
 tools/perf/util/auxtrace.c  | 110 ++++++++++++++++++++++++++++++++----
 tools/perf/util/auxtrace.h  |   7 +++
 4 files changed, 113 insertions(+), 11 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-08-06 21:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-06 20:48 [PATCH v3 0/5] perf auxtrace: Support multiple AUX events Leo Yan
2024-08-06 20:48 ` [PATCH v3 1/5] perf/core: Allow multiple AUX PMU events with the same module Leo Yan
2024-08-06 21:14   ` Peter Zijlstra
2024-08-06 21:51     ` Leo Yan
2024-08-06 20:48 ` [PATCH v3 2/5] perf auxtrace: Introduce auxtrace_record__validate_events() Leo Yan
2024-08-06 20:48 ` [PATCH v3 3/5] perf auxtrace: Refactor evlist__enable_event_idx() Leo Yan
2024-08-06 20:48 ` [PATCH v3 4/5] perf auxtrace: Bails out after finding the event for the map index Leo Yan
2024-08-06 20:48 ` [PATCH v3 5/5] perf auxtrace: Iterate all AUX events when finish reading Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®