#undef TRACE_SYSTEM
#define TRACE_SYSTEM irq
-#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_IRQ_H
+#if !defined(LTTNG_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_IRQ_H
-#include <linux/tracepoint.h>
+#include "../../../probes/lttng-tracepoint-event.h"
#ifndef _TRACE_IRQ_DEF_
#define _TRACE_IRQ_DEF_
struct irqaction;
struct softirq_action;
-#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
-#define show_softirq_name(val) \
- __print_symbolic(val, \
- softirq_name(HI), \
- softirq_name(TIMER), \
- softirq_name(NET_TX), \
- softirq_name(NET_RX), \
- softirq_name(BLOCK), \
- softirq_name(BLOCK_IOPOLL), \
- softirq_name(TASKLET), \
- softirq_name(SCHED), \
- softirq_name(HRTIMER), \
- softirq_name(RCU))
-
#endif /* _TRACE_IRQ_DEF_ */
/**
* conjunction with the irq_handler_exit tracepoint, we can figure
* out irq handler latencies.
*/
-TRACE_EVENT(irq_handler_entry,
+LTTNG_TRACEPOINT_EVENT(irq_handler_entry,
TP_PROTO(int irq, struct irqaction *action),
* a shared irq line, or the irq was not handled successfully. Can be used in
* conjunction with the irq_handler_entry to understand irq handler latencies.
*/
-TRACE_EVENT(irq_handler_exit,
+LTTNG_TRACEPOINT_EVENT(irq_handler_exit,
TP_PROTO(int irq, struct irqaction *action, int ret),
)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-DECLARE_EVENT_CLASS(softirq,
+LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
TP_PROTO(unsigned int vec_nr),
tp_assign(vec, vec_nr)
),
- TP_printk("vec=%u [action=%s]", __entry->vec,
- show_softirq_name(__entry->vec))
+ TP_printk()
)
/**
* When used in combination with the softirq_exit tracepoint
* we can determine the softirq handler runtine.
*/
-DEFINE_EVENT(softirq, softirq_entry,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
TP_PROTO(unsigned int vec_nr),
* When used in combination with the softirq_entry tracepoint
* we can determine the softirq handler runtine.
*/
-DEFINE_EVENT(softirq, softirq_exit,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
TP_PROTO(unsigned int vec_nr),
* When used in combination with the softirq_entry tracepoint
* we can determine the softirq raise to run latency.
*/
-DEFINE_EVENT(softirq, softirq_raise,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_raise,
TP_PROTO(unsigned int vec_nr),
TP_ARGS(vec_nr)
)
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-DECLARE_EVENT_CLASS(softirq,
+LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
tp_assign(vec, (int)(h - vec))
),
- TP_printk("vec=%u [action=%s]", __entry->vec,
- show_softirq_name(__entry->vec))
+ TP_printk()
)
/**
* When used in combination with the softirq_exit tracepoint
* we can determine the softirq handler runtine.
*/
-DEFINE_EVENT(softirq, softirq_entry,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
* When used in combination with the softirq_entry tracepoint
* we can determine the softirq handler runtine.
*/
-DEFINE_EVENT(softirq, softirq_exit,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
* When used in combination with the softirq_entry tracepoint
* we can determine the softirq raise to run latency.
*/
-DEFINE_EVENT(softirq, softirq_raise,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_raise,
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
)
#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-#endif /* _TRACE_IRQ_H */
+#endif /* LTTNG_TRACE_IRQ_H */
/* This part must be outside protection */
#include "../../../probes/define_trace.h"