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