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>
This commit is contained in:
@@ -217,3 +217,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cache_show);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpci_override_toggling);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpci_override_toggling);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_chk_contaminant);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_chk_contaminant);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_get_vbus);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_get_vbus);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_task_time);
|
||||||
|
@@ -282,6 +282,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_util_est_update,
|
|||||||
TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret),
|
TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret),
|
||||||
TP_ARGS(cfs_rq, p, task_sleep, ret), 1);
|
TP_ARGS(cfs_rq, p, task_sleep, 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));
|
||||||
/* 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 */
|
||||||
|
@@ -486,6 +486,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