power.h 636 B

1234567891011121314151617181920212223242526272829303132
  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. ktime_t stamp;
  12. ktime_t end;
  13. int type;
  14. int state;
  15. };
  16. DECLARE_TRACE(power_start,
  17. TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state),
  18. TP_ARGS(it, type, state));
  19. DECLARE_TRACE(power_mark,
  20. TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state),
  21. TP_ARGS(it, type, state));
  22. DECLARE_TRACE(power_end,
  23. TP_PROTO(struct power_trace *it),
  24. TP_ARGS(it));
  25. #endif /* _TRACE_POWER_H */