diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index c6ff8503564a..5c47d4f91fe9 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -494,6 +494,10 @@ DECLARE_HOOK(android_vh_prio_restore, TP_PROTO(int saved_prio), TP_ARGS(saved_prio)); +DECLARE_RESTRICTED_HOOK(android_rvh_update_rt_rq_load_avg, + TP_PROTO(u64 now, struct rq *rq, struct task_struct *tsk, int running), + TP_ARGS(now, rq, tsk, running), 1); + /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_SCHED_H */ diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 4233e357061d..b57d95e1f678 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1805,6 +1805,7 @@ static inline void set_next_task_rt(struct rq *rq, struct task_struct *p, bool f */ if (rq->donor->sched_class != &rt_sched_class) update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 0); + trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 0); rt_queue_push_tasks(rq); } @@ -1865,6 +1866,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct task_s update_curr_rt(rq); update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1); + trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 1); if (task_is_blocked(p)) return; @@ -2783,6 +2785,7 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) update_curr_rt(rq); update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1); + trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 1); watchdog(rq, p); diff --git a/kernel/sched/vendor_hooks.c b/kernel/sched/vendor_hooks.c index c510ad83f49b..e03c7d1a79b2 100644 --- a/kernel/sched/vendor_hooks.c +++ b/kernel/sched/vendor_hooks.c @@ -128,3 +128,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_dequeue_entity_delayed); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prio_inheritance); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prio_restore); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_rt_rq_load_avg);