diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index accb40cdb12a..8bbeef996c76 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -42,12 +42,14 @@ | |||
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> | ||
46 | 45 | ||
47 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
48 | 47 | ||
49 | #include "lockdep_internals.h" | 48 | #include "lockdep_internals.h" |
50 | 49 | ||
50 | #define CREATE_TRACE_POINTS | ||
51 | #include <trace/events/lockdep.h> | ||
52 | |||
51 | #ifdef CONFIG_PROVE_LOCKING | 53 | #ifdef CONFIG_PROVE_LOCKING |
52 | int prove_locking = 1; | 54 | int prove_locking = 1; |
53 | module_param(prove_locking, int, 0644); | 55 | module_param(prove_locking, int, 0644); |
@@ -2935,8 +2937,6 @@ void lock_set_class(struct lockdep_map *lock, const char *name, | |||
2935 | } | 2937 | } |
2936 | EXPORT_SYMBOL_GPL(lock_set_class); | 2938 | EXPORT_SYMBOL_GPL(lock_set_class); |
2937 | 2939 | ||
2938 | DEFINE_TRACE(lock_acquire); | ||
2939 | |||
2940 | /* | 2940 | /* |
2941 | * We are not always called with irqs disabled - do that here, | 2941 | * We are not always called with irqs disabled - do that here, |
2942 | * and also avoid lockdep recursion: | 2942 | * and also avoid lockdep recursion: |
@@ -2963,8 +2963,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
2963 | } | 2963 | } |
2964 | EXPORT_SYMBOL_GPL(lock_acquire); | 2964 | EXPORT_SYMBOL_GPL(lock_acquire); |
2965 | 2965 | ||
2966 | DEFINE_TRACE(lock_release); | ||
2967 | |||
2968 | void lock_release(struct lockdep_map *lock, int nested, | 2966 | void lock_release(struct lockdep_map *lock, int nested, |
2969 | unsigned long ip) | 2967 | unsigned long ip) |
2970 | { | 2968 | { |
@@ -3105,6 +3103,8 @@ found_it: | |||
3105 | hlock->holdtime_stamp = now; | 3103 | hlock->holdtime_stamp = now; |
3106 | } | 3104 | } |
3107 | 3105 | ||
3106 | trace_lock_acquired(lock, ip, waittime); | ||
3107 | |||
3108 | stats = get_lock_stats(hlock_class(hlock)); | 3108 | stats = get_lock_stats(hlock_class(hlock)); |
3109 | if (waittime) { | 3109 | if (waittime) { |
3110 | if (hlock->read) | 3110 | if (hlock->read) |
@@ -3120,8 +3120,6 @@ found_it: | |||
3120 | lock->ip = ip; | 3120 | lock->ip = ip; |
3121 | } | 3121 | } |
3122 | 3122 | ||
3123 | DEFINE_TRACE(lock_contended); | ||
3124 | |||
3125 | void lock_contended(struct lockdep_map *lock, unsigned long ip) | 3123 | void lock_contended(struct lockdep_map *lock, unsigned long ip) |
3126 | { | 3124 | { |
3127 | unsigned long flags; | 3125 | unsigned long flags; |
@@ -3143,14 +3141,10 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip) | |||
3143 | } | 3141 | } |
3144 | EXPORT_SYMBOL_GPL(lock_contended); | 3142 | EXPORT_SYMBOL_GPL(lock_contended); |
3145 | 3143 | ||
3146 | DEFINE_TRACE(lock_acquired); | ||
3147 | |||
3148 | void lock_acquired(struct lockdep_map *lock, unsigned long ip) | 3144 | void lock_acquired(struct lockdep_map *lock, unsigned long ip) |
3149 | { | 3145 | { |
3150 | unsigned long flags; | 3146 | unsigned long flags; |
3151 | 3147 | ||
3152 | trace_lock_acquired(lock, ip); | ||
3153 | |||
3154 | if (unlikely(!lock_stat)) | 3148 | if (unlikely(!lock_stat)) |
3155 | return; | 3149 | return; |
3156 | 3150 | ||