opd_ibs.h

Go to the documentation of this file.
00001 
00014 #ifndef OPD_IBS_H
00015 #define OPD_IBS_H
00016 
00017 #include <stdint.h>
00018 
00019 #include "opd_ibs_macro.h"
00020 
00021 struct transient;
00022 struct opd_event;
00023 
00031 struct ibs_sample {
00032     struct ibs_fetch_sample * fetch;
00033     struct ibs_op_sample * op;
00034 };
00035 
00042 struct ibs_fetch_sample {
00043     unsigned long int rip;
00044     /* MSRC001_1030 IBS Fetch Control Register */
00045     unsigned int ibs_fetch_ctl_low;
00046     unsigned int ibs_fetch_ctl_high;
00047     /* MSRC001_1031 IBS Fetch Linear Address Register */
00048     unsigned int ibs_fetch_lin_addr_low;
00049     unsigned int ibs_fetch_lin_addr_high;
00050     /* MSRC001_1032 IBS Fetch Physical Address Register */
00051     unsigned int ibs_fetch_phys_addr_low;
00052     unsigned int ibs_fetch_phys_addr_high;
00053     unsigned int dummy_event;
00054 };
00055 
00056 
00057 
00059 struct ibs_op_sample {
00060     unsigned long int rip;
00061     /* MSRC001_1034 IBS Op Logical Address Register */
00062     unsigned int ibs_op_lin_addr_low;
00063     unsigned int ibs_op_lin_addr_high;
00064     /* MSRC001_1035 IBS Op Data Register */
00065     unsigned int ibs_op_data1_low;
00066     unsigned int ibs_op_data1_high;
00067     /* MSRC001_1036 IBS Op Data 2 Register */
00068     unsigned int ibs_op_data2_low;
00069     unsigned int ibs_op_data2_high;
00070     /* MSRC001_1037 IBS Op Data 3 Register */
00071     unsigned int ibs_op_data3_low;
00072     unsigned int ibs_op_data3_high;
00073     /* MSRC001_1038 IBS DC Linear Address */
00074     unsigned int ibs_op_ldst_linaddr_low;
00075     unsigned int ibs_op_ldst_linaddr_high;
00076     /* MSRC001_1039 IBS DC Physical Address */
00077     unsigned int ibs_op_phys_addr_low;
00078     unsigned int ibs_op_phys_addr_high;
00079     /* MSRC001_103B IBS Branch Target Address */
00080     unsigned long ibs_op_brtgt_addr;
00081 };
00082 
00083 
00092 extern void code_ibs_fetch_sample(struct transient * trans);
00093 
00124 extern void code_ibs_op_sample(struct transient * trans);
00125 
00127 extern void opd_log_ibs_event(unsigned int event, struct transient * trans);
00128 
00130 extern void opd_log_ibs_count(unsigned int event, struct transient * trans, unsigned int count);
00131 
00132 
00133 #endif /*OPD_IBS_H*/

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1