mce.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM mce
  3. #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_MCE_H
  5. #include <linux/ktime.h>
  6. #include <linux/tracepoint.h>
  7. #include <asm/mce.h>
  8. TRACE_EVENT(mce_record,
  9. TP_PROTO(struct mce *m),
  10. TP_ARGS(m),
  11. TP_STRUCT__entry(
  12. __field( u64, mcgcap )
  13. __field( u64, mcgstatus )
  14. __field( u64, status )
  15. __field( u64, addr )
  16. __field( u64, misc )
  17. __field( u64, ip )
  18. __field( u64, tsc )
  19. __field( u64, walltime )
  20. __field( u32, cpu )
  21. __field( u32, cpuid )
  22. __field( u32, apicid )
  23. __field( u32, socketid )
  24. __field( u8, cs )
  25. __field( u8, bank )
  26. __field( u8, cpuvendor )
  27. ),
  28. TP_fast_assign(
  29. __entry->mcgcap = m->mcgcap;
  30. __entry->mcgstatus = m->mcgstatus;
  31. __entry->status = m->status;
  32. __entry->addr = m->addr;
  33. __entry->misc = m->misc;
  34. __entry->ip = m->ip;
  35. __entry->tsc = m->tsc;
  36. __entry->walltime = m->time;
  37. __entry->cpu = m->extcpu;
  38. __entry->cpuid = m->cpuid;
  39. __entry->apicid = m->apicid;
  40. __entry->socketid = m->socketid;
  41. __entry->cs = m->cs;
  42. __entry->bank = m->bank;
  43. __entry->cpuvendor = m->cpuvendor;
  44. ),
  45. TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, ADDR/MISC: %016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x",
  46. __entry->cpu,
  47. __entry->mcgcap, __entry->mcgstatus,
  48. __entry->bank, __entry->status,
  49. __entry->addr, __entry->misc,
  50. __entry->cs, __entry->ip,
  51. __entry->tsc,
  52. __entry->cpuvendor, __entry->cpuid,
  53. __entry->walltime,
  54. __entry->socketid,
  55. __entry->apicid)
  56. );
  57. #endif /* _TRACE_MCE_H */
  58. /* This part must be outside protection */
  59. #include <trace/define_trace.h>