diff options
-rw-r--r-- | fs/gfs2/trace_gfs2.h | 8 | ||||
-rw-r--r-- | include/trace/events/block.h | 6 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 6 | ||||
-rw-r--r-- | include/trace/events/irq.h | 6 | ||||
-rw-r--r-- | include/trace/events/jbd2.h | 6 | ||||
-rw-r--r-- | include/trace/events/kmem.h | 6 | ||||
-rw-r--r-- | include/trace/events/lockdep.h | 6 | ||||
-rw-r--r-- | include/trace/events/sched.h | 6 | ||||
-rw-r--r-- | include/trace/events/skb.h | 6 | ||||
-rw-r--r-- | include/trace/events/workqueue.h | 6 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 5 | ||||
-rw-r--r-- | samples/trace_events/trace-events-sample.h | 37 |
12 files changed, 53 insertions, 51 deletions
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h index 98d6ef1c1dc..148d55c1417 100644 --- a/fs/gfs2/trace_gfs2.h +++ b/fs/gfs2/trace_gfs2.h | |||
@@ -1,12 +1,11 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM gfs2 | ||
3 | |||
1 | #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_GFS2_H | 5 | #define _TRACE_GFS2_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | 8 | ||
6 | #undef TRACE_SYSTEM | ||
7 | #define TRACE_SYSTEM gfs2 | ||
8 | #define TRACE_INCLUDE_FILE trace_gfs2 | ||
9 | |||
10 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
11 | #include <linux/buffer_head.h> | 10 | #include <linux/buffer_head.h> |
12 | #include <linux/dlmconstants.h> | 11 | #include <linux/dlmconstants.h> |
@@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc, | |||
403 | /* This part must be outside protection */ | 402 | /* This part must be outside protection */ |
404 | #undef TRACE_INCLUDE_PATH | 403 | #undef TRACE_INCLUDE_PATH |
405 | #define TRACE_INCLUDE_PATH . | 404 | #define TRACE_INCLUDE_PATH . |
405 | #define TRACE_INCLUDE_FILE trace_gfs2 | ||
406 | #include <trace/define_trace.h> | 406 | #include <trace/define_trace.h> |
407 | 407 | ||
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d6b05f42dd4..9a74b468a22 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM block | ||
3 | |||
1 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_BLOCK_H | 5 | #define _TRACE_BLOCK_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM block | ||
10 | |||
11 | TRACE_EVENT(block_rq_abort, | 11 | TRACE_EVENT(block_rq_abort, |
12 | 12 | ||
13 | TP_PROTO(struct request_queue *q, struct request *rq), | 13 | TP_PROTO(struct request_queue *q, struct request *rq), |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index dfbc9b0edc8..7d8b5bc7418 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
5 | #define TRACE_SYSTEM ext4 | 2 | #define TRACE_SYSTEM ext4 |
6 | 3 | ||
4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EXT4_H | ||
6 | |||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include "../../../fs/ext4/ext4.h" | 8 | #include "../../../fs/ext4/ext4.h" |
9 | #include "../../../fs/ext4/mballoc.h" | 9 | #include "../../../fs/ext4/mballoc.h" |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b0c7ede55eb..1cb0c3aa11e 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM irq | ||
3 | |||
1 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_IRQ_H | 5 | #define _TRACE_IRQ_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM irq | ||
9 | |||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 11 | #define show_softirq_name(val) \ |
12 | __print_symbolic(val, \ | 12 | __print_symbolic(val, \ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 845b0b4b48f..10813fa0c8d 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM jbd2 | ||
3 | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_JBD2_H | 5 | #define _TRACE_JBD2_H |
3 | 6 | ||
4 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | 10 | TRACE_EVENT(jbd2_checkpoint, |
11 | 11 | ||
12 | TP_PROTO(journal_t *journal, int result), | 12 | TP_PROTO(journal_t *journal, int result), |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 9baba50d651..1493c541f9c 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM kmem | ||
3 | |||
1 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_KMEM_H | 5 | #define _TRACE_KMEM_H |
3 | 6 | ||
4 | #include <linux/types.h> | 7 | #include <linux/types.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM kmem | ||
9 | |||
10 | /* | 10 | /* |
11 | * The order of these masks is important. Matching masks will be seen | 11 | * The order of these masks is important. Matching masks will be seen |
12 | * first and the left over flags will end up showing by themselves. | 12 | * first and the left over flags will end up showing by themselves. |
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h index 0e956c9dfd7..bcf1d209a00 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lockdep.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM lockdep | ||
3 | |||
1 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_LOCKDEP_H | 5 | #define _TRACE_LOCKDEP_H |
3 | 6 | ||
4 | #include <linux/lockdep.h> | 7 | #include <linux/lockdep.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lockdep | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | 10 | #ifdef CONFIG_LOCKDEP |
11 | 11 | ||
12 | TRACE_EVENT(lock_acquire, | 12 | TRACE_EVENT(lock_acquire, |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 24ab5bcff7b..8949bb7eb08 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM sched | ||
3 | |||
1 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SCHED_H | 5 | #define _TRACE_SCHED_H |
3 | 6 | ||
4 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM sched | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for calling kthread_stop, performed to end a kthread: | 11 | * Tracepoint for calling kthread_stop, performed to end a kthread: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 1e8fabb57c0..e499863b966 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM skb | ||
3 | |||
1 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
3 | 6 | ||
4 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM skb | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for free an sk_buff: | 11 | * Tracepoint for free an sk_buff: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 035f1bff288..fcfd9a1e4b9 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM workqueue | ||
3 | |||
1 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_WORKQUEUE_H | 5 | #define _TRACE_WORKQUEUE_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM workqueue | ||
10 | |||
11 | TRACE_EVENT(workqueue_insertion, | 11 | TRACE_EVENT(workqueue_insertion, |
12 | 12 | ||
13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index bce9e01a29c..4521c77d1a1 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -768,7 +768,7 @@ static struct tracer_stat function_stats __initdata = { | |||
768 | .stat_show = function_stat_show | 768 | .stat_show = function_stat_show |
769 | }; | 769 | }; |
770 | 770 | ||
771 | static void ftrace_profile_debugfs(struct dentry *d_tracer) | 771 | static __init void ftrace_profile_debugfs(struct dentry *d_tracer) |
772 | { | 772 | { |
773 | struct ftrace_profile_stat *stat; | 773 | struct ftrace_profile_stat *stat; |
774 | struct dentry *entry; | 774 | struct dentry *entry; |
@@ -786,7 +786,6 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) | |||
786 | * The files created are permanent, if something happens | 786 | * The files created are permanent, if something happens |
787 | * we still do not free memory. | 787 | * we still do not free memory. |
788 | */ | 788 | */ |
789 | kfree(stat); | ||
790 | WARN(1, | 789 | WARN(1, |
791 | "Could not allocate stat file for cpu %d\n", | 790 | "Could not allocate stat file for cpu %d\n", |
792 | cpu); | 791 | cpu); |
@@ -813,7 +812,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) | |||
813 | } | 812 | } |
814 | 813 | ||
815 | #else /* CONFIG_FUNCTION_PROFILER */ | 814 | #else /* CONFIG_FUNCTION_PROFILER */ |
816 | static void ftrace_profile_debugfs(struct dentry *d_tracer) | 815 | static __init void ftrace_profile_debugfs(struct dentry *d_tracer) |
817 | { | 816 | { |
818 | } | 817 | } |
819 | #endif /* CONFIG_FUNCTION_PROFILER */ | 818 | #endif /* CONFIG_FUNCTION_PROFILER */ |
diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index 9977a756fb3..f24ae370e51 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h | |||
@@ -1,21 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Notice that this file is not protected like a normal header. | ||
3 | * We also must allow for rereading of this file. The | ||
4 | * | ||
5 | * || defined(TRACE_HEADER_MULTI_READ) | ||
6 | * | ||
7 | * serves this purpose. | ||
8 | */ | ||
9 | #if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
10 | #define _TRACE_EVENT_SAMPLE_H | ||
11 | |||
12 | /* | ||
13 | * All trace headers should include tracepoint.h, until we finally | ||
14 | * make it into a standard header. | ||
15 | */ | ||
16 | #include <linux/tracepoint.h> | ||
17 | |||
18 | /* | ||
19 | * If TRACE_SYSTEM is defined, that will be the directory created | 2 | * If TRACE_SYSTEM is defined, that will be the directory created |
20 | * in the ftrace directory under /debugfs/tracing/events/<system> | 3 | * in the ftrace directory under /debugfs/tracing/events/<system> |
21 | * | 4 | * |
@@ -34,11 +17,31 @@ | |||
34 | * #define TRACE_INCLUDE_FILE trace-events-sample | 17 | * #define TRACE_INCLUDE_FILE trace-events-sample |
35 | * | 18 | * |
36 | * As we do an the bottom of this file. | 19 | * As we do an the bottom of this file. |
20 | * | ||
21 | * Notice that TRACE_SYSTEM should be defined outside of #if | ||
22 | * protection, just like TRACE_INCLUDE_FILE. | ||
37 | */ | 23 | */ |
38 | #undef TRACE_SYSTEM | 24 | #undef TRACE_SYSTEM |
39 | #define TRACE_SYSTEM sample | 25 | #define TRACE_SYSTEM sample |
40 | 26 | ||
41 | /* | 27 | /* |
28 | * Notice that this file is not protected like a normal header. | ||
29 | * We also must allow for rereading of this file. The | ||
30 | * | ||
31 | * || defined(TRACE_HEADER_MULTI_READ) | ||
32 | * | ||
33 | * serves this purpose. | ||
34 | */ | ||
35 | #if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
36 | #define _TRACE_EVENT_SAMPLE_H | ||
37 | |||
38 | /* | ||
39 | * All trace headers should include tracepoint.h, until we finally | ||
40 | * make it into a standard header. | ||
41 | */ | ||
42 | #include <linux/tracepoint.h> | ||
43 | |||
44 | /* | ||
42 | * The TRACE_EVENT macro is broken up into 5 parts. | 45 | * The TRACE_EVENT macro is broken up into 5 parts. |
43 | * | 46 | * |
44 | * name: name of the trace point. This is also how to enable the tracepoint. | 47 | * name: name of the trace point. This is also how to enable the tracepoint. |