ANDROID: vendor_hooks: Add hook for binder
Add hook to support oem's performance feature.
Bug: 186482511
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: Ib495e80e569cc293eaa98d87a050aee8915eb415
(cherry picked from commit 2337b9185a)
This commit is contained in:
@@ -751,12 +751,17 @@ static void binder_transaction_priority(struct binder_thread *thread,
|
|||||||
.sched_policy = node->sched_policy,
|
.sched_policy = node->sched_policy,
|
||||||
.prio = node->min_priority,
|
.prio = node->min_priority,
|
||||||
};
|
};
|
||||||
|
bool skip = false;
|
||||||
|
|
||||||
if (t->set_priority_called)
|
if (t->set_priority_called)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
t->set_priority_called = true;
|
t->set_priority_called = true;
|
||||||
|
|
||||||
|
trace_android_vh_binder_priority_skip(task, &skip);
|
||||||
|
if (skip)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!node->inherit_rt && is_rt_policy(desired.sched_policy)) {
|
if (!node->inherit_rt && is_rt_policy(desired.sched_policy)) {
|
||||||
desired.prio = NICE_TO_PRIO(0);
|
desired.prio = NICE_TO_PRIO(0);
|
||||||
desired.sched_policy = SCHED_NORMAL;
|
desired.sched_policy = SCHED_NORMAL;
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale);
|
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_is_fpsimd_save);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_priority_skip);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority);
|
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_restore_priority);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_ilocked);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_ilocked);
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ struct seq_file;
|
|||||||
DECLARE_HOOK(android_vh_binder_transaction_init,
|
DECLARE_HOOK(android_vh_binder_transaction_init,
|
||||||
TP_PROTO(struct binder_transaction *t),
|
TP_PROTO(struct binder_transaction *t),
|
||||||
TP_ARGS(t));
|
TP_ARGS(t));
|
||||||
|
DECLARE_HOOK(android_vh_binder_priority_skip,
|
||||||
|
TP_PROTO(struct task_struct *task, bool *skip),
|
||||||
|
TP_ARGS(task, skip));
|
||||||
DECLARE_HOOK(android_vh_binder_set_priority,
|
DECLARE_HOOK(android_vh_binder_set_priority,
|
||||||
TP_PROTO(struct binder_transaction *t, struct task_struct *task),
|
TP_PROTO(struct binder_transaction *t, struct task_struct *task),
|
||||||
TP_ARGS(t, task));
|
TP_ARGS(t, task));
|
||||||
|
|||||||
Reference in New Issue
Block a user