@@ -149,6 +149,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_driver *drv,
instrumentation_begin();
+ trace_cpu_idle(index, dev->cpu);
time_start = ns_to_ktime(local_clock_noinstr());
tick_freeze();
@@ -174,6 +175,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_driver *drv,
start_critical_timings();
time_end = ns_to_ktime(local_clock_noinstr());
+ trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
dev->states_usage[index].s2idle_time += ktime_us_delta(time_end, time_start);
dev->states_usage[index].s2idle_usage++;
Add the tracepoint cpu_idle in enter_s2idle_proper() for tracing the s2idle enter and exit events with a determined idle state. Signed-off-by: qiwu.chen <qiwu.chen@transsion.com> Changes in v2: - fix the build warning reported by kernel test robot in v1: https://lore.kernel.org/all/20250520030922.9505-1-qiwu.chen@transsion.com/ --- drivers/cpuidle/cpuidle.c | 2 ++ 1 file changed, 2 insertions(+)