Hi Julian, all,
I found out that ~85% of helgrind's time (on one of my tests) is spent in
the following loop:
static void shadow_mem_make_NoAccess ( Thread* thr, Addr aIN, SizeT len )
...
/* FIXME: don't iterate over the complete lock set */
HG_(initIterFM)( map_locks );
while (HG_(nextIterFM)( map_locks,
(Word*)&gla, (Word*)&lk )) {
...
Average number of iterations of this loop is ~5600, which is the number of
locks in the entire program (right)?
Would you suggest a way to rewrite this loop so that it does not iterate
over all locks?
Can we do a binary search in map_locks instead of iterating it?
I mean, most of the time the deallocated memory contains no locks. We can
check if the is the case by binary searching map_locks, can't we?
We will need to extend hg_wordfm.c with few more methods...
What do you think?
Thanks,
--kcc
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers