2009-04-10 20:54:16 +08:00
|
|
|
#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
|
2009-02-26 23:11:05 +08:00
|
|
|
#define _TRACE_IRQ_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
2009-04-10 20:54:16 +08:00
|
|
|
#include <linux/interrupt.h>
|
|
|
|
|
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM irq
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Tracepoint for entry of interrupt handler:
|
|
|
|
*/
|
2009-04-24 23:26:55 +08:00
|
|
|
TRACE_EVENT(irq_handler_entry,
|
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_PROTO(int irq, struct irqaction *action),
|
2009-04-24 23:26:55 +08:00
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_ARGS(irq, action),
|
2009-04-24 23:26:55 +08:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, irq )
|
|
|
|
__string( name, action->name )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->irq = irq;
|
|
|
|
__assign_str(name, action->name);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name))
|
|
|
|
);
|
2009-04-10 20:54:16 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Tracepoint for return of an interrupt handler:
|
|
|
|
*/
|
|
|
|
TRACE_EVENT(irq_handler_exit,
|
|
|
|
|
|
|
|
TP_PROTO(int irq, struct irqaction *action, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(irq, action, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, irq )
|
|
|
|
__field( int, ret )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->irq = irq;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("irq=%d return=%s",
|
|
|
|
__entry->irq, __entry->ret ? "handled" : "unhandled")
|
|
|
|
);
|
|
|
|
|
2009-04-24 23:26:55 +08:00
|
|
|
TRACE_EVENT(softirq_entry,
|
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
|
2009-04-24 23:26:55 +08:00
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_ARGS(h, vec),
|
2009-02-26 23:11:05 +08:00
|
|
|
|
2009-04-24 23:26:55 +08:00
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, vec )
|
|
|
|
__string( name, softirq_to_name[h-vec] )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->vec = (int)(h - vec);
|
|
|
|
__assign_str(name, softirq_to_name[h-vec]);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(softirq_exit,
|
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
|
2009-04-24 23:26:55 +08:00
|
|
|
|
2009-04-10 20:54:16 +08:00
|
|
|
TP_ARGS(h, vec),
|
2009-04-24 23:26:55 +08:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, vec )
|
|
|
|
__string( name, softirq_to_name[h-vec] )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->vec = (int)(h - vec);
|
|
|
|
__assign_str(name, softirq_to_name[h-vec]);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
|
|
|
|
);
|
2009-02-26 23:11:05 +08:00
|
|
|
|
2009-04-10 21:36:00 +08:00
|
|
|
#endif /* _TRACE_IRQ_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|