Many profilers based on bytecode instrumentation yield wrong results in the presence of an optimizing dynamic compiler, either due to not being aware of optimizations such as stack allocation and method inlining, or due to the inserted code disrupting such optimizations.
Prof. Acc is a novel technique that avoids such perturbations. In particular, it makes profilers implemented with bytecode instrumentation techniques aware of the optimization decisions of the dynamic compiler, and makes the dynamic compiler aware of inserted profiling code. Prof. Acc enables profilers which collect dynamic metrics that (1) correspond to an execution of the base program without profiling (w.r.t. the applied compiler optimizations), and (2) properly reflect the impact of dynamic compiler optimizations.
Currently, Prof. Acc is implemented in Oracle’s Graal compiler.
Prof. Acc is integrated into the Graal compiler, hosted as open-source project on GitHub.
To use it, please checkout the howto documentation.
A version of DiSL emitting Prof. Acc annotations is available on GitHub.
 Yudi Zheng, Lubomír Bulej, Walter Binder: Accurate Profiling in the Presence of Dynamic Compilation. OOPSLA 2015: 433-450 [pdf][video] (distinguished paper)