Static conflict analysis for multi-threaded object-oriented programs

被引:45
|
作者
von Praun, C [1 ]
Gross, TR [1 ]
机构
[1] ETH, Lab Software Technol, CH-8092 Zurich, Switzerland
关键词
race detection; heap shape graph; object use graph;
D O I
10.1145/780822.781145
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A compiler for multi-threaded object-oriented programs needs information about the sharing of objects for a variety of reasons: to implement optimizations, to issue warnings, to add instrumentation to detect access violations that occur at runtime. An Object Use Graph (OUG) statically captures accesses from different threads to objects. An OUG extends the Heap Shape Graph (HSG), which is a compile-time abstraction for runtime objects (nodes) and their reference relations (edges). An OUG specifies for a specific node in the HSG a partial order of events relevant to the corresponding runtime object(s). Relevant events include read and write access, object escape, thread start and join. OUGs have been implemented in a Java compiler. Initial experience shows that OUGs are effective to identify object accesses that potentially conflict at runtime and isolate accesses that never cause a problem at runtime. The capabilities of OUGs are compared with an advanced program analysis that has been used for lock elimination. For the set of benchmarks investigated here, OUGs report only a fraction of shared objects as conflicting and reduce the number of compile-time reports in terms of allocation sites of conflicting objects by 28-92% (average 64%). For benchmarks of up to 30 KLOC, the time taken to construct OUGs is, with one exception, in the order of seconds. The information collected in the OUG has been used to instrument Java programs with checks for object races. OUGs provide precise information about object sharing and static protection, so runtime instrumentation that checks those cases that cannot be disambiguated at compile-time is sparse, and the total runtime overhead of checking for object races is only 3-86% (average 47%).
引用
收藏
页码:115 / 128
页数:14
相关论文
共 50 条
  • [41] BUNDLEP: Prioritizing Conflict Free Regions in Multi-Threaded Programs to Improve Cache Reuse
    Tessler, Corey
    Fisher, Nathan
    [J]. 2018 39TH IEEE REAL-TIME SYSTEMS SYMPOSIUM (RTSS 2018), 2018, : 325 - 337
  • [42] Change impact analysis for object-oriented programs
    Ryder, BG
    Tip, F
    [J]. ACM SIGPLAN NOTICES, 2001, : 46 - 53
  • [43] Completeness analysis for incomplete object-oriented programs
    Xue, JL
    Nguyen, PH
    [J]. COMPILER CONSTRUCTION, PROCEEDINGS, 2005, 3443 : 271 - 286
  • [44] Cost analysis of object-oriented bytecode programs
    Albert, Elvira
    Arenas, Puri
    Genaim, Samir
    Puebla, German
    Zanardini, Damiano
    [J]. THEORETICAL COMPUTER SCIENCE, 2012, 413 (01) : 142 - 159
  • [45] Design and implementation of multi-threaded object request broker
    Chang, YS
    Lo, W
    Wang, CJ
    Yuan, SM
    Liang, DR
    [J]. 1998 INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS, PROCEEDINGS, 1998, : 740 - 747
  • [46] A Dynamic Logic for deductive verification of multi-threaded programs
    Beckert, Bernhard
    Klebanov, Vladimir
    [J]. FORMAL ASPECTS OF COMPUTING, 2013, 25 (03) : 405 - 437
  • [47] A logic of object-oriented programs
    Abadi, M
    Rustan, K
    Leino, M
    [J]. VERIFICATION: THEORY AND PRACTICE: ESSAYS DEDICATED TO ZHOAR MANNA ON THE OCCASION OF HIS 64TH BIRTHDAY, 2003, 2772 : 11 - 41
  • [48] OBJECT-ORIENTED PROGRAMS IN REALTIME
    GWINN, JM
    [J]. SIGPLAN NOTICES, 1992, 27 (02): : 47 - 56
  • [49] Slicing object-oriented programs
    Chen, JL
    Wang, FJ
    Chen, YL
    [J]. ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE AND INTERNATIONAL COMPUTER SCIENCE CONFERENCE, PROCEEDINGS, 1997, : 395 - 404
  • [50] Encapsulation in object-oriented programs
    Chen, JL
    Wang, FJ
    [J]. ACM SIGPLAN NOTICES, 1996, 31 (07) : 30 - 32