linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	James Clark <james.clark@linaro.org>,
	John Garry <john.g.garry@oracle.com>,
	Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@kernel.org>,
	coresight@lists.linaro.org, linux-perf-users@vger.kernel.org
Cc: Leo Yan <leo.yan@arm.com>
Subject: [PATCH v2 0/4] perf auxtrace: Support multiple AUX events
Date: Thu, 25 Jul 2024 07:46:16 +0100	[thread overview]
Message-ID: <20240725064620.1651819-1-leo.yan@arm.com> (raw)

This series is to support multiple events with the *same* type in Perf
AUX trace. As the first enabled instance, the patch series enables
multiple Arm SPE events (e.g. arm_spe_0, arm_spe_1, etc) in AUX trace.

The solution for support multiple AUX events with same type is not
difficult. As the events are same type, the trace data shares the same
format and can be decoded by the same decoder. Essentially, this patch
series is to extend the AUX trace flow from support single PMU event to
multiple events.

Note, this series does not support a more complex case - different types
of AUX events, (e.g. Arm CoreSight event and Arm SPE events are enabled
simultaneously).

Patch 01 are to use the 'auxtrace' flag for support multiple AUX events.
By using the evsel__is_aux_event() function, the core layer iterates the
whole evlist - which allows the buffer index can be matched to
corresponding AUX event.

Patch 02 is a cleanup for removing unused 'pmu' pointer in the
auxtrace_record structure.

Patches 03 and 04 are to configure multiple SPE event in architecture
dependent code. The old code is only initialize the first AUX event.
with this series, it initializes all SPE PMU events.

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


Leo Yan (4):
  perf auxtrace: Iterate all AUX events when finish reading
  perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record
  perf arm-spe: Extract evsel setting up
  perf arm-spe: Support multiple Arm SPE events

 tools/perf/arch/arm/util/cs-etm.c     |   1 -
 tools/perf/arch/arm64/util/arm-spe.c  | 108 +++++++++++++++-----------
 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/util/auxtrace.c            |  25 ++++--
 tools/perf/util/auxtrace.h            |   1 -
 7 files changed, 82 insertions(+), 56 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-07-25  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  6:46 Leo Yan [this message]
2024-07-25  6:46 ` [PATCH v2 1/4] perf auxtrace: Iterate all AUX events when finish reading Leo Yan
2024-07-25 15:40   ` Adrian Hunter
2024-07-29  8:48     ` Leo Yan
2024-07-30 19:28       ` Arnaldo Carvalho de Melo
2024-07-25  6:46 ` [PATCH v2 2/4] perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record Leo Yan
2024-07-25 15:51   ` Adrian Hunter
2024-07-25  6:46 ` [PATCH v2 3/4] perf arm-spe: Extract evsel setting up Leo Yan
2024-07-25  6:46 ` [PATCH v2 4/4] perf arm-spe: Support multiple Arm SPE events Leo Yan
2024-07-25  7:06 ` [PATCH v2 0/4] perf auxtrace: Support multiple AUX events Leo Yan

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=20240725064620.1651819-1-leo.yan@arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=namhyung@kernel.org \
    --cc=suzuki.poulose@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).