|
From: <sv...@va...> - 2015-01-08 14:15:26
|
Author: weidendo
Date: Thu Jan 8 14:15:18 2015
New Revision: 14856
Log:
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.
Modified:
trunk/callgrind/main.c
Modified: trunk/callgrind/main.c
==============================================================================
--- trunk/callgrind/main.c (original)
+++ trunk/callgrind/main.c Thu Jan 8 14:15:18 2015
@@ -1377,9 +1377,11 @@
(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]);
}
|