ANDROID: vendor_hook: add trace_android_rvh_setscheduler_prio

To modify priority of specific tasks, add the vendor hook.

Bug: 409176857
Change-Id: Id5a2309378f1a8c3ecc1de71c20f44f73b3f7557
Signed-off-by: Chungkai Mei <chungkai@google.com>
Signed-off-by: Rick Yiu <rickyiu@google.com>
This commit is contained in:
Rick Yiu
2025-06-20 08:28:11 +00:00
committed by John Stultz
parent 41cfa0c6c7
commit 1195c63bae
3 changed files with 6 additions and 0 deletions

View File

@@ -80,6 +80,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler,
TP_PROTO(struct task_struct *p),
TP_ARGS(p), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler_prio,
TP_PROTO(struct task_struct *p),
TP_ARGS(p), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_replace_next_task_fair,
TP_PROTO(struct rq *rq, struct task_struct **p, struct task_struct *prev),
TP_ARGS(rq, p, prev), 1);

View File

@@ -8269,6 +8269,7 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
p->sched_class = next_class;
p->prio = prio;
trace_android_rvh_setscheduler_prio(p);
check_class_changing(rq, p, prev_class);

View File

@@ -26,6 +26,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_prepare_setprio);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice_locked);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler_prio);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_balance_find_src_group);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_jiffies_update);