OOPredictor: 使用静态分析预测面向对象访问
OOPredictor: Predicting Object-Oriented Accesses using Static Analysis
AI总结:
OOPredictor通过静态分析预测面向对象程序的访问模式,以提高缓存性能和垃圾回收效率。
摘要:
面向对象编程已成为最占主导地位的设计范式之一,因为分离关注和设计的适应性降低了开发和维护成本。然而,便利并非没有代价。此类设计中固有的额外间接性导致了过度的指针追逐,这会负面影响局部性,从而降低缓存结构的性能。此外,现代硬件预取器大多是基于步长的预取器,它们无法处理指针追逐所产生的访问模式的不可预测性。大多数试图解决此问题的软件方法都依赖于程序运行时进行分析,这带来了显著的运行时开销,或者需要先前运行的数据。在本文中,我们提出利用编译时的静态分析来预测程序在运行时显示的最常见访问模式。由于Java是使用最广泛的面向对象语言之一,我们在OpenJ9 JVM内部的OMR优化器基础设施中实现了我们的原型。我们所提出预测器的输出是马尔可夫链,它们建模了程序的预期行为。通过将所提出预测器的模型与使用仪器化解释器测量的程序实际运行时行为进行比较,评估了所提出预测器的有效性。我们的实验表明,所提出的预测器表现出良好的准确性,并可用于指导最小侵入性的负载停滞缓解策略,例如告知复制GC在更局部性友好的复制顺序上。
英文摘要:
Object-oriented Programming has become one of the most dominant design paradigms as the separation of concerns and adaptability of design reduce development and maintenance costs. However, the convenience is not without cost. The added indirection inherent in such designs causes excessive pointer chasing, negatively affecting locality, which in turn degrades the performance of cache structures. Furthermore, modern hardware prefetchers are mostly stride prefetchers that are ill-equipped to handle the unpredictability of access patterns generated by pointer chasing. Most software approaches that seek to address this problem resort to profiling the program as it runs, which comes with a significant run-time overhead or requires data from previous runs. In this paper, we propose the use of compile-time static analysis to predict the most common access patterns displayed by a program during run time. Since Java is one of the most popular object-oriented languages, we implement our prototype within the OpenJ9 JVM, inside the OMR optimizer infrastructure. The outputs of our proposed predictor are Markov chains that model the expected behavior of the program. The effectiveness of the proposed predictor is evaluated by comparing the model with the actual run-time behavior of the program measured using an instrumented interpreter. Our experiments show that the proposed predictor exhibits good accuracy and can be used to inform minimally intrusive load stall mitigation strategies, e.g. informing copying GCs on more locality-friendly copying orders
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。