From: James Clark <james.clark@linaro.org>
To: Ian Rogers <irogers@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>,
John Garry <john.g.garry@oracle.com>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>,
Graham Woodward <graham.woodward@arm.com>,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH 5/5] perf docs: arm_spe: Document new discard mode
Date: Wed, 18 Dec 2024 10:07:45 +0000 [thread overview]
Message-ID: <8c15786c-47b6-47ff-b1dc-ecbf32d582fb@linaro.org> (raw)
In-Reply-To: <CAP-5=fU7RNzvzxBcAQy3RT9Ge3YtqPhDonupNWS7Wgb8HGQkGg@mail.gmail.com>
On 18/12/2024 12:54 am, Ian Rogers wrote:
> On Tue, Dec 17, 2024 at 3:56 AM James Clark <james.clark@linaro.org> wrote:
>>
>> Document the flag, hint what it's used for and give an example with
>> other useful options to get minimal output.
>>
>> Signed-off-by: James Clark <james.clark@linaro.org>
>> ---
>> tools/perf/Documentation/perf-arm-spe.txt | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/tools/perf/Documentation/perf-arm-spe.txt b/tools/perf/Documentation/perf-arm-spe.txt
>> index de2b0b479249..588eead438bc 100644
>> --- a/tools/perf/Documentation/perf-arm-spe.txt
>> +++ b/tools/perf/Documentation/perf-arm-spe.txt
>> @@ -150,6 +150,7 @@ arm_spe/load_filter=1,min_latency=10/'
>> pct_enable=1 - collect physical timestamp instead of virtual timestamp (PMSCR.PCT) - requires privilege
>> store_filter=1 - collect stores only (PMSFCR.ST)
>> ts_enable=1 - enable timestamping with value of generic timer (PMSCR.TS)
>> + discard=1 - enable SPE PMU events but don't collect sample data - see 'Discard mode' (PMBLIMITR.FM = DISCARD)
>>
>> +++*+++ Latency is the total latency from the point at which sampling started on that instruction, rather
>> than only the execution latency.
>> @@ -220,6 +221,16 @@ Common errors
>>
>> Increase sampling interval (see above)
>>
>> +Discard mode
>> +~~~~~~~~~~~~
>> +
>> +SPE PMU events can be used without the overhead of collecting sample data if
>> +discard mode is supported (optional from Armv8.6). First run a system wide SPE
>> +session (or on the core of interest) using options to minimize output. Then run
>> +perf stat:
>> +
>> + perf record -e arm_spe/discard/ -a -N -B --no-bpf-event -o - > /dev/null &
>> + perf stat -e SAMPLE_FEED_LD
>
> Perhaps clarify this should be an ARM SPE event? It seems strange to
> have one perf command affect a later one, the purpose of things like
> event multiplexing is to hide the hardware limits. I'd prefer if the
> last bit was like:
> ```
> Then run perf stat with an SPE event on the same PMU:
>
> perf record -e arm_spe/discard/ -a -N -B --no-bpf-event -o - > /dev/null &
> perf stat -e arm_spe/SAMPLE_FEED_LD/
> ``
>
> Thanks,
> Ian
Hi Ian,
Confusingly this isn't an SPE event, it is a normal PMU event. The fact
that one Perf command affects the other is because these events only
count when SPE is enabled. When it's enabled it has an effect on a
per-core level which is why in the example I made it simpler by enabling
SPE system wide.
SPE is an exclusive PMU like Coresight and some others so it can't be
affected by multiplexing or anything like that. The SAMPLE_FEED_LD PMU
would be, but as long as SPE stays enabled it will count the right thing
regardless of multiplexing.
THanks
James
next prev parent reply other threads:[~2024-12-18 10:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 11:56 [PATCH 0/5] perf: arm_spe: Add format option for discard mode James Clark
2024-12-17 11:56 ` [PATCH 1/5] " James Clark
2024-12-17 11:56 ` [PATCH 2/5] perf tool: arm-spe: Pull out functions for aux buffer and tracking setup James Clark
2024-12-17 11:56 ` [PATCH 3/5] perf tool: arm-spe: Don't allocate buffer or tracking event in discard mode James Clark
2024-12-17 11:56 ` [PATCH 4/5] perf test: arm_spe: Add test for " James Clark
2024-12-17 11:56 ` [PATCH 5/5] perf docs: arm_spe: Document new " James Clark
2024-12-18 0:54 ` Ian Rogers
2024-12-18 10:07 ` James Clark [this message]
2024-12-18 19:47 ` Ian Rogers
2024-12-19 10:10 ` James Clark
2024-12-18 10:39 ` [PATCH 0/5] perf: arm_spe: Add format option for " Yeo Reum Yun
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=8c15786c-47b6-47ff-b1dc-ecbf32d582fb@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bpf@vger.kernel.org \
--cc=graham.woodward@arm.com \
--cc=irogers@google.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--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).