3 * interface to x86 model-specific MSR operations
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
8 * @author Graydon Hoare
11 #ifndef OP_X86_MODEL_H
12 #define OP_X86_MODEL_H
21 struct op_saved_msr saved;
22 struct op_saved_msr multiplex;
26 struct op_msr * counters;
27 struct op_msr * controls;
32 /* The model vtable abstracts the differences between
33 * various x86 CPU models' perfctr support.
35 struct op_x86_model_spec {
36 int (*init)(struct oprofile_operations *ops);
38 unsigned int const num_hardware_counters;
39 unsigned int const num_hardware_controls;
40 unsigned int const num_counters;
41 unsigned int const num_controls;
42 void (*fill_in_addresses)(struct op_msrs * const msrs);
43 void (*setup_ctrs)(struct op_msrs const * const msrs);
44 int (*check_ctrs)(struct pt_regs * const regs,
45 struct op_msrs const * const msrs);
46 void (*start)(struct op_msrs const * const msrs);
47 void (*stop)(struct op_msrs const * const msrs);
48 void (*shutdown)(struct op_msrs const * const msrs);
51 extern struct op_x86_model_spec const op_ppro_spec;
52 extern struct op_x86_model_spec const op_p4_spec;
53 extern struct op_x86_model_spec const op_p4_ht2_spec;
54 extern struct op_x86_model_spec const op_amd_spec;
56 #endif /* OP_X86_MODEL_H */