115 #define TYPEPM(m) DCPI_MTYPE_PM | (m) 116 #define TYPERM(m) DCPI_MTYPE_RM | (m) 119 #define DCPI_PM_CNTR(pfx, n1, n2, n3, bit1, bit2, bit3) \ 120 { pfx n1, TYPEPM((bit1)) }, \ 121 { pfx n2, TYPEPM((bit2)) }, \ 122 { pfx n3, TYPEPM((bit3)) } 126 #define DCPI_PM_ATTR(name, truebits, falsebits) \ 127 { name, TYPEPM((truebits)) }, \ 128 { "!" name, TYPEPM((falsebits)) } 132 #define DCPI_PM_TRAP(name, truebits, falsebits) \ 133 { name, TYPEPM((truebits)) }, \ 134 { "!" name, TYPEPM((falsebits)) } 139 sizeof(DCPITranslationTable::table) / sizeof(DCPITranslationTable::Entry) 208 for (
unsigned int i = 0; i <
GetSize(); ++i) {
209 if (strcmp(token,
table[i].
tok) == 0) {
248 if (!str || strlen(str) == 0) {
255 char* sep =
const_cast<char*
>(strchr(str,
':'));
258 string sampleset = str;
260 string counter = sep+1;
264 if (m1.
IsValid() && m2.IsValid()) {
280 char*
tok = strtok(const_cast<char*>(str),
"^");
281 while (tok !=
NULL) {
283 if (ret != 0) {
return m; }
285 tok = strtok((
char*)
NULL,
"^");
300 if (!token || strlen(token) == 0) {
306 if (!e) {
return 1; }
#define DCPI_PM_TRAP_OPCDECtrap
#define DCPI_PM_TRAP_itbmiss
#define DCPI_PM_TRAP_notrap
#define DCPI_PM_ATTR_retired_F
#define DCPI_PM_ATTR_early_kill_T
#define DCPI_PM_ATTR(name, truebits, falsebits)
#define DCPI_PM_TRAP(name, truebits, falsebits)
#define DCPI_PM_TRAP_interrupt
#define DCPI_PM_ATTR_late_kill_F
#define DCPI_PM_TRAP_N_mchktrap
void Ctor(const char *str)
#define DCPI_PM_TRAP_dtbmiss
#define DCPI_PM_TRAP_N_dtb2miss4
#define DCPI_PM_ATTR_early_kill_F
int SetDCPIMetricDescBit(const char *token, DCPIMetricDesc &m)
#define DCPI_PM_TRAP_trap
#define DCPI_PM_CNTR_count
#define DCPI_PM_CNTR_retires
#define DCPI_PM_ATTR_nyp_F
#define DCPI_PM_TRAP_N_MT_FPCRtrap
#define DCPI_PM_TRAP_arithtrap
#define DCPI_PM_ATTR_map_stall_F
#define DCPI_PM_ATTR_capped_T
#define DCPI_PM_TRAP_N_dfaulttrap
#define DCPI_PM_TRAP_N_fpdisabledtrap
#define DCPI_PM_TRAP_N_arithtrap
#define DCPI_PM_ATTR_valid_F
#define DCPI_PM_ATTR_nyp_T
#define DCPI_PM_TRAP_N_unaligntrap
#define DCPI_PM_TRAP_N_dtbmiss
#define DCPI_PM_TRAP_mchktrap
static unsigned int GetSize()
#define DCPI_PM_TRAP_MT_FPCRtrap
#define DCPI_PM_TRAP_iacvtrap
void Set(const bitvec_t bv)
static Entry * FindEntry(const char *token)
DCPIMetricDesc::bitvec_t bits
#define DCPI_PM_CNTR_replays
DCPITranslationTable & operator=(const DCPITranslationTable &p)
DCPITranslationTable(const DCPITranslationTable &p)
#define DCPI_PM_CNTR_bcmisses
#define DCPI_PM_ATTR_taken_T
#define DCPI_PM_ATTR_late_kill_T
#define DCPI_PM_TRAP_N_mispredict
#define DCPI_PM_ATTR_map_stall_T
#define DCPI_PM_TRAP_N_itbmiss
#define DCPI_PM_TRAP_N_iacvtrap
#define DCPI_PM_ATTR_ldstorder_F
#define DCPI_PM_TRAP_replays
#define DCPI_PM_TRAP_N_interrupt
DCPIMetricDesc(bitvec_t bv=0)
#define DCPI_PM_ATTR_ldstorder_T
#define DCPI_PM_TRAP_dfaulttrap
#define DCPI_PM_CNTR(pfx, n1, n2, n3, bit1, bit2, bit3)
#define DCPI_PM_TRAP_dtb2miss3
#define DCPI_RM_replaytrap
DCPIMetricDesc String2DCPIMetricDesc(const char *str)
#define DCPI_PM_TRAP_dtb2miss4
#define DCPI_PM_TRAP_fpdisabledtrap
#define DCPI_PM_ATTR_valid_T
#define DCPI_PM_ATTR_twnzrd_F
#define DCPI_PM_TRAP_unaligntrap
#define DCPI_PM_TRAP_N_dtb2miss3
#define DCPI_PM_TRAP_N_replays
#define DCPI_PM_ATTR_cbrmispredict_F
#define DCPI_PM_ATTR_cbrmispredict_T
#define DCPI_PM_TRAP_mispredict
#define DCPI_PM_ATTR_twnzrd_T
#define DCPI_PM_ATTR_retired_T
#define DCPI_PM_CNTR_inflight
#define DCPI_PM_ATTR_capped_F
#define DCPI_PM_TRAP_N_OPCDECtrap
#define DCPI_PM_TRAP_N_notrap
#define DCPI_PM_CNTR_retdelay
#define DCPI_PM_ATTR_taken_F