ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler
Providing vendor hooks to record the start time of holding the lock, which protects rwsem/mutex locking-process from being preemptedfor a short time in some cases. - android_vh_record_mutex_lock_starttime - android_vh_record_rtmutex_lock_starttime - android_vh_record_rwsem_lock_starttime - android_vh_record_percpu_rwsem_lock_starttime Bug: 241191475 Signed-off-by: Peifeng Li <lipeifeng@oppo.com> Change-Id: I0e967a1e8b77c32a1ad588acd54028fae2f90c4e
This commit is contained in:

committed by
Matthias Männich

parent
fb39cdb9ea
commit
eed2741ae6
@@ -71,7 +71,18 @@ DECLARE_HOOK(android_vh_mutex_unlock_slowpath_end,
|
||||
DECLARE_HOOK(android_vh_mutex_start_check_new_owner,
|
||||
TP_PROTO(struct mutex *lock),
|
||||
TP_ARGS(lock));
|
||||
|
||||
DECLARE_HOOK(android_vh_record_mutex_lock_starttime,
|
||||
TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies),
|
||||
TP_ARGS(tsk, settime_jiffies));
|
||||
DECLARE_HOOK(android_vh_record_rtmutex_lock_starttime,
|
||||
TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies),
|
||||
TP_ARGS(tsk, settime_jiffies));
|
||||
DECLARE_HOOK(android_vh_record_rwsem_lock_starttime,
|
||||
TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies),
|
||||
TP_ARGS(tsk, settime_jiffies));
|
||||
DECLARE_HOOK(android_vh_record_percpu_rwsem_lock_starttime,
|
||||
TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies),
|
||||
TP_ARGS(tsk, settime_jiffies));
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_DTASK_H */
|
||||
|
Reference in New Issue
Block a user