mce.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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, synd )
  18. __field( u64, ipid )
  19. __field( u64, ip )
  20. __field( u64, tsc )
  21. __field( u64, walltime )
  22. __field( u32, cpu )
  23. __field( u32, cpuid )
  24. __field( u32, apicid )
  25. __field( u32, socketid )
  26. __field( u8, cs )
  27. __field( u8, bank )
  28. __field( u8, cpuvendor )
  29. ),
  30. TP_fast_assign(
  31. __entry->mcgcap = m->mcgcap;
  32. __entry->mcgstatus = m->mcgstatus;
  33. __entry->status = m->status;
  34. __entry->addr = m->addr;
  35. __entry->misc = m->misc;
  36. __entry->synd = m->synd;
  37. __entry->ipid = m->ipid;
  38. __entry->ip = m->ip;
  39. __entry->tsc = m->tsc;
  40. __entry->walltime = m->time;
  41. __entry->cpu = m->extcpu;
  42. __entry->cpuid = m->cpuid;
  43. __entry->apicid = m->apicid;
  44. __entry->socketid = m->socketid;
  45. __entry->cs = m->cs;
  46. __entry->bank = m->bank;
  47. __entry->cpuvendor = m->cpuvendor;
  48. ),
  49. TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x",
  50. __entry->cpu,
  51. __entry->mcgcap, __entry->mcgstatus,
  52. __entry->bank, __entry->status,
  53. __entry->ipid,
  54. __entry->addr, __entry->misc, __entry->synd,
  55. __entry->cs, __entry->ip,
  56. __entry->tsc,
  57. __entry->cpuvendor, __entry->cpuid,
  58. __entry->walltime,
  59. __entry->socketid,
  60. __entry->apicid)
  61. );
  62. #endif /* _TRACE_MCE_H */
  63. /* This part must be outside protection */
  64. #include <trace/define_trace.h>