aboutsummaryrefslogtreecommitdiff
path: root/callgrind
diff options
context:
space:
mode:
authorweidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9>2015-01-08 14:15:18 +0000
committerweidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9>2015-01-08 14:15:18 +0000
commit04df7f2235e7f5011c3f12aca8f850ba4e70eb0a (patch)
treef3b0cefe8dc7b080cad214550de1068b1ec5cbe2 /callgrind
parent204197af77d9fff60a9e4659867a3d0350824b14 (diff)
downloadvalgrind-04df7f2235e7f5011c3f12aca8f850ba4e70eb0a.tar.gz
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'callgrind')
-rw-r--r--callgrind/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/callgrind/main.c b/callgrind/main.c
index 5d10b40d4..30a0cce17 100644
--- a/callgrind/main.c
+++ b/callgrind/main.c
@@ -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]);
}