1 /** 2 * @file op_x86_model.h 3 * interface to x86 model-specific MSR operations 4 * 5 * @remark Copyright 2002 OProfile authors 6 * @remark Read the file COPYING 7 * 8 * @author Graydon Hoare 9 */ 10 11 #ifndef OP_X86_MODEL_H 12 #define OP_X86_MODEL_H 13 14 #include "oprofile.h" 15 16 struct op_saved_msr { 17 uint high; 18 uint low; 19 }; 20 21 struct op_msr_group { 22 uint * addrs; 23 struct op_saved_msr * saved; 24 }; 25 26 struct op_msrs { 27 struct op_msr_group counters; 28 struct op_msr_group controls; 29 }; 30 31 struct pt_regs; 32 33 struct op_x86_model_spec { 34 uint const num_counters; 35 uint const num_controls; 36 void (*fill_in_addresses)(struct op_msrs * const msrs); 37 void (*setup_ctrs)(struct op_msrs const * const msrs); 38 void (*check_ctrs)(uint const cpu, 39 struct op_msrs const * const msrs, 40 struct pt_regs * const regs); 41 void (*start)(struct op_msrs const * const msrs); 42 void (*stop)(struct op_msrs const * const msrs); 43 }; 44 45 extern struct op_x86_model_spec const op_ppro_spec; 46 extern struct op_x86_model_spec const op_athlon_spec; 47 extern struct op_x86_model_spec const op_p4_spec; 48 #ifdef HT_SUPPORT 49 extern struct op_x86_model_spec const op_p4_ht2_spec; 50 #endif 51 52 #endif /* OP_X86_MODEL_H */ 53