首页> 外文期刊>Software >Safe, multiphase bounds check elimination in Java
【24h】

Safe, multiphase bounds check elimination in Java

机译:Java中安全的多阶段边界检查消除

获取原文
获取原文并翻译 | 示例
       

摘要

As part of its type-safety regime, Java's semantics require precise exceptions at runtime when programs attempt out-of-bound array accesses. This paper describes a Java implementation that utilizes a multiphase approach to identifying safe array accesses. This approach reduces runtime overhead by spreading the out-of-bounds checking effort across multiple phases of compilation and execution: production of mobile code from source code, just-in-time (JIT) compilation in the virtual machine , application method invocations, and the execution of individual array accesses. The code producer uses multiple passes (including common subexpression elimination, load elimination, induction variable substitution, speculation of dynamically verified invariants, and inequality constraint analysis) to identify unnecessary bounds checks and prove their redundancy. During class-loading and JIT compilation, the virtual machine verifies the proofs, inserts code to dynamically validate speculated invariants, and generates code specialized under the assumption that the speculated invariants hold. During each runtime method invocation, the method parameters and other inputs are checked against the speculated invariants, and execution reverts to unoptimized code if the speculated invariants do not hold. The combined effect of the multiple phases is to shift the effort associated with bounds-checking array access to phases that are executed earlier and less frequently, thus, reducing runtime overhead. Experimental results show that this approach is able to eliminate more bounds checks than prior approaches with minimal overhead during JIT compilation. These results also show the contribution of each of the passes to the overall elimination. Furthermore, this approach increased the speed at which the benchmarks executed by up to 16%.
机译:作为其类型安全机制的一部分,当程序尝试进​​行越界访问时,Java的语义要求在运行时提供精确的异常。本文介绍了一种Java实现,该实现使用多阶段方法来标识安全的数组访问。这种方法通过将越界检查工作分散到编译和执行的多个阶段来减少运行时开销:从源代码生成移动代码,虚拟机中的即时(JIT)编译,应用程序方法调用和单个数组访问的执行。代码生产者使用多次遍历(包括常见的子表达式消除,负载消除,归纳变量替换,对动态验证的不变量的推测和不等式约束分析)来识别不必要的边界检查并证明其冗余性。在类加载和JIT编译期间,虚拟机验证证明,插入代码以动态验证推测的不变量,并在推测的不变量成立的前提下生成专用的代码。在每次运行时方法调用期间,将根据推测的不变量检查方法参数和其他输入,如果推测的不变量不成立,则执行将恢复为未优化的代码。多个阶段的综合效果是将与边界检查数组访问相关的工作转移到更早且更不频繁执行的阶段,从而减少了运行时开销。实验结果表明,与以前的方法相比,该方法能够在JIT编译过程中以最小的开销消除更多的边界检查。这些结果还显示了每个关卡对整体淘汰的贡献。此外,这种方法将基准执行速度提高了16%。

著录项

  • 来源
    《Software》 |2011年第7期|p.753-788|共36页
  • 作者单位

    Department of Computer Science, The University of Texas at San Antonio, TX, U.S.A.;

    Department of Computer Science, The University of Texas at San Antonio, TX, U.S.A.;

    Department of Computer Science, The University of Texas at San Antonio, TX, U.S.A.;

    Department of Computer Science, The University of Texas at San Antonio, TX, U.S.A.;

    Department of Computer Science, The University of Texas at San Antonio, TX, U.S.A.;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    multiphase optimization; program analysis; array bounds checks; Java; safeTSA;

    机译:多阶段优化;程序分析;数组边界检查;Java;安全TSA;
  • 入库时间 2022-08-17 13:03:53

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号