trace_msm_pil_event.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* Copyright (c) 2017, 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 msm_pil_event
  14. #if !defined(_TRACE_MSM_PIL_EVENT_H_) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_MSM_PIL_EVENT_H_
  16. #include <linux/tracepoint.h>
  17. #include <../drivers/soc/qcom/peripheral-loader.h>
  18. TRACE_EVENT(pil_event,
  19. TP_PROTO(const char *event_name, struct pil_desc *desc),
  20. TP_ARGS(event_name, desc),
  21. TP_STRUCT__entry(
  22. __string(event_name, event_name)
  23. __string(fw_name, desc->fw_name)
  24. ),
  25. TP_fast_assign(
  26. __assign_str(event_name, event_name);
  27. __assign_str(fw_name, desc->fw_name);
  28. ),
  29. TP_printk("event_name=%s fw_name=%s",
  30. __get_str(event_name),
  31. __get_str(fw_name))
  32. );
  33. #ifdef CONFIG_MSM_PIL
  34. TRACE_EVENT(pil_notif,
  35. TP_PROTO(const char *event_name, unsigned long code,
  36. const char *fw_name),
  37. TP_ARGS(event_name, code, fw_name),
  38. TP_STRUCT__entry(
  39. __string(event_name, event_name)
  40. __field(unsigned long, code)
  41. __string(fw_name, fw_name)
  42. ),
  43. TP_fast_assign(
  44. __assign_str(event_name, event_name);
  45. __entry->code = code;
  46. __assign_str(fw_name, fw_name);
  47. ),
  48. TP_printk("event_name=%s code=%lu fw=%s",
  49. __get_str(event_name),
  50. __entry->code,
  51. __get_str(fw_name))
  52. );
  53. #else
  54. #define trace_pil_notif(event_name, code, fw_name) do { } while (0)
  55. #endif
  56. TRACE_EVENT(pil_func,
  57. TP_PROTO(const char *func_name),
  58. TP_ARGS(func_name),
  59. TP_STRUCT__entry(
  60. __string(func_name, func_name)
  61. ),
  62. TP_fast_assign(
  63. __assign_str(func_name, func_name);
  64. ),
  65. TP_printk("func_name=%s",
  66. __get_str(func_name))
  67. );
  68. #endif
  69. #define TRACE_INCLUDE_FILE trace_msm_pil_event
  70. #include <trace/define_trace.h>