thermal_virtual.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (c) 2017 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 thermal_virtual
  14. #if !defined(_TRACE_VIRTUAL_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_VIRTUAL_H
  16. #include <linux/thermal.h>
  17. #include <linux/tracepoint.h>
  18. TRACE_EVENT(virtual_temperature,
  19. TP_PROTO(struct thermal_zone_device *virt_tz,
  20. struct thermal_zone_device *tz, int sens_temp,
  21. int est_temp),
  22. TP_ARGS(virt_tz, tz, sens_temp, est_temp),
  23. TP_STRUCT__entry(
  24. __string(virt_zone, virt_tz->type)
  25. __string(therm_zone, tz->type)
  26. __field(int, sens_temp)
  27. __field(int, est_temp)
  28. ),
  29. TP_fast_assign(
  30. __assign_str(virt_zone, virt_tz->type);
  31. __assign_str(therm_zone, tz->type);
  32. __entry->sens_temp = sens_temp;
  33. __entry->est_temp = est_temp;
  34. ),
  35. TP_printk("virt_zone=%s zone=%s temp=%d virtual zone estimated temp=%d",
  36. __get_str(virt_zone), __get_str(therm_zone),
  37. __entry->sens_temp,
  38. __entry->est_temp)
  39. );
  40. #endif /* _TRACE_VIRTUAL_H */
  41. /* This part must be outside protection */
  42. #include <trace/define_trace.h>