]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - kernel/lockdep.c
Merge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6.git] / kernel / lockdep.c
index a288ae107b50b24101e5ad193b8fdb4c5aa8a44d..b0f011866969acb7f187c3474e53551723d0486a 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/hash.h>
 #include <linux/ftrace.h>
 #include <linux/stringify.h>
 #include <linux/hash.h>
 #include <linux/ftrace.h>
 #include <linux/stringify.h>
+#include <trace/lockdep.h>
 
 #include <asm/sections.h>
 
 
 #include <asm/sections.h>
 
@@ -2928,6 +2929,8 @@ void lock_set_class(struct lockdep_map *lock, const char *name,
 }
 EXPORT_SYMBOL_GPL(lock_set_class);
 
 }
 EXPORT_SYMBOL_GPL(lock_set_class);
 
+DEFINE_TRACE(lock_acquire);
+
 /*
  * We are not always called with irqs disabled - do that here,
  * and also avoid lockdep recursion:
 /*
  * We are not always called with irqs disabled - do that here,
  * and also avoid lockdep recursion:
@@ -2938,6 +2941,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 {
        unsigned long flags;
 
 {
        unsigned long flags;
 
+       trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
+
        if (unlikely(current->lockdep_recursion))
                return;
 
        if (unlikely(current->lockdep_recursion))
                return;
 
@@ -2952,11 +2957,15 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 }
 EXPORT_SYMBOL_GPL(lock_acquire);
 
 }
 EXPORT_SYMBOL_GPL(lock_acquire);
 
+DEFINE_TRACE(lock_release);
+
 void lock_release(struct lockdep_map *lock, int nested,
                          unsigned long ip)
 {
        unsigned long flags;
 
 void lock_release(struct lockdep_map *lock, int nested,
                          unsigned long ip)
 {
        unsigned long flags;
 
+       trace_lock_release(lock, nested, ip);
+
        if (unlikely(current->lockdep_recursion))
                return;
 
        if (unlikely(current->lockdep_recursion))
                return;
 
@@ -3105,10 +3114,14 @@ found_it:
        lock->ip = ip;
 }
 
        lock->ip = ip;
 }
 
+DEFINE_TRACE(lock_contended);
+
 void lock_contended(struct lockdep_map *lock, unsigned long ip)
 {
        unsigned long flags;
 
 void lock_contended(struct lockdep_map *lock, unsigned long ip)
 {
        unsigned long flags;
 
+       trace_lock_contended(lock, ip);
+
        if (unlikely(!lock_stat))
                return;
 
        if (unlikely(!lock_stat))
                return;
 
@@ -3124,10 +3137,14 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip)
 }
 EXPORT_SYMBOL_GPL(lock_contended);
 
 }
 EXPORT_SYMBOL_GPL(lock_contended);
 
+DEFINE_TRACE(lock_acquired);
+
 void lock_acquired(struct lockdep_map *lock, unsigned long ip)
 {
        unsigned long flags;
 
 void lock_acquired(struct lockdep_map *lock, unsigned long ip)
 {
        unsigned long flags;
 
+       trace_lock_acquired(lock, ip);
+
        if (unlikely(!lock_stat))
                return;
 
        if (unlikely(!lock_stat))
                return;