irq.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
  2. #define _TRACE_IRQ_H
  3. #include <linux/tracepoint.h>
  4. #include <linux/interrupt.h>
  5. #undef TRACE_SYSTEM
  6. #define TRACE_SYSTEM irq
  7. /*
  8. * Tracepoint for entry of interrupt handler:
  9. */
  10. TRACE_EVENT(irq_handler_entry,
  11. TP_PROTO(int irq, struct irqaction *action),
  12. TP_ARGS(irq, action),
  13. TP_STRUCT__entry(
  14. __field( int, irq )
  15. __string( name, action->name )
  16. ),
  17. TP_fast_assign(
  18. __entry->irq = irq;
  19. __assign_str(name, action->name);
  20. ),
  21. TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name))
  22. );
  23. /*
  24. * Tracepoint for return of an interrupt handler:
  25. */
  26. TRACE_EVENT(irq_handler_exit,
  27. TP_PROTO(int irq, struct irqaction *action, int ret),
  28. TP_ARGS(irq, action, ret),
  29. TP_STRUCT__entry(
  30. __field( int, irq )
  31. __field( int, ret )
  32. ),
  33. TP_fast_assign(
  34. __entry->irq = irq;
  35. __entry->ret = ret;
  36. ),
  37. TP_printk("irq=%d return=%s",
  38. __entry->irq, __entry->ret ? "handled" : "unhandled")
  39. );
  40. TRACE_EVENT(softirq_entry,
  41. TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
  42. TP_ARGS(h, vec),
  43. TP_STRUCT__entry(
  44. __field( int, vec )
  45. __string( name, softirq_to_name[h-vec] )
  46. ),
  47. TP_fast_assign(
  48. __entry->vec = (int)(h - vec);
  49. __assign_str(name, softirq_to_name[h-vec]);
  50. ),
  51. TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
  52. );
  53. TRACE_EVENT(softirq_exit,
  54. TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
  55. TP_ARGS(h, vec),
  56. TP_STRUCT__entry(
  57. __field( int, vec )
  58. __string( name, softirq_to_name[h-vec] )
  59. ),
  60. TP_fast_assign(
  61. __entry->vec = (int)(h - vec);
  62. __assign_str(name, softirq_to_name[h-vec]);
  63. ),
  64. TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
  65. );
  66. #endif /* _TRACE_IRQ_H */
  67. /* This part must be outside protection */
  68. #include <trace/define_trace.h>