【24h】

Sealed calls in Java packages

机译:Java包中的密封调用

获取原文

摘要

Determining the potential targets of virtual method invocations is essential for inter-procedural optimizations of object-oriented programs. It is generally hard to determine such targets accurately. The problem is especially difficult for dynamic languages such as Java, because additional targets of virtual calls may appear at runtime. Current mechanisms that enable inter-procedural optimizations for dynamic languages, repeatedly validate the optimizations at runtime. This paper addresses this predicament by proposing a novel technique for conservative devirtualization analysis, which applies to a significant number of virtual calls in Java programs. Unlike previous work, our technique requires neither whole program analysis nor runtime information, and incurs no runtime overhead. Our solution is very efficient to compute and is based on a newly introduced, seemingly unrelated security feature of Java file archives. On average, our analysis "seals" (safely devirtualizes) about 39% of the virtualcalls (to non-final methods) that appear in SPECjvm98 programs, and about 29% of the calls invoked while executing these programs. In the runtime library rt.jar, about 10% of the packages contain a significant percentage (20--60%) of sealed calls, with a total average of about 8.5%. Most of these calls are also shown to be monomorphic, a fact which can be safely exploited by aggressive inter-procedural optimizations such as direct inlining. These results indicate that our technique has a strong potential for enhancing the analysis and optimization of Java programs.
机译:确定虚拟方法调用的潜在目标对于面向对象程序的过程间优化至关重要。通常很难准确地确定这些目标。对于动态语言(例如Java),此问题尤其困难,因为虚拟调用的其他目标可能会在运行时出现。启用动态语言的过程间优化的当前机制在运行时反复验证优化。本文通过提出一种用于保守去虚拟化分析的新技术来解决这一难题,该技术适用于Java程序中的大量虚拟调用。与以前的工作不同,我们的技术既不需要整个程序分析也不需要运行时信息,并且不会产生运行时开销。我们的解决方案基于Java文件存档的新引入的,看似无关的安全性功能,非常高效地进行计算。平均而言,我们的分析“密封”(安全取消虚拟化)出现在SPECjvm98程序中的虚拟调用(对非最终方法)的39%,以及执行这些程序时所调用的调用的29%。在运行时库rt.jar中,大约10%的程序包包含很大百分比(20--60%)的密封调用,平均总水平约为8.5%。这些调用中的大多数也显示为单态的,可以通过积极的过程间优化(例如直接内联)安全地利用这一事实。这些结果表明,我们的技术在增强Java程序的分析和优化方面具有强大的潜力。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号