Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM mce |
| 3 | |
| 4 | #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_MCE_H |
| 6 | |
| 7 | #include <linux/ktime.h> |
| 8 | #include <linux/tracepoint.h> |
| 9 | #include <asm/mce.h> |
| 10 | |
| 11 | TRACE_EVENT(mce_record, |
| 12 | |
| 13 | TP_PROTO(struct mce *m), |
| 14 | |
| 15 | TP_ARGS(m), |
| 16 | |
| 17 | TP_STRUCT__entry( |
| 18 | __field( u64, mcgcap ) |
| 19 | __field( u64, mcgstatus ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 20 | __field( u64, status ) |
| 21 | __field( u64, addr ) |
| 22 | __field( u64, misc ) |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 23 | __field( u64, synd ) |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 24 | __field( u64, ipid ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 25 | __field( u64, ip ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 26 | __field( u64, tsc ) |
| 27 | __field( u64, walltime ) |
| 28 | __field( u32, cpu ) |
| 29 | __field( u32, cpuid ) |
| 30 | __field( u32, apicid ) |
| 31 | __field( u32, socketid ) |
David Sharp | ad440ad | 2010-12-03 16:13:22 -0800 | [diff] [blame] | 32 | __field( u8, cs ) |
| 33 | __field( u8, bank ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 34 | __field( u8, cpuvendor ) |
| 35 | ), |
| 36 | |
| 37 | TP_fast_assign( |
| 38 | __entry->mcgcap = m->mcgcap; |
| 39 | __entry->mcgstatus = m->mcgstatus; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 40 | __entry->status = m->status; |
| 41 | __entry->addr = m->addr; |
| 42 | __entry->misc = m->misc; |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 43 | __entry->synd = m->synd; |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 44 | __entry->ipid = m->ipid; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 45 | __entry->ip = m->ip; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 46 | __entry->tsc = m->tsc; |
| 47 | __entry->walltime = m->time; |
| 48 | __entry->cpu = m->extcpu; |
| 49 | __entry->cpuid = m->cpuid; |
| 50 | __entry->apicid = m->apicid; |
| 51 | __entry->socketid = m->socketid; |
David Sharp | ad440ad | 2010-12-03 16:13:22 -0800 | [diff] [blame] | 52 | __entry->cs = m->cs; |
| 53 | __entry->bank = m->bank; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 54 | __entry->cpuvendor = m->cpuvendor; |
| 55 | ), |
| 56 | |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 57 | 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", |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 58 | __entry->cpu, |
| 59 | __entry->mcgcap, __entry->mcgstatus, |
| 60 | __entry->bank, __entry->status, |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 61 | __entry->ipid, |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 62 | __entry->addr, __entry->misc, __entry->synd, |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 63 | __entry->cs, __entry->ip, |
| 64 | __entry->tsc, |
| 65 | __entry->cpuvendor, __entry->cpuid, |
| 66 | __entry->walltime, |
| 67 | __entry->socketid, |
| 68 | __entry->apicid) |
| 69 | ); |
| 70 | |
| 71 | #endif /* _TRACE_MCE_H */ |
| 72 | |
| 73 | /* This part must be outside protection */ |
| 74 | #include <trace/define_trace.h> |