Static race detection techniques consume no extra run-time cost but have lower precision
while dynamic ones have higher precision but consume extra run-time cost due to instrumentation. A new precise and efficient algorithm on incrementally detecting potential data races in Java programs is presented
which is implemented as a race detection pass in the just-in-time(JIT)compiler of the Java virtual machine. The algorithm combines lockset-based and happens-before-relation-based detection. Then the algorithm does an intra-method analysis on each method compiled by JIT in turn
and collects summaries independent of the context. The context-sensitive inter-thread analysis is proposed based on the method summaries
to compute incremental race information. The resulting information is output in time. Experimental results show that the algorithm has no instrumentation cost and unlimited program scale
and that the algorithm has the similar precision as O'Callahan
et al's algorithm on dynamic race detection
and consumes only 2%-4% of the total compilation time.
关键词
Keywords
references
NETZER R H, MILLER B P. What are race conditions? some issues and formalizations [J]. ACM Letters on Programming Languages and Systems, 1992,1(1):74-88.
CHRISTIAENS M, BROSSCHERE K. TRaDe: a topological approach to on-the-fly race detection in Java programs [C]∥Proc of 1st Java Virtual Machine Research and Technology Symposium. Berkeley, CA, USA: USENIX Association, 2001:105-116.
O'CALLAHAN R, CHOI J D. Hybrid dynamic data race detection [C]∥Proc of the ACM SIGPLAN Symp on Principles and Practice of Parallel Programming. New York, USA: ACM, 2003: 167-178.
HENZINGER T A, JHALA R, MAJUMDAR R. Race checking by context inference [C]∥Proc of the ACM SIGPLAN Conf on Programming Language Design and Implementation. New York, USA: ACM, 2004: 1-13.
WU Ping, CHEN Yiyun, ZHANG Jian. Static data-race detection for multithread programs [J]. Journal of Computer Research and Development, 2006, 43(2): 329-9335.
NAIK M, AIKEN A, WHALEY J. Effective static race detection for java [C]∥Proc of the ACM SIGPLAN Conf on Programming Language Design and Implementation. New York, USA: ACM, 2006: 308-319.
LAMPORT L. Time, clocks, and the ordering of events in a distributed system [J]. Communications of the ACM, 1978, 21(7): 558-565.
LANDI W. Undecidability of static analysis [J]. ACM Letters on Programming Languages and Systems, 1992,1(4): 323-337.
SALCIANU A, RINARD M. Pointer and escape analysis for multithreaded programs [C]∥Proc of 8th ACM SIGPLAN Symp on Principles and Practices of Parallel Programming. New York, USA: ACM, 2001: 12-23.