]> bbs.cooldavid.org Git - net-next-2.6.git/blob - include/trace/events/irq.h
768686467518533b08223ca20f61ecbd7c6d1522
[net-next-2.6.git] / include / trace / events / irq.h
1 #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _TRACE_IRQ_H
3
4 #include <linux/tracepoint.h>
5 #include <linux/interrupt.h>
6
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM irq
9
10 /*
11  * Tracepoint for entry of interrupt handler:
12  */
13 TRACE_EVENT(irq_handler_entry,
14
15         TP_PROTO(int irq, struct irqaction *action),
16
17         TP_ARGS(irq, action),
18
19         TP_STRUCT__entry(
20                 __field(        int,    irq             )
21                 __string(       name,   action->name    )
22         ),
23
24         TP_fast_assign(
25                 __entry->irq = irq;
26                 __assign_str(name, action->name);
27         ),
28
29         TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name))
30 );
31
32 /*
33  * Tracepoint for return of an interrupt handler:
34  */
35 TRACE_EVENT(irq_handler_exit,
36
37         TP_PROTO(int irq, struct irqaction *action, int ret),
38
39         TP_ARGS(irq, action, ret),
40
41         TP_STRUCT__entry(
42                 __field(        int,    irq     )
43                 __field(        int,    ret     )
44         ),
45
46         TP_fast_assign(
47                 __entry->irq    = irq;
48                 __entry->ret    = ret;
49         ),
50
51         TP_printk("irq=%d return=%s",
52                   __entry->irq, __entry->ret ? "handled" : "unhandled")
53 );
54
55 TRACE_EVENT(softirq_entry,
56
57         TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
58
59         TP_ARGS(h, vec),
60
61         TP_STRUCT__entry(
62                 __field(        int,    vec                     )
63                 __string(       name,   softirq_to_name[h-vec]  )
64         ),
65
66         TP_fast_assign(
67                 __entry->vec = (int)(h - vec);
68                 __assign_str(name, softirq_to_name[h-vec]);
69         ),
70
71         TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
72 );
73
74 TRACE_EVENT(softirq_exit,
75
76         TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
77
78         TP_ARGS(h, vec),
79
80         TP_STRUCT__entry(
81                 __field(        int,    vec                     )
82                 __string(       name,   softirq_to_name[h-vec]  )
83         ),
84
85         TP_fast_assign(
86                 __entry->vec = (int)(h - vec);
87                 __assign_str(name, softirq_to_name[h-vec]);
88         ),
89
90         TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
91 );
92
93 #endif /*  _TRACE_IRQ_H */
94
95 /* This part must be outside protection */
96 #include <trace/define_trace.h>