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>,
James Clark <james.clark@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Leo Yan <leo.yan@arm.com>
Subject: [PATCH v1 0/6] perf auxtrace: Support multiple AUX events
Date: Sun, 21 Jul 2024 21:21:07 +0100 [thread overview]
Message-ID: <20240721202113.380750-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 is a minor refactoring for dereference PMU pointer from evsel
structure.
Patches 02, 03 and 04 are to use the 'auxtrace' flag for support multiple
AUX events. Firstly, we need to set the 'auxtrace' flag for Arm and s390
AUX events (Intel PT and bts have set already it). Afterwards, 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.
Patches 05 and 06 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.
This patch series has been tested with the normal 'perf record' command
and 'perf mem record' command. And verified for the decoding commands
'perf script' and 'perf mem report'.
I observed one prominent issue is for per-CPU profiling. For example,
when specifying option '-C 2' for profiling on CPU2, in this case the
'arm_spe_0' event supports CPU2 but the 'arm_spe_1' event does not
support the CPU. As a result, 'arm_spe_1' event reports failure. This
is likely a common issue for support Per-CPU profiling with multiple
PMU events and every PMU event only support partial CPUs. This issue
will be addressed later.
Leo Yan (6):
perf pmu: Directly use evsel's PMU pointer
perf auxtrace arm: Set the 'auxtrace' flag for AUX events
perf auxtrace s390: Set the 'auxtrace' flag for AUX events
perf auxtrace: Iterate all AUX events when finish reading
perf arm-spe: Extract evsel setting up
perf arm-spe: Support multiple Arm SPE events
tools/perf/arch/arm/util/pmu.c | 3 +
tools/perf/arch/arm64/util/arm-spe.c | 107 ++++++++++++++++-----------
tools/perf/arch/s390/util/auxtrace.c | 1 +
tools/perf/util/auxtrace.c | 15 +++-
tools/perf/util/pmu.c | 2 +-
5 files changed, 78 insertions(+), 50 deletions(-)
--
2.34.1
next reply other threads:[~2024-07-21 20:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-21 20:21 Leo Yan [this message]
2024-07-21 20:21 ` [PATCH v1 1/6] perf pmu: Directly use evsel's PMU pointer Leo Yan
2024-07-22 10:40 ` Adrian Hunter
2024-07-22 14:34 ` Leo Yan
2024-07-22 16:16 ` Ian Rogers
2024-07-22 21:11 ` Leo Yan
2024-07-21 20:21 ` [PATCH v1 2/6] perf auxtrace arm: Set the 'auxtrace' flag for AUX events Leo Yan
2024-07-22 10:49 ` Adrian Hunter
2024-07-22 14:36 ` Leo Yan
2024-07-21 20:21 ` [PATCH v1 3/6] perf auxtrace s390: " Leo Yan
2024-07-22 10:54 ` Adrian Hunter
2024-07-22 14:48 ` Leo Yan
2024-07-21 20:21 ` [PATCH v1 4/6] perf auxtrace: Iterate all AUX events when finish reading Leo Yan
2024-07-22 11:13 ` Adrian Hunter
2024-07-22 15:09 ` Leo Yan
2024-07-22 15:59 ` Adrian Hunter
2024-07-22 20:52 ` Leo Yan
2024-08-01 1:38 ` Ian Rogers
2024-08-01 15:04 ` Arnaldo Carvalho de Melo
2024-08-03 15:51 ` Leo Yan
2024-07-21 20:21 ` [PATCH v1 5/6] perf arm-spe: Extract evsel setting up Leo Yan
2024-07-21 20:21 ` [PATCH v1 6/6] perf arm-spe: Support multiple Arm SPE 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=20240721202113.380750-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-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.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 \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®