OJXPerf: featherlight object replica detection for Java programs

OJXPerf: featherlight object replica detection for Java programs
复制标题

OJXPerf:Java 程序的轻量级对象副本检测

DOI:
10.1145/3510003.3510083
复制
发表时间:
2022
期刊:
ICSE '22: Proceedings of the 44th International Conference on Software Engineering
影响因子:
--
通讯作者:
Liu, Xu
Liu, Xu
中科院分区:
--
文献类型:
--
作者:
Li, Bolun;Xu, Hao;Zhao, Qidong;Su, Pengfei;Chabbi, Milind;Jiao, Shuyin;Liu, Xu

文献摘要

相似文献

内存膨胀是复杂生产软件效率低下的一个重要原因,特别是在用Java等托管语言编写的软件中。先前解决此问题的方法主要关注于识别超出其寿命的对象。然而,很少有研究调查无数相同类型的物体是否相同以及在多大程度上相同。对具有代码级属性的相同对象进行定量评估可以帮助开发人员重构代码以消除对象膨胀,并有利于重用现有对象。其结果是减少了内存压力、减少了分配和垃圾收集、增强了数据局域性,减少了重新计算,所有这些都带来了卓越的性能。我们开发了基于轻量级采样的分析器OJXPerf,它可以概率地识别相同的对象。OJXPerf使用硬件性能监视单元(PMU)和硬件调试寄存器来采样和比较在相同调用上下文中分配但可能在不同程序点访问的相同类型的不同对象的字段值。结果是轻量级的度量——对象分配上下文和使用上下文的组合(按重复频率排序)。这类重复对象相对更容易优化。OJXPerf平均会产生9%的运行时开销和6%的内存开销。通过使用OJXPerf的配置文件来指导我们优化许多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 favorreuseof 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, alightweightsampling-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%).