We present the design and evaluation of a new data-race-detection technique
. Our technique executes at runtime rather than post-mortem, and handles un
modified shared-memory applications that run on top of CVM, a software dist
ributed shared memory system. We do not assume explicit associations betwee
n synchronization and shared data, and require neither compiler support nor
program source. Instead, we use a binary code re-writer to instrument inst
ructions that may access shared memory. The most novel aspect of our system
is that we are able to use information from the underlying memory system i
mplementation in order to reduce the number of comparisons made at runtime.
We present an experimental evaluation of our techniques by using out syste
m to look far data races in five common shared-memory programs. We quantify
the effect of several optimizations to the basic technique: data flow anal
ysis, instrumentation batching, runtime code modification, and instrumentat
ion inlining. Our system correctly found races in three of the five program
s, including two from a standard benchmark suite. The slowdown of this debu
gging technique averages less than 2.5 for our applications.