initcall.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM initcall
  4. #if !defined(_TRACE_INITCALL_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_INITCALL_H
  6. #include <linux/tracepoint.h>
  7. TRACE_EVENT(initcall_level,
  8. TP_PROTO(const char *level),
  9. TP_ARGS(level),
  10. TP_STRUCT__entry(
  11. __string(level, level)
  12. ),
  13. TP_fast_assign(
  14. __assign_str(level, level);
  15. ),
  16. TP_printk("level=%s", __get_str(level))
  17. );
  18. TRACE_EVENT(initcall_start,
  19. TP_PROTO(initcall_t func),
  20. TP_ARGS(func),
  21. TP_STRUCT__entry(
  22. /*
  23. * Use field_struct to avoid is_signed_type()
  24. * comparison of a function pointer
  25. */
  26. __field_struct(initcall_t, func)
  27. ),
  28. TP_fast_assign(
  29. __entry->func = func;
  30. ),
  31. TP_printk("func=%pS", __entry->func)
  32. );
  33. TRACE_EVENT(initcall_finish,
  34. TP_PROTO(initcall_t func, int ret),
  35. TP_ARGS(func, ret),
  36. TP_STRUCT__entry(
  37. /*
  38. * Use field_struct to avoid is_signed_type()
  39. * comparison of a function pointer
  40. */
  41. __field_struct(initcall_t, func)
  42. __field(int, ret)
  43. ),
  44. TP_fast_assign(
  45. __entry->func = func;
  46. __entry->ret = ret;
  47. ),
  48. TP_printk("func=%pS ret=%d", __entry->func, __entry->ret)
  49. );
  50. #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */
  51. /* This part must be outside protection */
  52. #include <trace/define_trace.h>