ANDROID: vendor_hooks: Add hooks to record the time of the process in various states
These hooks will do the following works: a) record the time of the process in various states b) Make corresponding optimization strategies in different hooks Bug: 205938967 Signed-off-by: Liujie Xie <xieliujie@oppo.com> Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
This commit is contained in:
@@ -312,6 +312,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_dequeue_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_entity_tick);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_enqueue_task_fair);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_dequeue_task_fair);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_stat_runtime_rt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prepare_update_load_avg_se);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_finish_update_load_avg_se);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_selinux_is_initialized);
|
||||
|
@@ -354,6 +354,10 @@ DECLARE_HOOK(android_vh_prepare_update_load_avg_se,
|
||||
TP_PROTO(struct sched_entity *se, int flags),
|
||||
TP_ARGS(se, flags));
|
||||
|
||||
DECLARE_HOOK(android_vh_sched_stat_runtime_rt,
|
||||
TP_PROTO(struct task_struct *tsk, u64 delta),
|
||||
TP_ARGS(tsk, delta));
|
||||
|
||||
DECLARE_HOOK(android_vh_finish_update_load_avg_se,
|
||||
TP_PROTO(struct sched_entity *se, int flags),
|
||||
TP_ARGS(se, flags));
|
||||
|
@@ -24,6 +24,8 @@
|
||||
|
||||
#include <trace/hooks/sched.h>
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_stat_runtime);
|
||||
|
||||
/*
|
||||
* Targeted preemption latency for CPU-bound tasks:
|
||||
*
|
||||
|
@@ -1026,6 +1026,8 @@ static void update_curr_rt(struct rq *rq)
|
||||
curr->se.exec_start = now;
|
||||
cgroup_account_cputime(curr, delta_exec);
|
||||
|
||||
trace_android_vh_sched_stat_runtime_rt(curr, delta_exec);
|
||||
|
||||
if (!rt_bandwidth_enabled())
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user