aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 981cd4854281..81b5f33970b8 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -42,6 +42,7 @@
42#include <linux/hash.h> 42#include <linux/hash.h>
43#include <linux/ftrace.h> 43#include <linux/ftrace.h>
44#include <linux/stringify.h> 44#include <linux/stringify.h>
45#include <trace/lockdep.h>
45 46
46#include <asm/sections.h> 47#include <asm/sections.h>
47 48
@@ -2923,6 +2924,8 @@ void lock_set_class(struct lockdep_map *lock, const char *name,
2923} 2924}
2924EXPORT_SYMBOL_GPL(lock_set_class); 2925EXPORT_SYMBOL_GPL(lock_set_class);
2925 2926
2927DEFINE_TRACE(lock_acquire);
2928
2926/* 2929/*
2927 * We are not always called with irqs disabled - do that here, 2930 * We are not always called with irqs disabled - do that here,
2928 * and also avoid lockdep recursion: 2931 * and also avoid lockdep recursion:
@@ -2933,6 +2936,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2933{ 2936{
2934 unsigned long flags; 2937 unsigned long flags;
2935 2938
2939 trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
2940
2936 if (unlikely(current->lockdep_recursion)) 2941 if (unlikely(current->lockdep_recursion))
2937 return; 2942 return;
2938 2943
@@ -2947,11 +2952,15 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2947} 2952}
2948EXPORT_SYMBOL_GPL(lock_acquire); 2953EXPORT_SYMBOL_GPL(lock_acquire);
2949 2954
2955DEFINE_TRACE(lock_release);
2956
2950void lock_release(struct lockdep_map *lock, int nested, 2957void lock_release(struct lockdep_map *lock, int nested,
2951 unsigned long ip) 2958 unsigned long ip)
2952{ 2959{
2953 unsigned long flags; 2960 unsigned long flags;
2954 2961
2962 trace_lock_release(lock, nested, ip);
2963
2955 if (unlikely(current->lockdep_recursion)) 2964 if (unlikely(current->lockdep_recursion))
2956 return; 2965 return;
2957 2966
@@ -3100,10 +3109,14 @@ found_it:
3100 lock->ip = ip; 3109 lock->ip = ip;
3101} 3110}
3102 3111
3112DEFINE_TRACE(lock_contended);
3113
3103void lock_contended(struct lockdep_map *lock, unsigned long ip) 3114void lock_contended(struct lockdep_map *lock, unsigned long ip)
3104{ 3115{
3105 unsigned long flags; 3116 unsigned long flags;
3106 3117
3118 trace_lock_contended(lock, ip);
3119
3107 if (unlikely(!lock_stat)) 3120 if (unlikely(!lock_stat))
3108 return; 3121 return;
3109 3122
@@ -3119,10 +3132,14 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip)
3119} 3132}
3120EXPORT_SYMBOL_GPL(lock_contended); 3133EXPORT_SYMBOL_GPL(lock_contended);
3121 3134
3135DEFINE_TRACE(lock_acquired);
3136
3122void lock_acquired(struct lockdep_map *lock, unsigned long ip) 3137void lock_acquired(struct lockdep_map *lock, unsigned long ip)
3123{ 3138{
3124 unsigned long flags; 3139 unsigned long flags;
3125 3140
3141 trace_lock_acquired(lock, ip);
3142
3126 if (unlikely(!lock_stat)) 3143 if (unlikely(!lock_stat))
3127 return; 3144 return;
3128 3145