diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 0cffc3b7ed81..e0b36c9af117 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -729,6 +729,7 @@ static void binder_transaction_priority(struct task_struct *task, bool inherit_rt) { struct binder_priority desired_prio = t->priority; + bool skip = false; if (t->set_priority_called) return; @@ -737,6 +738,10 @@ static void binder_transaction_priority(struct task_struct *task, t->saved_priority.sched_policy = task->policy; t->saved_priority.prio = task->normal_prio; + trace_android_vh_binder_transaction_priority_skip(task, &skip); + if (skip) + return; + if (!inherit_rt && is_rt_policy(desired_prio.sched_policy)) { desired_prio.prio = NICE_TO_PRIO(0); desired_prio.sched_policy = SCHED_NORMAL; diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 272870bf20cd..66e09ebc4c52 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -75,6 +75,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale); 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_transaction_priority_skip); 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_ilocked); diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index 1599eb613c45..b00018dab116 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -20,6 +20,9 @@ struct binder_transaction_data; DECLARE_HOOK(android_vh_binder_transaction_init, TP_PROTO(struct binder_transaction *t), TP_ARGS(t)); +DECLARE_HOOK(android_vh_binder_transaction_priority_skip, + TP_PROTO(struct task_struct *task, bool *skip), + TP_ARGS(task, skip)); DECLARE_HOOK(android_vh_binder_set_priority, TP_PROTO(struct binder_transaction *t, struct task_struct *task), TP_ARGS(t, task));