diff options
author | Anton Blanchard <anton@samba.org> | 2012-05-22 14:47:48 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-03 00:14:41 -0400 |
commit | d136e27326a3bd50d7929a43c018abf13e426b7e (patch) | |
tree | a60f534ee3326042b3792261cc6e18d98b5f49e1 | |
parent | 641bd53a615b35d7a2e9a3de764e7c4953948679 (diff) |
powerpc: tracing: Avoid tracepoint duplication with DECLARE_EVENT_CLASS
irq_entry, irq_exit, timer_interrupt_entry and timer_interrupt_exit
all do the same thing so use DECLARE_EVENT_CLASS to avoid duplicating
everything 4 times.
This saves quite a lot of space in both instruction text and data:
text data bss dec hex filename
9265 19622 16 28903 70e7 arch/powerpc/kernel/irq.o
6817 19019 16 25852 64fc arch/powerpc/kernel/irq.o
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/trace.h | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h index cbe2297d68b6..5712f06905a9 100644 --- a/arch/powerpc/include/asm/trace.h +++ b/arch/powerpc/include/asm/trace.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | struct pt_regs; | 9 | struct pt_regs; |
10 | 10 | ||
11 | TRACE_EVENT(irq_entry, | 11 | DECLARE_EVENT_CLASS(ppc64_interrupt_class, |
12 | 12 | ||
13 | TP_PROTO(struct pt_regs *regs), | 13 | TP_PROTO(struct pt_regs *regs), |
14 | 14 | ||
@@ -25,55 +25,32 @@ TRACE_EVENT(irq_entry, | |||
25 | TP_printk("pt_regs=%p", __entry->regs) | 25 | TP_printk("pt_regs=%p", __entry->regs) |
26 | ); | 26 | ); |
27 | 27 | ||
28 | TRACE_EVENT(irq_exit, | 28 | DEFINE_EVENT(ppc64_interrupt_class, irq_entry, |
29 | 29 | ||
30 | TP_PROTO(struct pt_regs *regs), | 30 | TP_PROTO(struct pt_regs *regs), |
31 | 31 | ||
32 | TP_ARGS(regs), | 32 | TP_ARGS(regs) |
33 | |||
34 | TP_STRUCT__entry( | ||
35 | __field(struct pt_regs *, regs) | ||
36 | ), | ||
37 | |||
38 | TP_fast_assign( | ||
39 | __entry->regs = regs; | ||
40 | ), | ||
41 | |||
42 | TP_printk("pt_regs=%p", __entry->regs) | ||
43 | ); | 33 | ); |
44 | 34 | ||
45 | TRACE_EVENT(timer_interrupt_entry, | 35 | DEFINE_EVENT(ppc64_interrupt_class, irq_exit, |
46 | 36 | ||
47 | TP_PROTO(struct pt_regs *regs), | 37 | TP_PROTO(struct pt_regs *regs), |
48 | 38 | ||
49 | TP_ARGS(regs), | 39 | TP_ARGS(regs) |
50 | |||
51 | TP_STRUCT__entry( | ||
52 | __field(struct pt_regs *, regs) | ||
53 | ), | ||
54 | |||
55 | TP_fast_assign( | ||
56 | __entry->regs = regs; | ||
57 | ), | ||
58 | |||
59 | TP_printk("pt_regs=%p", __entry->regs) | ||
60 | ); | 40 | ); |
61 | 41 | ||
62 | TRACE_EVENT(timer_interrupt_exit, | 42 | DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_entry, |
63 | 43 | ||
64 | TP_PROTO(struct pt_regs *regs), | 44 | TP_PROTO(struct pt_regs *regs), |
65 | 45 | ||
66 | TP_ARGS(regs), | 46 | TP_ARGS(regs) |
47 | ); | ||
67 | 48 | ||
68 | TP_STRUCT__entry( | 49 | DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit, |
69 | __field(struct pt_regs *, regs) | ||
70 | ), | ||
71 | 50 | ||
72 | TP_fast_assign( | 51 | TP_PROTO(struct pt_regs *regs), |
73 | __entry->regs = regs; | ||
74 | ), | ||
75 | 52 | ||
76 | TP_printk("pt_regs=%p", __entry->regs) | 53 | TP_ARGS(regs) |
77 | ); | 54 | ); |
78 | 55 | ||
79 | #ifdef CONFIG_PPC_PSERIES | 56 | #ifdef CONFIG_PPC_PSERIES |