Skip to content

Commit 9843064

Browse files
Avadhut NaikIngo Molnar
authored andcommitted
tracing: Add the ::ppin field to the mce_record tracepoint
Machine Check Error information from 'struct mce' is exposed to userspace through the mce_record tracepoint. Currently, however, the PPIN (Protected Processor Inventory Number) field of 'struct mce' is not exposed. Add a PPIN field to the tracepoint as it provides a unique identifier for the system (or socket in case of multi-socket systems) on which the MCE has been received. Also, add a comment explaining the kind of information that can be and should be added to the tracepoint. Signed-off-by: Avadhut Naik <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Sohil Mehta <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ac5e80e commit 9843064

File tree

1 file changed

+12
-1
lines changed
  • include/trace/events

1 file changed

+12
-1
lines changed

include/trace/events/mce.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
#include <linux/tracepoint.h>
1010
#include <asm/mce.h>
1111

12+
/*
13+
* MCE Event Record.
14+
*
15+
* Only very relevant and transient information which cannot be
16+
* gathered from a system by any other means or which can only be
17+
* acquired arduously should be added to this record.
18+
*/
19+
1220
TRACE_EVENT(mce_record,
1321

1422
TP_PROTO(struct mce *m),
@@ -25,6 +33,7 @@ TRACE_EVENT(mce_record,
2533
__field( u64, ipid )
2634
__field( u64, ip )
2735
__field( u64, tsc )
36+
__field( u64, ppin )
2837
__field( u64, walltime )
2938
__field( u32, cpu )
3039
__field( u32, cpuid )
@@ -45,6 +54,7 @@ TRACE_EVENT(mce_record,
4554
__entry->ipid = m->ipid;
4655
__entry->ip = m->ip;
4756
__entry->tsc = m->tsc;
57+
__entry->ppin = m->ppin;
4858
__entry->walltime = m->time;
4959
__entry->cpu = m->extcpu;
5060
__entry->cpuid = m->cpuid;
@@ -55,7 +65,7 @@ TRACE_EVENT(mce_record,
5565
__entry->cpuvendor = m->cpuvendor;
5666
),
5767

58-
TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR: %016Lx, MISC: %016Lx, SYND: %016Lx, RIP: %02x:<%016Lx>, TSC: %llx, vendor: %u, CPUID: %x, time: %llu, socket: %u, APIC: %x",
68+
TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR: %016Lx, MISC: %016Lx, SYND: %016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %llx, vendor: %u, CPUID: %x, time: %llu, socket: %u, APIC: %x",
5969
__entry->cpu,
6070
__entry->mcgcap, __entry->mcgstatus,
6171
__entry->bank, __entry->status,
@@ -65,6 +75,7 @@ TRACE_EVENT(mce_record,
6575
__entry->synd,
6676
__entry->cs, __entry->ip,
6777
__entry->tsc,
78+
__entry->ppin,
6879
__entry->cpuvendor,
6980
__entry->cpuid,
7081
__entry->walltime,

0 commit comments

Comments
 (0)