dcvsh.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #undef TRACE_SYSTEM
  6. #define TRACE_SYSTEM dcvsh
  7. #if !defined(_TRACE_DCVSH_H) || defined(TRACE_HEADER_MULTI_READ)
  8. #define _TRACE_DCVSH_H
  9. #include <linux/tracepoint.h>
  10. TRACE_EVENT(dcvsh_freq,
  11. TP_PROTO(unsigned long cpu, unsigned long req_freq,
  12. unsigned long throttled_freq, unsigned long thermal_pressure),
  13. TP_ARGS(cpu, req_freq, throttled_freq, thermal_pressure),
  14. TP_STRUCT__entry(
  15. __field(unsigned long, cpu)
  16. __field(unsigned long, req_freq)
  17. __field(unsigned long, throttled_freq)
  18. __field(unsigned long, thermal_pressure)
  19. ),
  20. TP_fast_assign(
  21. __entry->cpu = cpu;
  22. __entry->req_freq = req_freq;
  23. __entry->throttled_freq = throttled_freq;
  24. __entry->thermal_pressure = thermal_pressure;
  25. ),
  26. TP_printk("cpu:%lu requested_freq:%lu throttled_freq:%lu thermal_pressure_freq:%lu",
  27. __entry->cpu,
  28. __entry->req_freq,
  29. __entry->throttled_freq,
  30. __entry->thermal_pressure)
  31. );
  32. TRACE_EVENT(dcvsh_throttle,
  33. TP_PROTO(unsigned long cpu, bool state),
  34. TP_ARGS(cpu, state),
  35. TP_STRUCT__entry(
  36. __field(unsigned long, cpu)
  37. __field(bool, state)
  38. ),
  39. TP_fast_assign(
  40. __entry->cpu = cpu;
  41. __entry->state = state;
  42. ),
  43. TP_printk("cpu:%lu throttle_%s",
  44. __entry->cpu,
  45. __entry->state ? "begin" : "end")
  46. );
  47. #endif /* _TRACE_DCVSH_H */
  48. /* This part must be outside protection */
  49. #include <trace/define_trace.h>