2 #define TRACE_SYSTEM msr
4 #undef TRACE_INCLUDE_FILE
5 #define TRACE_INCLUDE_FILE msr-trace
7 #undef TRACE_INCLUDE_PATH
8 #define TRACE_INCLUDE_PATH asm/
10 #if !defined(_TRACE_MSR_H) || defined(TRACE_HEADER_MULTI_READ)
13 #include <linux/tracepoint.h>
16 * Tracing for x86 model specific registers. Directly maps to the
17 * RDMSR/WRMSR instructions.
20 DECLARE_EVENT_CLASS(msr_trace_class
,
21 TP_PROTO(unsigned msr
, u64 val
, int failed
),
22 TP_ARGS(msr
, val
, failed
),
24 __field( unsigned, msr
)
26 __field( int, failed
)
31 __entry
->failed
= failed
;
33 TP_printk("%x, value %llx%s",
36 __entry
->failed
? " #GP" : "")
39 DEFINE_EVENT(msr_trace_class
, read_msr
,
40 TP_PROTO(unsigned msr
, u64 val
, int failed
),
41 TP_ARGS(msr
, val
, failed
)
44 DEFINE_EVENT(msr_trace_class
, write_msr
,
45 TP_PROTO(unsigned msr
, u64 val
, int failed
),
46 TP_ARGS(msr
, val
, failed
)
49 DEFINE_EVENT(msr_trace_class
, rdpmc
,
50 TP_PROTO(unsigned msr
, u64 val
, int failed
),
51 TP_ARGS(msr
, val
, failed
)
54 #endif /* _TRACE_MSR_H */
56 /* This part must be outside protection */
57 #include <trace/define_trace.h>