mpm.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM mpm
  14. #if !defined(_TRACE_MPM_) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_MPM_H_
  16. #include <linux/tracepoint.h>
  17. TRACE_EVENT(mpm_wakeup_enable_irqs,
  18. TP_PROTO(uint32_t index, uint32_t irqs),
  19. TP_ARGS(index, irqs),
  20. TP_STRUCT__entry(
  21. __field(uint32_t, index)
  22. __field(uint32_t, irqs)
  23. ),
  24. TP_fast_assign(
  25. __entry->index = index;
  26. __entry->irqs = irqs;
  27. ),
  28. TP_printk("index:%u wakeup_capable_irqs:0x%x",
  29. __entry->index, __entry->irqs)
  30. );
  31. TRACE_EVENT(mpm_wakeup_pending_irqs,
  32. TP_PROTO(uint32_t index, uint32_t irqs),
  33. TP_ARGS(index, irqs),
  34. TP_STRUCT__entry(
  35. __field(uint32_t, index)
  36. __field(uint32_t, irqs)
  37. ),
  38. TP_fast_assign(
  39. __entry->index = index;
  40. __entry->irqs = irqs;
  41. ),
  42. TP_printk("index:%u wakeup_irqs:0x%x", __entry->index, __entry->irqs)
  43. );
  44. TRACE_EVENT(mpm_wakeup_time,
  45. TP_PROTO(bool from_idle, u64 wakeup, u64 current_ticks),
  46. TP_ARGS(from_idle, wakeup, current_ticks),
  47. TP_STRUCT__entry(
  48. __field(bool, from_idle)
  49. __field(u64, wakeup)
  50. __field(u64, current_ticks)
  51. ),
  52. TP_fast_assign(
  53. __entry->from_idle = from_idle;
  54. __entry->wakeup = wakeup;
  55. __entry->current_ticks = current_ticks;
  56. ),
  57. TP_printk("idle:%d wakeup:0x%llx current:0x%llx", __entry->from_idle,
  58. __entry->wakeup, __entry->current_ticks)
  59. );
  60. #endif
  61. #define TRACE_INCLUDE_FILE mpm
  62. #include <trace/define_trace.h>