aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/locking/mutex.c')
-rw-r--r--kernel/locking/mutex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 5352ce50a97e..0a4a3772fdca 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -36,6 +36,8 @@
36# include "mutex.h" 36# include "mutex.h"
37#endif 37#endif
38 38
39#include <trace/hooks/dtask.h>
40
39void 41void
40__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) 42__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
41{ 43{
@@ -1002,6 +1004,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
1002 1004
1003 waiter.task = current; 1005 waiter.task = current;
1004 1006
1007 trace_android_vh_mutex_wait_start(lock);
1005 set_current_state(state); 1008 set_current_state(state);
1006 for (;;) { 1009 for (;;) {
1007 /* 1010 /*
@@ -1057,6 +1060,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
1057 spin_lock(&lock->wait_lock); 1060 spin_lock(&lock->wait_lock);
1058acquired: 1061acquired:
1059 __set_current_state(TASK_RUNNING); 1062 __set_current_state(TASK_RUNNING);
1063 trace_android_vh_mutex_wait_finish(lock);
1060 1064
1061 if (use_ww_ctx && ww_ctx) { 1065 if (use_ww_ctx && ww_ctx) {
1062 /* 1066 /*
@@ -1087,6 +1091,7 @@ skip_wait:
1087 1091
1088err: 1092err:
1089 __set_current_state(TASK_RUNNING); 1093 __set_current_state(TASK_RUNNING);
1094 trace_android_vh_mutex_wait_finish(lock);
1090 mutex_remove_waiter(lock, &waiter, current); 1095 mutex_remove_waiter(lock, &waiter, current);
1091err_early_kill: 1096err_early_kill:
1092 spin_unlock(&lock->wait_lock); 1097 spin_unlock(&lock->wait_lock);