mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
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>
This commit is contained in:
parent
641bd53a61
commit
d136e27326
1 changed files with 11 additions and 34 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
struct pt_regs;
|
struct pt_regs;
|
||||||
|
|
||||||
TRACE_EVENT(irq_entry,
|
DECLARE_EVENT_CLASS(ppc64_interrupt_class,
|
||||||
|
|
||||||
TP_PROTO(struct pt_regs *regs),
|
TP_PROTO(struct pt_regs *regs),
|
||||||
|
|
||||||
|
@ -25,55 +25,32 @@ TRACE_EVENT(irq_entry,
|
||||||
TP_printk("pt_regs=%p", __entry->regs)
|
TP_printk("pt_regs=%p", __entry->regs)
|
||||||
);
|
);
|
||||||
|
|
||||||
TRACE_EVENT(irq_exit,
|
DEFINE_EVENT(ppc64_interrupt_class, irq_entry,
|
||||||
|
|
||||||
TP_PROTO(struct pt_regs *regs),
|
TP_PROTO(struct pt_regs *regs),
|
||||||
|
|
||||||
TP_ARGS(regs),
|
TP_ARGS(regs)
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
|
||||||
__field(struct pt_regs *, regs)
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_fast_assign(
|
|
||||||
__entry->regs = regs;
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_printk("pt_regs=%p", __entry->regs)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TRACE_EVENT(timer_interrupt_entry,
|
DEFINE_EVENT(ppc64_interrupt_class, irq_exit,
|
||||||
|
|
||||||
TP_PROTO(struct pt_regs *regs),
|
TP_PROTO(struct pt_regs *regs),
|
||||||
|
|
||||||
TP_ARGS(regs),
|
TP_ARGS(regs)
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
|
||||||
__field(struct pt_regs *, regs)
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_fast_assign(
|
|
||||||
__entry->regs = regs;
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_printk("pt_regs=%p", __entry->regs)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TRACE_EVENT(timer_interrupt_exit,
|
DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_entry,
|
||||||
|
|
||||||
TP_PROTO(struct pt_regs *regs),
|
TP_PROTO(struct pt_regs *regs),
|
||||||
|
|
||||||
TP_ARGS(regs),
|
TP_ARGS(regs)
|
||||||
|
);
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
|
||||||
__field(struct pt_regs *, regs)
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_PROTO(struct pt_regs *regs),
|
||||||
__entry->regs = regs;
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_printk("pt_regs=%p", __entry->regs)
|
TP_ARGS(regs)
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_PSERIES
|
#ifdef CONFIG_PPC_PSERIES
|
||||||
|
|
Loading…
Reference in a new issue