1. 中国科学技术大学计算机科学技术系,合肥,230027
2. 安徽省计算与通信软件重点实验室,合肥,230027
网络首发:2009-08-10,
纸质出版:2009
移动端阅览
张昱 1, 2, 郝允允 1, 等. Java程序数据竞争的增量式检测[J]. 西安交通大学学报, 2009,43(8):22-27+58.
Incremental Detection of Data Race for Java Programs[J]. 2009, 43(8): 22-27+58.
针对静态竞争检测无额外运行开销但精度低
而动态竞争检测精度高但因插桩有额外运行开销
在实际Java虚拟机的即时编译器中以竞争检测遍形式设计实现了一种精确有效的增量式竞争检测算法.结合锁集和发生序关系
依次对即时编译的每个方法进行一次方法内分析
收集独立于上下文的方法摘要
并以方法摘要为基础自下而上进行上下文敏感的跨线程方法间分析
增量计算并及时输出潜在的竞争信息.实验表明
算法对应用程序无插桩且不受程序规模限制
具有与O'Callahan等人的动态竞争检测算法类似的精度
检测时间仅占总编译时间的2%~4%.
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.
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.
吴萍, 陈意云, 张健. 多线程程序数据竞争的静态检测[J]. 计算机研究与发展, 2006, 43(2): 329-335.
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.
0
浏览量
4
下载量
2
CSCD
关联资源
相关文章
相关作者
相关机构
京公网安备11010802024621