From: Philippe E. <ph...@wa...> - 2003-01-16 10:44:03
|
graydon hoare wrote: > On Wed, 2003-01-15 at 16:53, William Cohen wrote: > > >>Making some of these things manditory isn't the right thing to do. > > > well, perhaps. I'm not entirely clear on the semantics of some of these > things, to be honest. for example, as you say, there is only one bit > defined as a mask value for LOAD_PORT_REPLAY: split load. so, clearly if > I set that bit to 1, I'll be recording the split-load replays. > > but I wonder: if I set that bit to 0, does that mean I'm going to record > non-split-load replays? or am I going to record nothing at all? if the > former, then certainly making it utm_mandatory is wrong; if the latter, > I don't see what the harm is. Same problem occur for: /* MISPRED_BRANCH_RETIRED */ static struct op_unit_mask um_mispred_branch_retired = - {1, utm_bitmask, 0x01, + {1, utm_mandatory, 0x01, { {0x01, "retired instruction is non-bogus"} } }; does this means than 0 count bogus instruction and there is no way to count bogus and non-bogus retired insn or only non-bogus insn can be counted ? If not utm_mandatory is required. If the documentation is not enough clear test are needed. Anyway for unit mask with only one bit allowed utm_bitmask is always wrong: if the bit is required utm_mandatory is needed else utm_exclusive must be used and unit mask == 0 allowed explicitely. so on: static struct op_unit_mask um_mispred_branch_retired = {1, utm_bitmask, 0x01, + {1, utm_mandatory, 0x01, { {0x01, "retired instruction is non-bogus"} } }; or static struct op_unit_mask um_mispred_branch_retired = {2, utm_excelusive, 0x01, + {1, utm_mandatory, 0x01, { {0x01, "retired instruction is non-bogus"}, {0x00, bogus (or non bogus and bogus ?)"} } }; libop/op_events.c: int op_check_unit_mask(struct op_unit_mask const * allow, u16 um) ... case utm_bitmask: // Must reject 0 bit mask because it can count nothing if (um == 0) break; ... return -1; regards, Phil |