of the locks held by threads that access shared variables each shared variable has a lock set that is constantly refined by intersecting it with the locks held by the thread making the current access if the intersection is null the tool reports a race the tool must incur a high runtime overhead because it has to track all data accesses by implementing a tool using the framework of fig2 this overhead can be significantly reduced fig5 is a block diagram of a data race detection tool implemented using the frame work of fig2 fig5 shows checking code 502 and instrumented code 504 checking code 502 includes instrumentation code 506 for providing information regarding lock acquisitions and releases to data race detection tool 508 instrumentation code 506 includes instrumentation points where code can be inserted in order to provide event information in this embodiment the instrumentation points contain code 510 that provides sampled sets of heap accesses to data race detection tool 508 fig6 illustrates a generalized example of a suitable computing environment 600 in which the described techniques can be implemented the computing environment 600 is not intended to suggest any limitation as to scope of use or functionality of the invention as the present invention may be implemented in diverse general purpose or special purpose computing environments with reference to fig6 the computing environment 600 includes at least one processing unit 610 and memory 620 in fig6 this most basic configuration 630 is included within a dashed line the processing unit 610 executes computer executable instructions and may be a real or a virtual processor in a multi processing system multiple processing units execute computer executable instructions to increase processing power the memory 620 may be volatile memory.