Divining Profiler Accuracy: An Approach to Approximate Profiler Accuracy through Machine Code-Level Slowdown
Humphrey Burchell, Stefan Marr
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
它引用的 Paper3
- Rethinking Java Performance AnalysisStephen M. Blackburn, Zixian Cai, Rui Chen, Xi Yang 等ASPLOS 2025 · 19 次引用
- TIP: Time-Proportional Instruction ProfilingBjörn Gottschall, Lieven Eeckhout, Magnus JahreMICRO 2021 · 16 次引用
- Where Did My Variable Go? Poking Holes in Incomplete Debug InformationCristian Assaiante, Daniele Cono D'Elia, Giuseppe Antonio Di Luna, Leonardo QuerzoniASPLOS 2023 · 14 次引用
相关 Paper
- Understanding and Finding JIT Compiler Performance BugsZijian Yi, Cheng Ding, August Shi, Milos GligoricOOPSLA 2026
- OJXPERF: Featherlight Object Replica Detection for Java ProgramsBolun Li, Hao Xu, Qidong Zhao, Pengfei Su 等ICSE 2022 · 11 次引用
- Uncovering Hidden Memory Costs for Garbage CollectionSudhanshu Agarwal, Saugata GhoseOOPSLA 2026
- JavART: A Lightweight Rule-Based JIT Compiler using Translation Rules Extracted from a Learning ApproachHanzhang Wang, Wei Peng, Wenwen Wang, Yunping Lu 等OOPSLA 2025
- AI-driven Java Performance Testing: Balancing Result Quality with Testing TimeLuca Traini, Federico Di Menna, Vittorio CortellessaASE 2024 · 12 次引用
