[RFC patch 28/32] trace event powerpc remove semicolons

Mathieu Desnoyers
2011-05-02T22:06:31Z

[-- Attachment #1: trace-event-powerpc-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2974 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Anton Blanchard <anton@samba.org>
CC: Paul Mackerras <paulus@samba.org>
CC: Christoph Hellwig <hch@lst.de>
CC: Jeremy Kerr <jk@ozlabs.org>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/include/asm/trace.h | 23 +++++++++++++++++------
arch/powerpc/platforms/cell/spufs/sputrace.h | 2 +-
2 files changed, 18 insertions(+), 7 deletions(-)

Index: linux-2.6-lttng/arch/powerpc/include/asm/trace.h
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/include/asm/trace.h
+++ linux-2.6-lttng/arch/powerpc/include/asm/trace.h
@@ -6,8 +6,13 @@

#include <linux/tracepoint.h>

+#ifndef _TRACE_POWERPC_DEF_
+#define _TRACE_POWERPC_DEF_
+
struct pt_regs;

+#endif /* _TRACE_POWERPC_DEF_ */
+
TRACE_EVENT(irq_entry,

TP_PROTO(struct pt_regs *regs),
@@ -23,7 +28,7 @@ TRACE_EVENT(irq_entry,
),

TP_printk("pt_regs=%p", __entry->regs)
-);
+)

TRACE_EVENT(irq_exit,

@@ -40,7 +45,7 @@ TRACE_EVENT(irq_exit,
),

TP_printk("pt_regs=%p", __entry->regs)
-);
+)

TRACE_EVENT(timer_interrupt_entry,

@@ -57,7 +62,7 @@ TRACE_EVENT(timer_interrupt_entry,
),

TP_printk("pt_regs=%p", __entry->regs)
-);
+)

TRACE_EVENT(timer_interrupt_exit,

@@ -74,12 +79,18 @@ TRACE_EVENT(timer_interrupt_exit,
),

TP_printk("pt_regs=%p", __entry->regs)
-);
+)

#ifdef CONFIG_PPC_PSERIES
+
+#ifndef _TRACE_PPC_PSERIES_DEF_
+#define _TRACE_PPC_PSERIES_DEF_
+
extern void hcall_tracepoint_regfunc(void);
extern void hcall_tracepoint_unregfunc(void);

+#endif /* _TRACE_PPC_PSERIES_DEF_ */
+
TRACE_EVENT_FN(hcall_entry,

TP_PROTO(unsigned long opcode, unsigned long *args),
@@ -97,7 +108,7 @@ TRACE_EVENT_FN(hcall_entry,
TP_printk("opcode=%lu", __entry->opcode),

hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
-);
+)

TRACE_EVENT_FN(hcall_exit,

@@ -119,7 +130,7 @@ TRACE_EVENT_FN(hcall_exit,
TP_printk("opcode=%lu retval=%lu", __entry->opcode, __entry->retval),

hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
-);
+)
#endif

#endif /* _TRACE_POWERPC_H */
Index: linux-2.6-lttng/arch/powerpc/platforms/cell/spufs/sputrace.h
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/platforms/cell/spufs/sputrace.h
+++ linux-2.6-lttng/arch/powerpc/platforms/cell/spufs/sputrace.h
@@ -24,7 +24,7 @@ TRACE_EVENT(spufs_context,

TP_printk("%s (ctxthread = %d, spu = %d)",
__entry->name, __entry->owner_tid, __entry->number)
-);
+)

#define spu_context_trace(name, ctx, spu) \
trace_spufs_context(ctx, spu, __stringify(name))