From: James Clark <james.clark@linaro.org>
To: John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
George Wort <George.Wort@arm.com>,
Graham Woodward <Graham.Woodward@arm.com>,
Ben Gainey <Ben.Gainey@arm.com>,
Michael Williams <Michael.Williams@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
James Clark <james.clark@linaro.org>
Subject: [PATCH 1/4] perf arm-spe: Show instruction sample types by default
Date: Mon, 08 Sep 2025 13:10:18 +0100 [thread overview]
Message-ID: <20250908-james-perf-spe-period-v1-1-7ccd805af461@linaro.org> (raw)
In-Reply-To: <20250908-james-perf-spe-period-v1-0-7ccd805af461@linaro.org>
Instruction sample types are enabled in the default itrace options in
Perf, but this never applied to SPE because the default nanoseconds
period isn't supported. This meant that instructions ended up being
opt-in by the user only when they requested an instruction based period.
Change the default period type to instructions so that instruction
samples are generated by default. This can overridden by specifying any
--itrace option.
This solves a common complaint from users that the unfiltered SPE
samples appear to be missing, and only the samples that have memory
flags set appear in the various memory groups.
Signed-off-by: James Clark <james.clark@linaro.org>
---
tools/perf/util/arm-spe.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 8942fa598a84..b33a0a170ef8 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -1871,10 +1871,14 @@ int arm_spe_process_auxtrace_info(union perf_event *event,
if (dump_trace)
return 0;
- if (session->itrace_synth_opts && session->itrace_synth_opts->set)
+ if (session->itrace_synth_opts && session->itrace_synth_opts->set) {
spe->synth_opts = *session->itrace_synth_opts;
- else
+ } else {
itrace_synth_opts__set_default(&spe->synth_opts, false);
+ /* Default nanoseconds period not supported */
+ spe->synth_opts.period_type = PERF_ITRACE_PERIOD_INSTRUCTIONS;
+ spe->synth_opts.period = 1;
+ }
err = arm_spe_synth_events(spe, session);
if (err)
--
2.34.1
next prev parent reply other threads:[~2025-09-08 12:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 12:10 [PATCH 0/4] perf arm-spe: Improve --itrace options James Clark
2025-09-08 12:10 ` James Clark [this message]
2025-09-08 12:10 ` [PATCH 2/4] perf arm-spe: Downsample all sample types equally James Clark
2025-09-09 9:47 ` Leo Yan
2025-09-08 12:10 ` [PATCH 3/4] perf arm-spe: Display --itrace period warnings for all sample types James Clark
2025-09-08 12:10 ` [PATCH 4/4] perf docs: Update SPE doc to include default instructions group James Clark
2025-09-08 21:16 ` [PATCH 0/4] perf arm-spe: Improve --itrace options Arnaldo Carvalho de Melo
2025-09-09 9:51 ` James Clark
2025-09-09 12:21 ` James Clark
2025-09-09 10:13 ` 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=20250908-james-perf-spe-period-v1-1-7ccd805af461@linaro.org \
--to=james.clark@linaro.org \
--cc=Ben.Gainey@arm.com \
--cc=George.Wort@arm.com \
--cc=Graham.Woodward@arm.com \
--cc=Michael.Williams@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linux.dev \
--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=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).