|
From: Bart V. A. <bar...@gm...> - 2006-08-23 19:21:48
|
On 8/23/06, Nicholas Nethercote <nj...@cs...> wrote: > > On Tue, 22 Aug 2006, Bart Van Assche wrote: > > > - A data race is defined as two threads that access the same memory > > location, where at least one of the two threads performs a write action, > and > > the order between the two accesses is not enforced by a synchronization > > action. > > - Segments that can no longer be involved in a data race are freed > > (VG_(free)()). > > That sounds important. When can they be freed? At the time free() is called from the client. BTW: pub_tool_execontext.h defines VG_(record_ExeContext)() but no corresponding cleanup function ? > This means that the memory consumption of the drd tool is proportional to: > > - the number of threads running simultaneously. > > - the number of segments allocated within a thread. > > - the amount of unused memory allocated within the bitmap allocated for > a > > segment. When e.g. iterating over a byte-array, and only reading every > > 1024th byte, only 0.1% of the memory allocated for the bitmap will be > used > > -- very inefficient. > > So 1024 bytes is the smallest memory chunk you can individually represent? The current bitmap implementation splits each 32-bit address in 10+10+12 bits -- that means that the lowest level corresponds to 4096 client bytes. > It must be possible however to run software like konqueror under drd, > since > > it is possible with DIOTA. DIOTA uses the same approach as drd. One of > the > > differences between DIOTA and drd that I know of, is that DIOTA uses a > > 9-level bitmap while drd only uses a 3-level bitmap. > > Wow, 9 levels sounds like total overkill. How small are the memory chunks > then? >From the DIOTA sources (DIOTA-0.91-20060222/backend_dr/bitmap10c.c): each 32-bit address is split as follows: 32 = 1+3+3+3+3+3+3+3+3+2+5 (that's 10 levels in total -- the 9 levels was OTOH). BTW, do you know/are you involved with the DIOTA people? Judging from your > name it seems plausible :) During several years I shared an office with Michiel Ronsse at the University of Ghent -- that's where I learned about DIOTA. I already told him about drd. In the past Michiel has tried to attract a student for writing a tool like drd, but without success. |