[PATCH v5 09/11] coresight: etm4x: Add flag to control single-shot restart
Suzuki K Poulose
suzuki.poulose at arm.com
Tue Nov 11 03:37:08 PST 2025
On 11/11/2025 10:18, Leo Yan wrote:
> On Tue, Nov 11, 2025 at 09:43:13AM +0000, Suzuki Kuruppassery Poulose wrote:
>
> [...]
>
>>> if (!is_idle_task(current)) {
>>> if (config->ss_ctrl[i] || config->ss_pe_cmp[i])
>>> config->ss_status[i] &= ~TRCSSCSRn_STATUS;
>>> }
>>
>> What happens when we do a system wide session and a CPU is running an
>> idle task ?
>
> For a system wide trace, the ETM device is enabled and disabled by
> the perf when the session start and finish.
>
> During the session:
>
> - If CPU off states are not enabled, nothing will happen in idle
> threads, as no CPU PM notifier will be invoked.
What is a CPU is running the idle task, when the system wide session
is activated ? Basing our decision to tune the ETM control on the
"active task being idle" feels fragile to me. This is purely a
decision under ETM driver, specific to the session you are dealing
with. Thus having it in the "config" is preferred and is cleaner.
Suzuki
>
> - If CPU off states have been enabled, CPU PM notifier will save and
> restore ETM device context, and keep single-shot status. This is
> same with current save/restore flow.
>
> I don't see any issue for this.
>
> Thanks,
> Leo
More information about the linux-arm-kernel
mailing list