ANDROID: mutex: Add vendor hook to init mutex oem data.

Add hooks to init oem data of mutex.

Bug: 231527236
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: Id0aeac168e81bd3d88051657c32ba709c329dbdd
This commit is contained in:
Dezhi Huang 2022-06-10 18:19:34 +08:00 committed by Todd Kjos
parent 7c82ee91c2
commit 854f840411
3 changed files with 5 additions and 0 deletions

View File

@ -94,6 +94,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_ilocked);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_start);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_finish);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_init);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_wait_start);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_wait_finish);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_start);

View File

@ -17,6 +17,9 @@ DECLARE_HOOK(android_vh_mutex_wait_start,
DECLARE_HOOK(android_vh_mutex_wait_finish,
TP_PROTO(struct mutex *lock),
TP_ARGS(lock));
DECLARE_HOOK(android_vh_mutex_init,
TP_PROTO(struct mutex *lock),
TP_ARGS(lock));
struct rt_mutex_base;
DECLARE_HOOK(android_vh_rtmutex_wait_start,

View File

@ -51,6 +51,7 @@ __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
osq_lock_init(&lock->osq);
#endif
trace_android_vh_mutex_init(lock);
debug_mutex_init(lock, name, key);
}
EXPORT_SYMBOL(__mutex_init);