From 90bd50a4d7c7f31edaa37dbe28a30a2dd76ae997 Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Tue, 15 Dec 2020 00:33:55 -0800 Subject: [PATCH] ANDROID: binder: consolidate wakeup vendor hooks into one There are few vendor hooks available for binder wakeup related functionality. As they both essentially do the same thing, we can consolidate them into one. Bug: 174219217 Change-Id: I44b472e7564eecbe8236ad2eb88b0433195f14d8 Signed-off-by: Satya Durga Srinivasu Prabhala --- drivers/android/binder.c | 4 ++-- drivers/android/vendor_hooks.c | 3 +-- include/trace/hooks/binder.h | 8 ++------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index bce8e1baa643..5ae2f6b7baed 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -957,7 +957,7 @@ static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc, thread = rb_entry(n, struct binder_thread, rb_node); if (thread->looper & BINDER_LOOPER_STATE_POLL && binder_available_for_proc_work_ilocked(thread)) { - trace_android_vh_binder_wakeup_poll_threads_ilocked(thread->task); + trace_android_vh_binder_wakeup_ilocked(thread->task); if (sync) wake_up_interruptible_sync(&thread->wait); else @@ -1017,7 +1017,7 @@ static void binder_wakeup_thread_ilocked(struct binder_proc *proc, assert_spin_locked(&proc->inner_lock); if (thread) { - trace_android_vh_binder_wakeup_thread_ilocked(thread->task); + trace_android_vh_binder_wakeup_ilocked(thread->task); if (sync) wake_up_interruptible_sync(&thread->wait); else diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index e5d54fb5613e..499d434aaee0 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -50,8 +50,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_restore_priority); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_poll_threads_ilocked); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_thread_ilocked); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_ilocked); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_finished); diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index ffd9adb903c4..012b50bf7a0d 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -23,18 +23,14 @@ DECLARE_HOOK(android_vh_binder_set_priority, DECLARE_HOOK(android_vh_binder_restore_priority, TP_PROTO(struct binder_transaction *t, struct task_struct *task), TP_ARGS(t, task)); -DECLARE_HOOK(android_vh_binder_wakeup_poll_threads_ilocked, - TP_PROTO(struct task_struct *task), - TP_ARGS(task)); -DECLARE_HOOK(android_vh_binder_wakeup_thread_ilocked, +DECLARE_HOOK(android_vh_binder_wakeup_ilocked, TP_PROTO(struct task_struct *task), TP_ARGS(task)); #else #define trace_android_vh_binder_transaction_init(t) #define trace_android_vh_binder_set_priority(t, task) #define trace_android_vh_binder_restore_priority(t, task) -#define trace_android_vh_binder_wakeup_poll_threads_ilocked(task) -#define trace_android_vh_binder_wakeup_thread_ilocked(task) +#define trace_android_vh_binder_wakeup_ilocked(task) #endif #endif /* _TRACE_HOOK_BINDER_H */ /* This part must be outside protection */