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)
This commit is contained in:
Liangliang Li 2021-05-12 18:25:07 +08:00
parent 825d9968d9
commit 53df1b822d
3 changed files with 6 additions and 0 deletions

View File

@ -215,6 +215,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_referenced_check_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_drain_all_pages_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_drain_all_pages_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pcplist_add_cma_pages_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_irqtime_account_process_tick);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_enqueue_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_dequeue_task);

View File

@ -319,6 +319,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

@ -409,6 +409,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)