1 #undef TRACE_SYSTEM 2 #define TRACE_SYSTEM x86_fpu 3 4 #if !defined(_TRACE_FPU_H) || defined(TRACE_HEADER_MULTI_READ) 5 #define _TRACE_FPU_H 6 7 #include <linux/tracepoint.h> 8 9 DECLARE_EVENT_CLASS(x86_fpu, 10 TP_PROTO(struct fpu *fpu), 11 TP_ARGS(fpu), 12 13 TP_STRUCT__entry( 14 __field(struct fpu *, fpu) 15 __field(bool, fpregs_active) 16 __field(bool, fpstate_active) 17 __field(int, counter) 18 __field(u64, xfeatures) 19 __field(u64, xcomp_bv) 20 ), 21 22 TP_fast_assign( 23 __entry->fpu = fpu; 24 __entry->fpregs_active = fpu->fpregs_active; 25 __entry->fpstate_active = fpu->fpstate_active; 26 __entry->counter = fpu->counter; 27 if (boot_cpu_has(X86_FEATURE_OSXSAVE)) { 28 __entry->xfeatures = fpu->state.xsave.header.xfeatures; 29 __entry->xcomp_bv = fpu->state.xsave.header.xcomp_bv; 30 } 31 ), 32 TP_printk("x86/fpu: %p fpregs_active: %d fpstate_active: %d counter: %d xfeatures: %llx xcomp_bv: %llx", 33 __entry->fpu, 34 __entry->fpregs_active, 35 __entry->fpstate_active, 36 __entry->counter, 37 __entry->xfeatures, 38 __entry->xcomp_bv 39 ) 40 ); 41 42 DEFINE_EVENT(x86_fpu, x86_fpu_state, 43 TP_PROTO(struct fpu *fpu), 44 TP_ARGS(fpu) 45 ); 46 47 DEFINE_EVENT(x86_fpu, x86_fpu_before_save, 48 TP_PROTO(struct fpu *fpu), 49 TP_ARGS(fpu) 50 ); 51 52 DEFINE_EVENT(x86_fpu, x86_fpu_after_save, 53 TP_PROTO(struct fpu *fpu), 54 TP_ARGS(fpu) 55 ); 56 57 DEFINE_EVENT(x86_fpu, x86_fpu_before_restore, 58 TP_PROTO(struct fpu *fpu), 59 TP_ARGS(fpu) 60 ); 61 62 DEFINE_EVENT(x86_fpu, x86_fpu_after_restore, 63 TP_PROTO(struct fpu *fpu), 64 TP_ARGS(fpu) 65 ); 66 67 DEFINE_EVENT(x86_fpu, x86_fpu_regs_activated, 68 TP_PROTO(struct fpu *fpu), 69 TP_ARGS(fpu) 70 ); 71 72 DEFINE_EVENT(x86_fpu, x86_fpu_regs_deactivated, 73 TP_PROTO(struct fpu *fpu), 74 TP_ARGS(fpu) 75 ); 76 77 DEFINE_EVENT(x86_fpu, x86_fpu_activate_state, 78 TP_PROTO(struct fpu *fpu), 79 TP_ARGS(fpu) 80 ); 81 82 DEFINE_EVENT(x86_fpu, x86_fpu_deactivate_state, 83 TP_PROTO(struct fpu *fpu), 84 TP_ARGS(fpu) 85 ); 86 87 DEFINE_EVENT(x86_fpu, x86_fpu_init_state, 88 TP_PROTO(struct fpu *fpu), 89 TP_ARGS(fpu) 90 ); 91 92 DEFINE_EVENT(x86_fpu, x86_fpu_dropped, 93 TP_PROTO(struct fpu *fpu), 94 TP_ARGS(fpu) 95 ); 96 97 DEFINE_EVENT(x86_fpu, x86_fpu_copy_src, 98 TP_PROTO(struct fpu *fpu), 99 TP_ARGS(fpu) 100 ); 101 102 DEFINE_EVENT(x86_fpu, x86_fpu_copy_dst, 103 TP_PROTO(struct fpu *fpu), 104 TP_ARGS(fpu) 105 ); 106 107 DEFINE_EVENT(x86_fpu, x86_fpu_xstate_check_failed, 108 TP_PROTO(struct fpu *fpu), 109 TP_ARGS(fpu) 110 ); 111 112 #undef TRACE_INCLUDE_PATH 113 #define TRACE_INCLUDE_PATH asm/trace/ 114 #undef TRACE_INCLUDE_FILE 115 #define TRACE_INCLUDE_FILE fpu 116 #endif /* _TRACE_FPU_H */ 117 118 /* This part must be outside protection */ 119 #include <trace/define_trace.h> 120