ANDROID: GKI:Add VendorHook for ProbeTimeout
The dpm_prepare and wait_for_device_probe functions may block for a long time in order to complete their probe. We need to add vendhook to monitor the execution time and locate the modules where the long blocking occurs. Bug: 417369065 Change-Id: I39b3dfdcf4cc8b95a5201d1ce49aec98002e62ce Signed-off-by: wei li <sirius.liwei@honor.corp-partner.google.com>
This commit is contained in:
@@ -154,6 +154,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_restore_priority);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_printk);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_printk);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_create);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_create);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_dpm_prepare);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ogki_check_vip_status);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ogki_check_vip_status);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ogki_task_util);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ogki_task_util);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ogki_uclamp_task_util);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ogki_uclamp_task_util);
|
||||||
|
|||||||
@@ -1869,7 +1869,9 @@ int dpm_prepare(pm_message_t state)
|
|||||||
* disable probing of devices. This sync point is important at least
|
* disable probing of devices. This sync point is important at least
|
||||||
* at boot time + hibernation restore.
|
* at boot time + hibernation restore.
|
||||||
*/
|
*/
|
||||||
|
trace_android_rvh_dpm_prepare(0);
|
||||||
wait_for_device_probe();
|
wait_for_device_probe();
|
||||||
|
trace_android_rvh_dpm_prepare(1);
|
||||||
/*
|
/*
|
||||||
* It is unsafe if probing of devices will happen during suspend or
|
* It is unsafe if probing of devices will happen during suspend or
|
||||||
* hibernation and system behavior will be unpredictable in this case.
|
* hibernation and system behavior will be unpredictable in this case.
|
||||||
|
|||||||
@@ -146,6 +146,10 @@ DECLARE_HOOK(android_vh_record_pcpu_rwsem_starttime,
|
|||||||
DECLARE_HOOK(android_vh_exit_check,
|
DECLARE_HOOK(android_vh_exit_check,
|
||||||
TP_PROTO(struct task_struct *p),
|
TP_PROTO(struct task_struct *p),
|
||||||
TP_ARGS(p));
|
TP_ARGS(p));
|
||||||
|
|
||||||
|
DECLARE_RESTRICTED_HOOK(android_rvh_dpm_prepare,
|
||||||
|
TP_PROTO(int flag),
|
||||||
|
TP_ARGS(flag), 1);
|
||||||
#endif /* _TRACE_HOOK_DTASK_H */
|
#endif /* _TRACE_HOOK_DTASK_H */
|
||||||
|
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
|
|||||||
Reference in New Issue
Block a user