paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Pinpointing performance inefficiencies in Java

精确定位 Java 程序中的性能低效
FSE Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2019匹配度 1/10 · 论文提出基于硬件性能监控单元和调试寄存器的动态性能分析工具,用于定位 Java 程序中的浪费性内存操作,属于运行时性能优化领域;与用户关注的静态分析、LLM/Agent 与程序分析交叉、浮点程序分析、贝叶斯程序分析等方向均无直接关联。引用 11 inbox
Pengfei Su, Qingsen Wang, Milind Chabbi, Xu Liu
crossref: 2026-09-12

AI 速览

一句话:提出 JXPerf,用硬件性能监控单元与调试寄存器轻量定位 Java 程序中的浪费性内存操作。

许多性能低效——如算法/数据结构选择不当、开发者忽视性能、错失的编译器优化——会表现为浪费性内存操作,即本可避免的向内存产生或从内存消费数据。传统字节码插桩分析此类问题开销过高,且无法发现机器码生成中的低效。JXPerf 用硬件性能监控单元采样访问的内存位置,并用硬件调试寄存器监视对同一内存的后续访问,在机器码级别轻量测量,并将低效归因到完整调用上下文。其运行时与内存开销均约 7%,适合生产环境。在 JXPerf 指导下,作者通过改进代码生成、选择更优数据结构和算法优化多个 Java 应用,取得显著加速。

问题
Java 程序中许多性能低效最终表现为浪费性内存操作,而传统字节码插桩开销过高且无法覆盖机器码生成阶段的低效,因此难以在生产中精确定位这些低效。
方法
JXPerf 利用硬件性能监控单元采样内存访问位置,并用硬件调试寄存器监视对同一内存的后续访问,在机器码级别进行轻量测量,并将低效归因到完整调用上下文中的机器码与源代码。
评估
在多个 Java 应用上评估显示,JXPerf 的运行时和内存开销均约 7%,并指导开发者通过改进代码生成和选择更优数据结构与算法获得显著加速。
原文摘要(Abstract)

Many performance inefficiencies such as inappropriate choice of algorithms or data structures, developers' inattention to performance, and missed compiler optimizations show up as wasteful memory operations. Wasteful memory operations are those that produce/consume data to/from memory that may have been avoided. We present, JXPerf, a lightweight performance analysis tool for pinpointing wasteful memory operations in Java programs. Traditional byte code instrumentation for such analysis (1) introduces prohibitive overheads and (2) misses inefficiencies in machine code generation. JXPerf overcomes both of these problems. JXPerf uses hardware performance monitoring units to sample memory locations accessed by a program and uses hardware debug registers to monitor subsequent accesses to the same memory. The result is a lightweight measurement at the machine code level with attribution of inefficiencies to their provenance --- machine and source code within full calling contexts. JXPerf introduces only 7% runtime overhead and 7% memory overhead making it useful in production. Guided by JXPerf, we optimize several Java applications by improving code generation and choosing superior data structures and algorithms, which yield significant speedups.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5150,
  title = {Pinpointing performance inefficiencies in Java},
  author = {Pengfei Su and Qingsen Wang and Milind Chabbi and Xu Liu},
  booktitle = {FSE},
  year = {2019},
  doi = {10.1145/3338906.3338923}
}