From: Josef W. <Jos...@gm...> - 2013-10-06 01:24:07
|
Am 04.10.2013 21:47, schrieb Sonny Tavernier: > Hi, > > I have an unexpected behavior with a basic tool. > For each Put statement of a basic block, I register a dirty helper using > unsafeIRDirty_0_N. > The problem is that the dirty helper is called more times than expected, > e.g. there are 5 Put statements in a basic block but the dirty helper is > called 13 times. You seem to confuse instrumentation vs. execution time. As you set the counters to zero only at instrumentation time, of course they will diverge when a BB is executed a second time (as every BB is instrumented only once). Further, Valgrind works on super blocks (SBs), not just BBs. A SB may have multiple side exits. Thus, counters may be different whenever the execution flow exits an SB early. Josef |