首页> 外文会议>ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications >A study of devirtualization techniques for a Java Just-In-Time compiler
【24h】

A study of devirtualization techniques for a Java Just-In-Time compiler

机译:Java即时编译器的去虚拟化技术研究

获取原文

摘要

Many devirtualization techniques have been proposed to reduce the runtime overhead of dynamic method calls for various object-oriented languages, however, most of them are less effective or cannot be applied for Java in a straightforward manner. This is partly because Java is a statically-typed language and thus transforming a dynamic call to a static one does not make a tangible performance gain (owing to the low overhead of accessing the method table) unless it is inlined, and partly because the dynamic class loading feature of Java prohibits the whole program analysis and optimizations from being applied.We propose a new technique called direct devirtualization with the code patching mechanism. For a given dynamic call site, our compiler first determines whether the call can be devirtualized, by analyzing the current class hierarchy. When the call is devirtualizable and the target method is suitably sized, the compiler generates the inlined code of the method, together with the backup code of making the dynamic call. Only the inlined code is actually executed until our assumption about the devirtualization becomes invalidated, at which time the compiler performs code patching to make the backup code executed subsequently. Since the new technique prevents some code motions across the merge point between the inlined code and the backup code, we have furthermore implemented recently-known analysis techniques, such as type analysis and preexistence analysis, which allow the backup code to be completely eliminated. We made various experiments using 16 real programs to understand the effectiveness and characteristics of the devirtualization techniques in our Java Just-In-Time (JIT) compiler. In summary, we reduced the number of dynamic calls by ranging from 8.9% to 97.3% (the average of 40.2%), and we improved the execution performance by ranging from -1% to 133% (with the geometric mean of 16%).
机译:已经提出了许多去虚拟化技术来减少各种面向对象语言的动态方法调用的运行时开销,但是,其中大多数效率较低,或者不能以直接的方式应用于Java。这部分是因为Java是一种静态类型的语言,因此除非将其内联,否则将动态调用转换为静态调用不会显着提高性能(由于访问方法表的开销较低),这部分是因为Java的类加载功能会阻止整个程序的分析和优化应用。我们提出了一种新的技术,称为具有代码修补机制的直接反虚拟化。对于给定的动态调用站点,我们的编译器首先通过分析当前的类层次结构来确定该调用是否可以虚拟化。当调用可以取消虚拟化并且目标方法的大小合适时,编译器会生成该方法的内联代码以及进行动态调用的备用代码。只有内联代码才被实际执行,直到我们对虚拟化的假设失效为止,这时编译器执行代码修补,以使备份代码随后执行。由于新技术阻止了代码在内联代码和备用代码之间的合并点上移动,因此,我们还实施了最近已知的分析技术,例如类型分析和现有分析,从而可以完全消除备用代码。我们使用16个真实程序进行了各种实验,以了解Java实时(JIT)编译器中的虚拟化技术的有效性和特征。总而言之,我们将动态调用的数量从8.9%降低到97.3%(平均40.2%),并将执行性能提高了-1%到133%(几何平均值为16%)。 。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号