X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Firq.h;h=e766326d214205f08b8b3af5d556e47265bc074a;hb=3a523f5b6b4f8ca82412cb45f2d2ad9c44e7d249;hp=ac590c9c1017783c1329b0199819d31c379f0867;hpb=f62b389ebaba6abc93afb2cf9fbdf2fe0b632077;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/irq.h b/instrumentation/events/lttng-module/irq.h index ac590c9c..e766326d 100644 --- a/instrumentation/events/lttng-module/irq.h +++ b/instrumentation/events/lttng-module/irq.h @@ -89,6 +89,7 @@ TRACE_EVENT(irq_handler_exit, __entry->irq, __entry->ret ? "handled" : "unhandled") ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) DECLARE_EVENT_CLASS(softirq, TP_PROTO(unsigned int vec_nr), @@ -148,8 +149,72 @@ DEFINE_EVENT(softirq, softirq_raise, TP_ARGS(vec_nr) ) +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */ +DECLARE_EVENT_CLASS(softirq, + + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), + + TP_ARGS(h, vec), + + TP_STRUCT__entry( + __field( unsigned int, vec ) + ), + + TP_fast_assign( + tp_assign(vec, (int)(h - vec)) + ), + + TP_printk("vec=%u [action=%s]", __entry->vec, + show_softirq_name(__entry->vec)) +) + +/** + * softirq_entry - called immediately before the softirq handler + * @h: pointer to struct softirq_action + * @vec: pointer to first struct softirq_action in softirq_vec array + * + * When used in combination with the softirq_exit tracepoint + * we can determine the softirq handler runtine. + */ +DEFINE_EVENT(softirq, softirq_entry, + + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), + + TP_ARGS(h, vec) +) + +/** + * softirq_exit - called immediately after the softirq handler returns + * @h: pointer to struct softirq_action + * @vec: pointer to first struct softirq_action in softirq_vec array + * + * When used in combination with the softirq_entry tracepoint + * we can determine the softirq handler runtine. + */ +DEFINE_EVENT(softirq, softirq_exit, + + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), + + TP_ARGS(h, vec) +) + +/** + * softirq_raise - called immediately when a softirq is raised + * @h: pointer to struct softirq_action + * @vec: pointer to first struct softirq_action in softirq_vec array + * + * When used in combination with the softirq_entry tracepoint + * we can determine the softirq raise to run latency. + */ +DEFINE_EVENT(softirq, softirq_raise, + + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), + + TP_ARGS(h, vec) +) +#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */ #endif /* _TRACE_IRQ_H */ /* This part must be outside protection */ -#include "define_trace.h" +#include "../../../probes/define_trace.h"