On Tue, 19 Feb 2008, Konstantin Serebryany wrote:

> If we can ignore the majority of all memory accesses, we will speedup
> the whole thing.
> I have implemented the following:
>   if ((address % X) != Y) we ignore this memory access.
>   X and Y are command line parameters (% operation is optimized for
> some values).
>   0<=Y<X
>   typical value of X is between 3 and 30.

So this increases the granularity by treating larger sections of memory as a 
single thing?

More generally, a huge proportion of what Helgrind is doing is wasted 
effort.  In many multithreaded programs, different threads share only a 
small amount of memory out of the total memory used.  Unfortunately there's 
no way for Helgrind to know in advance (AFAIK) what that small amount of 
memory should be.  Also, because threads are so crude each thread can 
accidentally "share" more memory than intended (ie. no inter-thread memory 
protection).

But programmers should know in advance which bits of memory should be 
shared.  Perhaps some client requests could be used which say "this section 
of memory will be shared" or "this section of memory won't be shared" could 
be useful.  In the "won't be shared" sections the checking might be a lot 
simpler?

Nick

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to