Portable Targeted Sampling Framework Using LLVM

Zhantong Qiu, Mahyar Samani, Jason Lowe-Power

Published: 2025/9/2

Abstract

Comprehensive architectural evaluation of full workloads is throttled by slow simulation and per-binary sampling pipelines. We present Nugget, a flexible framework for portable sampling across simulators and real hardware, ISAs, and libraries. Nugget operates at the LLVM IR level to perform binary-agnostic interval analysis, then emits lightweight, cross-platform executables--nuggets--that can be validated on real machines before driving simulation. Across SPEC CPU2017, NPB, and LSMS, Nugget cuts interval-analysis cost by orders of magnitude relative to functional simulation (up to ~578X on multithreaded NPB), keeps single-thread overhead low, and enables native-speed validation of selected samples. Case studies with gem5 show that nuggets support evaluation of system performance and model accuracy. Nugget makes sampling methodology research faster and more portable.

Portable Targeted Sampling Framework Using LLVM | SummarXiv | SummarXiv