论文标题

Ojxperf:Java程序的Featherlight对象副本检测

OJXPerf: Featherlight Object Replica Detection for Java Programs

论文作者

Li, Bolun, Xu, Hao, Zhao, Qidong, Su, Pengfei, Chabbi, Milind, Jiao, Shuyin, Liu, Xu

论文摘要

内存膨胀是复杂生产软件中效率低下的重要来源,尤其是用托管语言(例如Java)编写的软件。对此问题的先前方法集中在识别超过其寿命的对象。但是,很少有研究研究过同一类型的众多对象是否相同。对具有代码级归因的相同对象的定量评估可以帮助开发人员进行重构代码以消除对象膨胀,并有利于重复使用现有对象。结果是记忆压力降低,分配减少和垃圾收集,增强的数据局部性以及减少的重新计算,所有这些都会导致较高的性能。 我们开发了Ojxperf,这是一种基于轻量采样的探查器,概率地识别了相同的对象。 Ojxperf与硬件调试寄存器一起使用硬件性能监控单元(PMU)来采样和比较在相同的呼叫上下文中分配的相同类型的不同对象的现场值,但有可能在不同的程序点访问。结果是轻巧的测量,对象分配上下文的组合以及通过重复频率排序的用法上下文的组合。这类重复的对象相对更容易优化。 Ojxperf平均会产生9%的运行时和6%的内存开销。我们通过使用其配置文件来指导我们优化许多Java程序,包括众所周知的基准和现实世界应用程序,从而证明了Ojxperf的好处。结果表明,记忆使用情况(最高11%)和大幅度速度(最高25%)明显减少。

Memory bloat is an important source of inefficiency in complex production software, especially in software written in managed languages such as Java. Prior approaches to this problem have focused on identifying objects that outlive their life span. Few studies have, however, looked into whether and to what extent myriad objects of the same type are identical. A quantitative assessment of identical objects with code-level attribution can assist developers in refactoring code to eliminate object bloat, and favor reuse of existing object(s). The result is reduced memory pressure, reduced allocation and garbage collection, enhanced data locality, and reduced re-computation, all of which result in superior performance. We develop OJXPerf, a lightweight sampling-based profiler, which probabilistically identifies identical objects. OJXPerf employs hardware performance monitoring units (PMU) in conjunction with hardware debug registers to sample and compare field values of different objects of the same type allocated at the same calling context but potentially accessed at different program points. The result is a lightweight measurement, a combination of object allocation contexts and usage contexts ordered by duplication frequency. This class of duplicated objects is relatively easier to optimize. OJXPerf incurs 9% runtime and 6% memory overheads on average. We empirically show the benefit of OJXPerf by using its profiles to instruct us to optimize a number of Java programs, including well-known benchmarks and real-world applications. The results show a noticeable reduction in memory usage (up to 11%) and a significant speedup (up to 25%).

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源