【24h】

Dynamic code management

机译:动态代码管理

获取原文
获取外文期刊封面目录资料

摘要

Poor code locality degrades application performance by increasing memory stalls due to instruction cache and TLB misses. This problem is particularly an issue for large server applications written in languages such as Java and C# that provide just-in-time (JIT) compilation, dynamic class loading, and dynamic recompilation. However, managed runtimes also offer an opportunity to dynamically profile applications and adapt them to improve their performance. This paper describes a Dynamic Code Management system (DCM) in a managed runtime that performs whole program code layout optimizations to improve instruction locality.We begin by implementing the widely used Pettis-Hansen algorithm for method layout to improve code locality. Unfortunately, this algorithm is too costly for a dynamic optimization system, O(n3) in time in the call graph. For example, Pettis-Hansen requires a prohibitively expensive 35 minutes to lay out MiniBean which has 15,586 methods. We propose three new code placement algorithms that target ITLB misses, which typically have the greatest impact on performance. The best of these algorithms, Code Tiling, groups methods into page sized tiles by performing a depth-first traversal of the call graph based on call frequency. Excluding overhead, experimental results show that DCM with Code Tiling improves performance by 6% on the large MiniBean benchmark over a baseline that orders methods based on invocation order, whereas Pettis-Hansen placement offers less improvement, 2%, over the same base. Furthermore, Code Tiling lays out MiniBean in just 0.35 seconds for 15,586 methods (6000 times faster than Pettis-Hansen) which makes it suitable for high-performance managed runtimes.
机译:不良的代码局部性会由于指令高速缓存和TLB未命中而增加内存停顿,从而降低应用程序性能。对于使用Java和C#等语言编写的大型服务器应用程序,此问题尤其重要,这些应用程序提供即时(JIT)编译,动态类加载和动态重新编译。但是,托管运行时还提供了动态分析应用程序并对其进行适应以提高其性能的机会。本文介绍了一种在托管运行时中执行的动态代码管理系统(DCM),该系统执行整个程序代码布局优化以提高指令的局部性。我们首先实现广泛使用的Pettis-Hansen算法进行方法布局以提高代码局部性。不幸的是,对于调用图中的动态优化系统 O n 3 )而言,该算法的成本太高。例如,Pettis-Hansen花费非常昂贵的35分钟来布置具有15,586个方法的MiniBean。我们提出了三种针对ITLB未命中的新代码放置算法,这些算法通常对性能影响最大。这些最好的算法 Code Tiling 通过根据调用频率对调用图进行深度优先遍历,将方法分组为页面大小的 tiles 。除开销之外,实验结果表明,与基于调用顺序对方法进行排序的基准相比,具有代码平铺功能的DCM在大型MiniBean基准上的性能提高了6%,而Pettis-Hansen布局与同一基准相比,提供的改进较少(2%)。此外,Code Tiling仅需0.35秒即可对15,586个方法进行MiniBean布局,这比Pettis-Hansen快6000倍,这使其适用于高性能托管运行时。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号