ANDROID: vendor_hooks: Add hooks for account process tick

Add a hook in account_process_tick, which help us to get information
about the high load task and the cpu they running on.

Bug: 183260319
Change-Id: I54162ce3c65bd69e08d2d4747e4d4883efe4c442
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: maoshenshen <maoshenshen@oppo.com>
This commit is contained in:
Liujie Xie
2023-05-15 11:30:56 +08:00
committed by Treehugger Robot
parent 6091f29de0
commit e7db4cb370
3 changed files with 6 additions and 0 deletions
+4
View File
@@ -405,6 +405,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_rt_rq_load_avg_internal,
TP_PROTO(u64 now, struct rq *rq, int running, int *ret),
TP_ARGS(now, rq, running, ret), 1);
DECLARE_HOOK(android_vh_account_task_time,
TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick),
TP_ARGS(p, rq, user_tick));
DECLARE_HOOK(android_vh_map_util_freq,
TP_PROTO(unsigned long util, unsigned long freq,
unsigned long cap, unsigned long *next_freq),
+1
View File
@@ -495,6 +495,7 @@ void account_process_tick(struct task_struct *p, int user_tick)
if (vtime_accounting_enabled_this_cpu())
return;
trace_android_vh_account_task_time(p, this_rq(), user_tick);
if (sched_clock_irqtime) {
irqtime_account_process_tick(p, user_tick, 1);
+1
View File
@@ -96,6 +96,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_attach_entity_load_avg);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_detach_entity_load_avg);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_task_time);
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_set_cpus_allowed_ptr);