power_cpu_migrate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM power
  3. #if !defined(_TRACE_POWER_CPU_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_POWER_CPU_MIGRATE_H
  5. #include <linux/tracepoint.h>
  6. #define __cpu_migrate_proto \
  7. TP_PROTO(u64 timestamp, \
  8. u32 cpu_hwid)
  9. #define __cpu_migrate_args \
  10. TP_ARGS(timestamp, \
  11. cpu_hwid)
  12. DECLARE_EVENT_CLASS(cpu_migrate,
  13. __cpu_migrate_proto,
  14. __cpu_migrate_args,
  15. TP_STRUCT__entry(
  16. __field(u64, timestamp )
  17. __field(u32, cpu_hwid )
  18. ),
  19. TP_fast_assign(
  20. __entry->timestamp = timestamp;
  21. __entry->cpu_hwid = cpu_hwid;
  22. ),
  23. TP_printk("timestamp=%llu cpu_hwid=0x%08lX",
  24. (unsigned long long)__entry->timestamp,
  25. (unsigned long)__entry->cpu_hwid
  26. )
  27. );
  28. #define __define_cpu_migrate_event(name) \
  29. DEFINE_EVENT(cpu_migrate, cpu_migrate_##name, \
  30. __cpu_migrate_proto, \
  31. __cpu_migrate_args \
  32. )
  33. __define_cpu_migrate_event(begin);
  34. __define_cpu_migrate_event(finish);
  35. __define_cpu_migrate_event(current);
  36. #undef __define_cpu_migrate
  37. #undef __cpu_migrate_proto
  38. #undef __cpu_migrate_args
  39. /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
  40. #ifndef _PWR_CPU_MIGRATE_EVENT_AVOID_DOUBLE_DEFINING
  41. #define _PWR_CPU_MIGRATE_EVENT_AVOID_DOUBLE_DEFINING
  42. /*
  43. * Set from_phys_cpu and to_phys_cpu to CPU_MIGRATE_ALL_CPUS to indicate
  44. * a whole-cluster migration:
  45. */
  46. #define CPU_MIGRATE_ALL_CPUS 0x80000000U
  47. #endif
  48. #endif /* _TRACE_POWER_CPU_MIGRATE_H */
  49. /* This part must be outside protection */
  50. #undef TRACE_INCLUDE_FILE
  51. #define TRACE_INCLUDE_FILE power_cpu_migrate
  52. #include <trace/define_trace.h>