paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Divining Profiler Accuracy: An Approach to Approximate Profiler Accuracy through Machine Code-Level Slowdown

探明剖析器准确性:一种通过机器码级减速近似剖析器准确性的方法
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文关注JIT系统下采样性能剖析器的准确性评估方法,属于动态程序分析与运行时系统领域,与用户画像中的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析等核心方向均无直接关联。引用 3 inbox
Humphrey Burchell, Stefan Marr
crossref: 2026-09-10

AI 速览

一句话:提出机器码级减速构造近似真值,用于评估 JIT 系统采样性能剖析器的准确性。

现代 JIT 运行时中,采样式性能剖析器的结果可能不准确且难以验证,因为复杂软硬件栈缺乏已知真值。本文提出一种通过机器码级减速来近似真值的方法:在不改变 Java 程序优化与编译决策及现代 CPU 执行行为的前提下,精确地按指定幅度减慢程序;并用硬件剖析验证主导基本块级减速准确。基于减速后的基准,作者确认 Async-profiler、JFR、JProfiler 与 YourKit 保持原有性能行为并按相同比例将运行时间归因到方法,同时发现缺失调试信息会导致定位错误。最后,通过减速特定基本块近似真值评估采样剖析器,发现不同剖析器准确性差异巨大。该工作为 JIT 系统提供了首个实用评估方法。

问题
JIT 运行时中采样剖析器结果可能不准确,且因缺乏已知真值而难以评估其准确性。
方法
提出机器码级减速近似真值:保持 Java 程序的优化、编译决策与执行行为,按指定幅度减慢程序,并用硬件剖析验证基本块级减速准确性。
评估
在减速基准上确认 Async-profiler、JFR、JProfiler、YourKit 保持原行为并给出相同方法时间占比,发现缺失调试信息导致定位错误;进一步减速特定基本块评估采样精度,显示剖析器间准确性差异巨大。
原文摘要(Abstract)

Optimizing performance on top of modern runtime systems with just-in-time (JIT) compilation is a challenge for a wide range of applications from browser-based applications on mobile devices to large-scale server applications. Developers often rely on sampling-based profilers to understand where their code spends its time. Unfortunately, sampling of JIT-compiled programs can give inaccurate and sometimes unreliable results. To assess accuracy of such profilers, we would ideally want to compare their results to a known ground truth. With the complexity of today's software and hardware stacks, such ground truth is unfortunately not available. Instead, we propose a novel technique to approximate a ground truth by accurately slowing down a Java program at the machine-code level, preserving its optimization and compilation decisions as well as its execution behavior on modern CPUs. Our experiments demonstrate that we can slow down benchmarks by a specific amount, which is a challenge because of the optimizations in modern CPUs, and we verified with hardware profiling that on a basic-block level, the slowdown is accurate for blocks that dominate the execution. With the benchmarks slowed down to specific speeds, we confirmed that Async-profiler, JFR, JProfiler, and YourKit maintain original performance behavior and assign the same percentage of run time to methods. Additionally, we identify cases of inaccuracy caused by missing debug information, which prevents the correct identification of the relevant source code. Finally, we tested the accuracy of sampling profilers by approximating the ground truth by the slowing down of specific basic blocks and found large differences in accuracy between the profilers. We believe, our slowdown-based approach is the first practical methodology to assess the accuracy of sampling profilers for JIT-compiling systems and will enable further work to improve the accuracy of profilers.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2985,
  title = {Divining Profiler Accuracy: An Approach to Approximate Profiler Accuracy through Machine Code-Level Slowdown},
  author = {Humphrey Burchell and Stefan Marr},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763180}
}