ANDROID: sched: Add vendor hook for rt util update
Vendor may have need to track rt util. Bug: 201261299 Signed-off-by: Rick Yiu <rickyiu@google.com> Change-Id: I2f4e5142c6bc8574ee3558042e1fb0dae13b702d
This commit is contained in:
parent
6d97f75abc
commit
2490ab50e7
@ -422,6 +422,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_blocked_fair,
|
||||
TP_PROTO(struct rq *rq),
|
||||
TP_ARGS(rq), 1);
|
||||
|
||||
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);
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
@ -1848,6 +1848,7 @@ static inline void set_next_task_rt(struct rq *rq, struct task_struct *p, bool f
|
||||
*/
|
||||
if (rq->curr->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);
|
||||
}
|
||||
@ -1918,6 +1919,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
|
||||
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);
|
||||
|
||||
/*
|
||||
* The previous task needs to be made eligible for pushing
|
||||
@ -2737,6 +2739,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);
|
||||
|
||||
|
@ -107,3 +107,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_detach_entity_load_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_load_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_remove_entity_load_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_blocked_fair);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_rt_rq_load_avg);
|
||||
|
Loading…
Reference in New Issue
Block a user