[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250118072438.3647805-1-keyz@google.com>
Date: Sat, 18 Jan 2025 15:24:38 +0800
From: Keita Morisaki <keyz@...gle.com>
To: rostedt@...dmis.org
Cc: aarontian@...gle.com, daniel.lezcano@...aro.org, keyz@...gle.com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, lpieralisi@...nel.org,
mathieu.desnoyers@...icios.com, mhiramat@...nel.org, rafael@...nel.org,
sudeep.holla@....com, yimingtseng@...gle.com
Subject: Re: [PATCH] cpuidle: psci: Add trace for PSCI domain idle
Thank you for the review!
> Why not make that into two different events:
> + 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);
> Then make the above into a DECLARE_EVENT_CLASS:
> DECLARE_EVENT_CLASS(psci_domain_idle_template,
> TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle),
> TP_ARGS(cpu_id, state, s2idle),
> TP_STRUCT__entry(
> __field(u32, cpu_id)
> __field(u32, state)
> __field(bool, s2idle)
> ),
> TP_fast_assign(
> __entry->cpu_id = cpu_id;
> __entry->state = state;
> __entry->s2idle = s2idle;
> ),
> TP_printk("cpu_id=%lu state=0x%lx type=%s, is_s2idle=%s",
> (unsigned long)__entry->cpu_id, (unsigned long)__entry->state,
> (__entry->s2idle)?"yes":"no")
> );
> DEFINE_EVENT(psci_domain_idle_template, psci_domain_idle_enter,
> TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle),
> TP_ARGS(cpu_id, state, s2idle),
> );
> DEFINE_EVENT(psci_domain_idle_template, psci_domain_idle_exit,
> TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle),
> TP_ARGS(cpu_id, state, s2idle),
> );
Looks good. Let me apply this change in v2.
Thanks,
Keita
Powered by blists - more mailing lists