diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 52f41e2c5a9b..fda9a317b7c6 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -64,7 +64,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_start); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_enter); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume); diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index d1d86a011bcd..da18254308b5 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -229,7 +229,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, /* Take note of the planned idle state. */ sched_idle_set_state(target_state); - trace_android_vh_cpu_idle(0, index, dev->cpu); + trace_android_vh_cpu_idle_enter(&index, dev); trace_cpu_idle(index, dev->cpu); time_start = ns_to_ktime(local_clock()); @@ -244,7 +244,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, sched_clock_idle_wakeup_event(); time_end = ns_to_ktime(local_clock()); trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); - trace_android_vh_cpu_idle(PWR_EVENT_EXIT, entered_state, dev->cpu); + trace_android_vh_cpu_idle_exit(entered_state, dev); /* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state(NULL); diff --git a/include/trace/hooks/cpuidle.h b/include/trace/hooks/cpuidle.h index 826e98e37690..28b39f490ef8 100644 --- a/include/trace/hooks/cpuidle.h +++ b/include/trace/hooks/cpuidle.h @@ -11,11 +11,17 @@ #include #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) -DECLARE_HOOK(android_vh_cpu_idle, - TP_PROTO(int event, int state, int cpu), - TP_ARGS(event, state, cpu)) +struct cpuidle_device; + +DECLARE_HOOK(android_vh_cpu_idle_enter, + TP_PROTO(int *state, struct cpuidle_device *dev), + TP_ARGS(state, dev)) +DECLARE_HOOK(android_vh_cpu_idle_exit, + TP_PROTO(int state, struct cpuidle_device *dev), + TP_ARGS(state, dev)) #else -#define trace_android_vh_cpu_idle(event, state, cpu) +#define trace_android_vh_cpu_idle_enter(state, dev) +#define trace_android_vh_cpu_idle_exit(state, dev) #endif #endif /* _TRACE_HOOK_CPUIDLE_H */