From: Leo Yan <leo.yan@arm.com>
To: Amir Ayupov <aaupov@fb.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>,
Will Deacon <will@kernel.org>,
James Clark <james.clark@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>,
linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, coresight@lists.linaro.org
Subject: Re: [RFC] perf: SW strobing for AUX trace windows
Date: Mon, 23 Nov 2026 17:55:40 +0000 [thread overview]
Message-ID: <20261123175540.GE9176@e132581.arm.com> (raw)
In-Reply-To: <20261113074125.4146687-1-aaupov@fb.com>
On Thu, Nov 12, 2026 at 11:41:18PM -0800, Amir Ayupov wrote:
[...]
> pmu_pulse (coresight-only)
> ----------------------------------------------
>
> The first attempt was to try to avoid perf/core entirely, and extend
> a coresight config with pulsing ETE external output on every cycle
> while tracing is enabled [1]. This way, pause event on TRCEXTOUTn
> ends the window after exacly N traced cycles. The use of ETE external
> output is pure coincidence, just a way to count cycles only while
> tracing is enabled.
>
> However, the review has raised that the config is not self-contained
> and requires a lot of checks to only enable it on capable HW:
> - needs a helper in the arm64 PMUv3 header and a move of PMU
> definitions - needs arm64 maintainer's approval;
> - only works on ETE whose PMU counts TRCEXTOUTn,
> - the window is always measured in traced cycles;
> - is restricted to ETM, doesn't help Intel PT,
> - the further it is from a pure config change, the less understanding
> I have to support the patch series further.
>
> I decided to abandon that approach and ask for a better/more general
> solution, hence this RFC.
I saw you have sent CoreSight and PMU pulse v6, I will review it.
It is a good improvement for me.
> Option 3: cross-event "arming" (attr.aux_pause_armed)
> ---------------------------------------------------------------------
>
> This extends aux-action with a new bit (aux_pause_armed):
> - aux pause event period is set in an overflow of aux resume in group,
> - restarts from the full period,
> - on overflow, pauses aux tracing:
>
> This is the most flexible and general solution:
> ```
> # resume every 10M cycles, trace 5000 cycles
> -e '{cs_etm/aux-action=start-paused/,
> cycles/aux-action=resume,period=10000000/,
> cycles/aux-action=pause-armed,period=5000,call-graph=fp/}'
>
> # resume on page faults, trace 100k instructions
> -e '{intel_pt/aux-action=start-paused/,
> page-faults/aux-action=resume/,
> instructions/aux-action=pause-armed,period=100000/}'
> ```
I am just wandering if we can extend a bit "aux-action" syntax to
support delta value, something like:
-e '{cs_etm/aux-action=start-paused/,
cycles/aux-action=resume,period=10000000/,
cycles/aux-action=pause,period=+5000,call-graph=fp/}'
The + symbol indicates that the pause event occurs 5,000 cycles after
the resume event.
> Cons:
> 1. the core has to keep a disarmed event stopped across group
> scheduling, throttling, ioc_period, power mgmt.
> 2. rearming happens in the overflow handler (in NMI/IRQ).
> 3. Software pause events are not supported.
Why here software pause event cannot be supported?
> Question
> ---------
>
> Does it sound reasonable for perf to support this, or it's better
> to pursue pt/coresight-specific solutions? In the end, my use case
> is about tracing.
I think you are asking perf core maintainers to explore a proper way to
move forward. If no feedback, it is good to send RFC series to
demonstrate idea if you have a preference.
> If yes, which option is preferable?
> - Option 1 with restoring first period behavior that was already there,
> - option 2 as cleaner fix,
> - option 3 as completely general but with more core state to track,
> - something else?
Seems to me, if we extend a bit with "+" syntax, this can be general
enough to benefit all AUX trace. And we don't need to introduce extra
new interface.
Thanks,
Leo
prev parent reply other threads:[~2026-11-23 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 7:41 [RFC] perf: SW strobing for AUX trace windows Amir Ayupov
2026-11-23 17:55 ` Leo Yan [this message]
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=20261123175540.GE9176@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=aaupov@fb.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--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@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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