power.h 649 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _TRACE_POWER_H
  2. #define _TRACE_POWER_H
  3. #include <linux/ktime.h>
  4. #include <linux/tracepoint.h>
  5. enum {
  6. POWER_NONE = 0,
  7. POWER_CSTATE = 1,
  8. POWER_PSTATE = 2,
  9. };
  10. struct power_trace {
  11. #ifdef CONFIG_POWER_TRACER
  12. ktime_t stamp;
  13. ktime_t end;
  14. int type;
  15. int state;
  16. #endif
  17. };
  18. DECLARE_TRACE(power_start,
  19. TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
  20. TPARGS(it, type, state));
  21. DECLARE_TRACE(power_mark,
  22. TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
  23. TPARGS(it, type, state));
  24. DECLARE_TRACE(power_end,
  25. TPPROTO(struct power_trace *it),
  26. TPARGS(it));
  27. #endif /* _TRACE_POWER_H */