Skip to main content
Kent Academic Repository

Reclaiming Profiler Ground Truth: Determining and Improving the Accuracy of CPU Profilers in the Presence of Dynamic Compilation

Burchell, Humphrey Hugo Cosmo (2026) Reclaiming Profiler Ground Truth: Determining and Improving the Accuracy of CPU Profilers in the Presence of Dynamic Compilation. Doctor of Philosophy (PhD) thesis, University of Kent. (doi:10.22024/UniKent/01.02.116417) (KAR id:116417)

Abstract

In the presence of highly optimising compilation and modern hardware, understanding where a program spends its time is complex. Profilers are used to understand program execution, but they introduce their own complexity through the observer effect, the phenomenon where measuring something changes the thing being measured. In this work, we empirically evaluate sampling- and instrumentation-based profilers. For sampling-based profilers, we evaluate how often results change across multiple runs, giving an indication of self-precision, and compare profilers against each other to determine their disagreement when profiling the same program execution. For instrumentation-based profilers, we investigate accuracy, overhead, and their effect on compilation through additional generated code and compilation statistics. To alleviate known issues such as the observer effect, we implement our own profiler, BuboC, that makes use of late-compiler-stage instrumentation to avoid interfering with compilation decisions and reduce the tool's overhead. We solve a key limitation in evaluating profilers: the absence of a known ground truth against which to compare results. Without knowing the correct execution profile, it is extremely difficult to determine whether a profiler is accurate, or to what degree. To address this, we introduce a novel approach based on deliberate machine-code slowdown. We insert additional instructions to induce a controlled slowdown, allowing us to evaluate a profiler based on its ability to correctly attribute this additional execution time. This provides a practical approach to measuring profiler accuracy and the degree of that accuracy. Finally, we evaluate a loop-level instrumentation profiler using late-compiler-stage instrumentation. We find that this loop-level profiler provides more accurate measurement of how much time the CPU spends in loops than sampling-based profilers, while maintaining practical overhead and reduced observer effect. Overall, this work provides a clear identification of the issues present in modern profiling under highly optimising compilation and hardware complexity, as well as an approach to alleviate these issues and improve profiler accuracy.

Item Type: Thesis (Doctor of Philosophy (PhD))
Thesis advisor: Marr, Stefan
DOI/Identification number: 10.22024/UniKent/01.02.116417
Uncontrolled keywords: Profiling, Profiler Accuracy, Just-in-Time Compilation, Sampling, Instrumentation, Ground Truth, Loop Profiling, Machine-Code Slowdown
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Institutional Unit: Schools > School of Computing
Former Institutional Unit:
There are no former institutional units.
Funders: University of Kent (https://ror.org/00xkeyj56)
Depositing User: System Moodle
Date Deposited: 25 Sep 2026 09:17 UTC
Last Modified: 02 Oct 2026 02:39 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/116417 (The current URI for this page, for reference purposes)

University of Kent Author Information

Burchell, Humphrey Hugo Cosmo.

Creator's ORCID:
CReDIT Contributor Roles:
  • Depositors only (login required):

Total unique views of this page since July 2020. For more details click on the image.