aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-01-25 15:54:50 -0500
committerArnd Bergmann <arnd@arndb.de>2011-03-01 18:02:39 -0500
commitf51b452bed4ae5c20e1f8a790e4ed8663d909a40 (patch)
tree3c028a2cb74253d74cf4ed15b2900531217cb6b6
parent4688a066ecf60086ea82f68edb3b036b567d2c08 (diff)
tracing: don't trace the BKL
No reason to trace it when the last user is gone. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
-rw-r--r--include/trace/events/bkl.h61
-rw-r--r--lib/kernel_lock.c7
2 files changed, 0 insertions, 68 deletions
diff --git a/include/trace/events/bkl.h b/include/trace/events/bkl.h
deleted file mode 100644
index 1af72dc2427..00000000000
--- a/include/trace/events/bkl.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM bkl
3
4#if !defined(_TRACE_BKL_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_BKL_H
6
7#include <linux/tracepoint.h>
8
9TRACE_EVENT(lock_kernel,
10
11 TP_PROTO(const char *func, const char *file, int line),
12
13 TP_ARGS(func, file, line),
14
15 TP_STRUCT__entry(
16 __field( int, depth )
17 __field_ext( const char *, func, FILTER_PTR_STRING )
18 __field_ext( const char *, file, FILTER_PTR_STRING )
19 __field( int, line )
20 ),
21
22 TP_fast_assign(
23 /* We want to record the lock_depth after lock is acquired */
24 __entry->depth = current->lock_depth + 1;
25 __entry->func = func;
26 __entry->file = file;
27 __entry->line = line;
28 ),
29
30 TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth,
31 __entry->file, __entry->line, __entry->func)
32);
33
34TRACE_EVENT(unlock_kernel,
35
36 TP_PROTO(const char *func, const char *file, int line),
37
38 TP_ARGS(func, file, line),
39
40 TP_STRUCT__entry(
41 __field(int, depth )
42 __field(const char *, func )
43 __field(const char *, file )
44 __field(int, line )
45 ),
46
47 TP_fast_assign(
48 __entry->depth = current->lock_depth;
49 __entry->func = func;
50 __entry->file = file;
51 __entry->line = line;
52 ),
53
54 TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth,
55 __entry->file, __entry->line, __entry->func)
56);
57
58#endif /* _TRACE_BKL_H */
59
60/* This part must be outside protection */
61#include <trace/define_trace.h>
diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c
index b135d04aa48..d80e1226586 100644
--- a/lib/kernel_lock.c
+++ b/lib/kernel_lock.c
@@ -10,9 +10,6 @@
10#include <linux/semaphore.h> 10#include <linux/semaphore.h>
11#include <linux/smp_lock.h> 11#include <linux/smp_lock.h>
12 12
13#define CREATE_TRACE_POINTS
14#include <trace/events/bkl.h>
15
16/* 13/*
17 * The 'big kernel lock' 14 * The 'big kernel lock'
18 * 15 *
@@ -120,8 +117,6 @@ void __lockfunc _lock_kernel(const char *func, const char *file, int line)
120{ 117{
121 int depth = current->lock_depth + 1; 118 int depth = current->lock_depth + 1;
122 119
123 trace_lock_kernel(func, file, line);
124
125 if (likely(!depth)) { 120 if (likely(!depth)) {
126 might_sleep(); 121 might_sleep();
127 __lock_kernel(); 122 __lock_kernel();
@@ -134,8 +129,6 @@ void __lockfunc _unlock_kernel(const char *func, const char *file, int line)
134 BUG_ON(current->lock_depth < 0); 129 BUG_ON(current->lock_depth < 0);
135 if (likely(--current->lock_depth < 0)) 130 if (likely(--current->lock_depth < 0))
136 __unlock_kernel(); 131 __unlock_kernel();
137
138 trace_unlock_kernel(func, file, line);
139} 132}
140 133
141EXPORT_SYMBOL(_lock_kernel); 134EXPORT_SYMBOL(_lock_kernel);