[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31dd8c5d-0bc4-4d84-9ac9-7ca248e952cf@arm.com>
Date: Mon, 27 Jan 2025 12:16:51 +0000
From: Christian Loehle <christian.loehle@....com>
To: Keita Morisaki <keyz@...gle.com>, rostedt@...dmis.org,
mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
lpieralisi@...nel.org, sudeep.holla@....com, rafael@...nel.org,
daniel.lezcano@...aro.org, linux-pm@...r.kernel.org
Cc: aarontian@...gle.com, yimingtseng@...gle.com
Subject: Re: [PATCH v2] cpuidle: psci: Add trace for PSCI domain idle
On 1/20/25 01:36, Keita Morisaki wrote:
> The trace event cpu_idle provides insufficient information for debugging
> PSCI requests due to lacking access to determined PSCI domain idle
> states. The cpu_idle usually only shows -1, 0, or 1 regardless how many
> idle states the power domain has.
>
> Add new trace events namely psci_domain_idle_enter and
> psci_domain_idle_exit to trace enter and exit events with a determined
> idle state.
>
> These new trace events will help developers debug CPUidle issues on ARM
> systems using PSCI by providing more detailed information about the
> requested idle states.
>
> Signed-off-by: Keita Morisaki <keyz@...gle.com>
> ---
> v1->v2: Split the ftrace event into two (psci_domain_idle_(enter|exit))
> and rephrase the commit message accordingly. Rebased onto the latest.
Which makes it different to cpu_idle event FWIW.
>
> drivers/cpuidle/cpuidle-psci.c | 3 +++
> include/trace/events/power.h | 37 ++++++++++++++++++++++++++++++++++
> 2 files changed, 40 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 2562dc001fc1..dd8d776d6e39 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -25,6 +25,7 @@
> #include <linux/syscore_ops.h>
>
> #include <asm/cpuidle.h>
> +#include <trace/events/power.h>
>
> #include "cpuidle-psci.h"
> #include "dt_idle_states.h"
> @@ -74,7 +75,9 @@ static __cpuidle int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
> if (!state)
> state = states[idx];
>
> + trace_psci_domain_idle_enter(dev->cpu, state, s2idle);
> ret = psci_cpu_suspend_enter(state) ? -1 : idx;
> + trace_psci_domain_idle_exit(dev->cpu, state, s2idle);
Not tracking ret seems odd, is that fine?
Powered by blists - more mailing lists