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>
(cherry picked from commit 63399b4e2e)
This commit is contained in:
@@ -322,3 +322,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmap_region);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_try_to_unmap_one);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_try_to_unmap_one);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node_memcgs);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node_memcgs);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_sdio_pm_flag_set);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_sdio_pm_flag_set);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_task_time);
|
||||||
|
|||||||
@@ -406,6 +406,9 @@ DECLARE_HOOK(android_vh_dup_task_struct,
|
|||||||
TP_PROTO(struct task_struct *tsk, struct task_struct *orig),
|
TP_PROTO(struct task_struct *tsk, struct task_struct *orig),
|
||||||
TP_ARGS(tsk, orig));
|
TP_ARGS(tsk, orig));
|
||||||
|
|
||||||
|
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));
|
||||||
/* macro versions of hooks are no longer required */
|
/* macro versions of hooks are no longer required */
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_SCHED_H */
|
#endif /* _TRACE_HOOK_SCHED_H */
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ void account_process_tick(struct task_struct *p, int user_tick)
|
|||||||
|
|
||||||
if (vtime_accounting_enabled_this_cpu())
|
if (vtime_accounting_enabled_this_cpu())
|
||||||
return;
|
return;
|
||||||
|
trace_android_vh_account_task_time(p, this_rq(), user_tick);
|
||||||
|
|
||||||
if (sched_clock_irqtime) {
|
if (sched_clock_irqtime) {
|
||||||
irqtime_account_process_tick(p, user_tick, 1);
|
irqtime_account_process_tick(p, user_tick, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user