ANDROID: vendor_hooks: change the argument to 'lock struct' for some hooks

To count some information about locks, we need to replace the argument
'current' by 'lock struct' for these four hooks.
- android_vh_record_mutex_lock_starttime
- android_vh_record_rtmutex_lock_starttime
- android_vh_record_rwsem_lock_starttime
- android_vh_record_pcpu_rwsem_starttime

Bug: 336412598
Change-Id: I52d610079023df0feb1173ec99a6c72d12483f80
Signed-off-by: xieliujie <xieliujie@oppo.com>
This commit is contained in:
xieliujie
2024-04-23 14:16:00 +08:00
committed by Treehugger Robot
parent 3d98011e2a
commit 5af73be864
6 changed files with 37 additions and 36 deletions
+9 -8
View File
@@ -14,6 +14,7 @@
*/
struct mutex;
struct rt_mutex;
struct rt_mutex_base;
struct rw_semaphore;
struct task_struct;
@@ -114,17 +115,17 @@ DECLARE_HOOK(android_vh_mutex_unlock_slowpath,
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));
TP_PROTO(struct mutex *lock, unsigned long settime_jiffies),
TP_ARGS(lock, 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));
TP_PROTO(struct rt_mutex *lock, unsigned long settime_jiffies),
TP_ARGS(lock, 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));
TP_PROTO(struct rw_semaphore *sem, unsigned long settime_jiffies),
TP_ARGS(sem, settime_jiffies));
DECLARE_HOOK(android_vh_record_pcpu_rwsem_starttime,
TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies),
TP_ARGS(tsk, settime_jiffies));
TP_PROTO(struct percpu_rw_semaphore *sem, unsigned long settime_jiffies),
TP_ARGS(sem, settime_jiffies));
#endif /* _TRACE_HOOK_DTASK_H */
/* This part must be outside protection */
#include <trace/define_trace.h>