--- zzzz-none-000/linux-3.10.107/include/trace/events/irq.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/include/trace/events/irq.h 2021-02-04 17:41:59.000000000 +0000 @@ -8,20 +8,36 @@ struct irqaction; struct softirq_action; +struct tasklet_struct; + +#define SOFTIRQ_NAME_LIST \ + 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_end(RCU) + +#undef softirq_name +#undef softirq_name_end + +#define softirq_name(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ); +#define softirq_name_end(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ); + +SOFTIRQ_NAME_LIST + +#undef softirq_name +#undef softirq_name_end + +#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }, +#define softirq_name_end(sirq) { sirq##_SOFTIRQ, #sirq } -#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)) + __print_symbolic(val, SOFTIRQ_NAME_LIST) /** * irq_handler_entry - called immediately before the irq action handler @@ -84,6 +100,54 @@ __entry->irq, __entry->ret ? "handled" : "unhandled") ); +/** + * tlet_entry - called immediately before the tasklet handler + * @t: pointer to struct tasklet_struct + * + * When used in combination with the tlet_exit tracepoint we can + * determine the latency of the tasklet. + */ +TRACE_EVENT(tlet_entry, + + TP_PROTO(struct tasklet_struct *t), + + TP_ARGS(t), + + TP_STRUCT__entry( + __field(void *, func) + ), + + TP_fast_assign( + __entry->func = t->func; + ), + + TP_printk("func=%pf", __entry->func) +); + +/** + * tlet_exit - called immediately after the tasklet handler returns + * @t: pointer to struct tasklet_struct + * + * When used in combination with the tasklet_entry tracepoint we can + * determine the latency of the tasklet. + */ +TRACE_EVENT(tlet_exit, + + TP_PROTO(struct tasklet_struct *t), + + TP_ARGS(t), + + TP_STRUCT__entry( + __field(void *, func) + ), + + TP_fast_assign( + __entry->func = t->func; + ), + + TP_printk("func=%pf", __entry->func) +); + DECLARE_EVENT_CLASS(softirq, TP_PROTO(unsigned int vec_nr), @@ -107,7 +171,7 @@ * @vec_nr: softirq vector number * * When used in combination with the softirq_exit tracepoint - * we can determine the softirq handler runtine. + * we can determine the softirq handler routine. */ DEFINE_EVENT(softirq, softirq_entry, @@ -121,7 +185,7 @@ * @vec_nr: softirq vector number * * When used in combination with the softirq_entry tracepoint - * we can determine the softirq handler runtine. + * we can determine the softirq handler routine. */ DEFINE_EVENT(softirq, softirq_exit,