ANDROID: vendor_hooks: Add hooks for account irqtime process tick

Add a hook in irqtime_account_process_tick, which helps to get
information about the high load task.

Bug: 187904818

Change-Id: I644f7d66b09d047ca6b0a0fbd2915a6387c8c007
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit fe580539f6cec43ddb0d6ecfd39aa2f4e45754ca)
(cherry picked from commit bf3b384e0876a3111d114392b405ed269dcb9c9e)
This commit is contained in:
Liangliang Li 2021-05-12 18:25:07 +08:00 committed by Treehugger Robot
parent 3b573277d4
commit 527e7b1ee8
3 changed files with 6 additions and 0 deletions

View File

@ -258,6 +258,10 @@ DECLARE_HOOK(android_vh_free_task,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));
DECLARE_HOOK(android_vh_irqtime_account_process_tick,
TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks),
TP_ARGS(p, rq, user_tick, ticks));
enum uclamp_id;
struct uclamp_se;
DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get,

View File

@ -418,6 +418,7 @@ static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
} else {
account_system_index_time(p, cputime, CPUTIME_SYSTEM);
}
trace_android_vh_irqtime_account_process_tick(p, this_rq(), user_tick, ticks);
}
static void irqtime_account_idle_ticks(int ticks)

View File

@ -93,3 +93,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_setaffinity_early);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_process_tick_gran);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_task_time);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dup_task_struct);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_irqtime_account_process_tick);