|
From: Martin H. <hi...@gm...> - 2006-01-11 03:07:06
|
Hi, For cachegrind, the instrumenter inserts calls to functions that drive a cache simulation. The cache simulation only needs to know where memory cells are read or written, not what the contents of those memory cells are, since that doesn't affect whether there is a hit or miss. But I would like to abuse the write instrumentation in a situation where I do need to know the newly written values. Now here is my question: can I just obtain that by reading the current memory contents at the given address at the time the instrumentation function gets executed? From looking at the source code, I assume that yes, because the instrumentation appears to be always after (later in the basic block than) the instruction(s) it instruments. Could someone please confirm or deny whether I understand the code correctly? Thank you, Martin |