Callgrind: fix BB discarding

When the info struct for a BB is created, we use the first guest
instruction address as key to insert the info into a hash table.
We should do the same when discarding.

This actually is not a real problem, as Callgrind obviously
is used very rarely with redirections. But we should be consistent
with cachegrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14856
This commit is contained in:
Josef Weidendorfer 2015-01-08 14:15:18 +00:00
parent 509348583a
commit fc60e4c9c8

View File

@ -1377,9 +1377,11 @@ void clg_discard_superblock_info ( Addr orig_addr, VexGuestExtents vge )
(void*)orig_addr,
(void*)vge.base[0], (ULong)vge.len[0]);
// Get BB info, remove from table, free BB info. Simple! Note that we
// use orig_addr, not the first instruction address in vge.
CLG_(delete_bb)(orig_addr);
// Get BB info, remove from table, free BB info. Simple!
// When created, the BB is keyed by the first instruction address,
// (not orig_addr, but eventually redirected address). Thus, we
// use the first instruction address in vge.
CLG_(delete_bb)(vge.base[0]);
}