linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/8] perf auxtrace: Support multiple AUX events
@ 2024-08-23 11:32 Leo Yan
  2024-08-23 11:32 ` [PATCH v6 1/8] perf/core: Allow multiple AUX PMU events with the same module Leo Yan
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Leo Yan @ 2024-08-23 11:32 UTC (permalink / raw)
  To: Peter Zijlstra, Adrian Hunter, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Jiri Olsa, Ian Rogers, Liang, Kan,
	Suzuki K Poulose, Mike Leach, James Clark, John Garry,
	Will Deacon, Yicong Yang, Jonathan Cameron, linux-perf-users,
	linux-kernel, linux-arm-kernel, coresight
  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.

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.

Patches 02 and 03 are refactoring with using evsel__is_aux_event().

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

Patches 05, 06, 07 are to support multiple AUX events for buffer mapped
index.

Patch 08 is to support multiple Arm SPE events during report phase.

The patch series has been tested with multiple Arm SPE events (arm_spe_0
and arm_spe_1). And verified this patch series on Intel-PT test for no
regression.

Changes from v5:
- Changed to comparing string "arm_spe" in patch 08, as "arm_spe"
  is a general even name and passed Arm SPE test.

Changes from v4:
- Used 'evsel->name' to replace 'evsel->pmu_name' in patch 08.

Changes from v3:
- Changed to compare .setup_aux() callback in patch 01 (Peter.Z).
- Picked up patches 02 / 03 with evsel__is_aux_event() refactoring.
- Added new patch 08.

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 (8):
  perf/core: Allow multiple AUX PMU events with the same module
  perf auxtrace: Use evsel__is_aux_event() for checking AUX event
  perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record
  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
  perf arm-spe: Support multiple events in arm_spe_evsel_is_auxtrace()

 kernel/events/core.c                  |   9 +-
 tools/perf/arch/arm/util/cs-etm.c     |   1 -
 tools/perf/arch/arm64/util/arm-spe.c  |   1 -
 tools/perf/arch/arm64/util/hisi-ptt.c |   1 -
 tools/perf/arch/x86/util/intel-bts.c  |   1 -
 tools/perf/arch/x86/util/intel-pt.c   |   1 -
 tools/perf/builtin-record.c           |   4 +
 tools/perf/util/arm-spe.c             |  11 +--
 tools/perf/util/auxtrace.c            | 114 +++++++++++++++++++++++---
 tools/perf/util/auxtrace.h            |   8 +-
 10 files changed, 125 insertions(+), 26 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-09-05  7:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 11:32 [PATCH v6 0/8] perf auxtrace: Support multiple AUX events Leo Yan
2024-08-23 11:32 ` [PATCH v6 1/8] perf/core: Allow multiple AUX PMU events with the same module Leo Yan
2024-08-23 11:40   ` Leo Yan
2024-09-03 10:06   ` Adrian Hunter
2024-09-04 19:35     ` Leo Yan
2024-09-05  7:13       ` Adrian Hunter
2024-08-23 11:33 ` [PATCH v6 2/8] perf auxtrace: Use evsel__is_aux_event() for checking AUX event Leo Yan
2024-08-23 11:33 ` [PATCH v6 3/8] perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record Leo Yan
2024-08-23 11:33 ` [PATCH v6 4/8] perf auxtrace: Introduce auxtrace_record__validate_events() Leo Yan
2024-09-03 15:26   ` Adrian Hunter
2024-09-04 21:13     ` Leo Yan
2024-09-05  6:44       ` Adrian Hunter
2024-08-23 11:33 ` [PATCH v6 5/8] perf auxtrace: Refactor evlist__enable_event_idx() Leo Yan
2024-09-03 18:39   ` Adrian Hunter
2024-08-23 11:33 ` [PATCH v6 6/8] perf auxtrace: Bails out after finding the event for the map index Leo Yan
2024-09-03 18:41   ` Adrian Hunter
2024-08-23 11:33 ` [PATCH v6 7/8] perf auxtrace: Iterate all AUX events when finish reading Leo Yan
2024-08-23 11:33 ` [PATCH v6 8/8] perf arm-spe: Support multiple events in arm_spe_evsel_is_auxtrace() Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).