ANDROID: vendor_hooks: Add hooks in reweight_entity

Add hooks in reweight_entity to track the load information of task group.

Bug: 336959329
Bug: 439772147

Change-Id: I0928d412facbc226998fe46f9529b7bcd0d25bf3
Signed-off-by: maoshenshen <maoshenshen@oppo.com>
Signed-off-by: Qixia Yang <yangqixia2@oppo.com>
Signed-off-by: Gaowei Pu <pugaowei@oppo.com>
This commit is contained in:
maoshenshen
2024-04-25 17:06:32 +08:00
committed by Gaowei Pu
parent cbcbb4709f
commit ba270f8f88
3 changed files with 6 additions and 0 deletions

View File

@@ -413,6 +413,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_force_compatible_pre);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_force_compatible_post);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_print_transaction_info);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_setscheduler_uclamp);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_reweight_entity);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);

View File

@@ -402,6 +402,10 @@ DECLARE_HOOK(android_vh_mmput,
DECLARE_HOOK(android_vh_sched_pelt_multiplier,
TP_PROTO(unsigned int old, unsigned int cur, int *ret),
TP_ARGS(old, cur, ret));
DECLARE_HOOK(android_vh_reweight_entity,
TP_PROTO(struct sched_entity *se),
TP_ARGS(se));
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_SCHED_H */

View File

@@ -3115,6 +3115,7 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
update_load_set(&se->load, weight);
trace_android_vh_reweight_entity(se);
#ifdef CONFIG_SMP
do {
u32 divider = get_pelt_divider(&se->avg);