A Language Approach to Fine-Grained Microarchitectural Observation
Guokai Chen, Sergi Soler Arrufat, Clément Pit-Claudel, Thomas Bourgeat
Abstract
Analyzing, understanding, and validating the performance of modern processors present significant challenges. These stem from two primary issues. First, it is difficult to construct “performance tests” that can test precisely scoped hypotheses about microarchitectural behavior. Second, it is difficult to make sense of performance measurements: hardware teams see too many low-level events that they struggle to map back to the tested programs, and software developers and security researchers can only observe coarse-grained performance counters. This paper addresses both challenges with a unified programming language approach that we prototype in a framework named HT. To overcome the test-construction problem, our insight is that a broad range of microarchitectural effects are triggered by a specific software address layout. We introduce a DSL that enables specifying desired microarchitectural effects of a program through specifying its address layout, separately from its functional behavior. This separation is achieved using an SMT solver to compute a suitable instruction and data layout. To overcome the observability challenge, we systematically link high-level software patterns down to raw hardware simulation outputs. We introduce flexible event-tracing constructs designed to construct custom, multi-cycle higher-level events from (single-cycle) low-level event logs, effectively acting as the bridge that connects software execution patterns to low-level hardware events. We demonstrate HT’s utility on XiangShan, a production-grade open-source RISC-V processor, through three case studies: analyzing the performance impact of the Zicond RISC-V extension, reproducing subtle microarchitectural attacks, and characterizing the branch prediction behavior of Lua, an interpreted language.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Related papers
- TraceRTL: Agile Performance Evaluation for Microarchitecture ExplorationZifei Zhang, Yinan Xu, Sa Wang, Dan Tang et al.HPCA 2026
- GSIM: Accelerating RTL Simulation for Large-Scale DesignsLu Chen, Dingyi Zhao, Zihao Yu, Ninghui Sun et al.DAC 2025 · 1 citation
- Formally Verifying Arithmetic Chisel Designs for All Bit Widths at OnceWeizhi Feng, Yicheng Liu, Jiaxiang Liu, David N. Jansen et al.DAC 2024
- Democratizing and Accelerating Hardware Verification with Software-Native OptimizationYunlong Xie, Zhicheng Yao, Fangyuan Song, Jincheng Liu et al.ISCA 2026
- COGENT: Adaptable Compiler Toolchain for Tagging RISC-V BinariesDavid B. Demicco, Matthew Cole, Gokturk Yuksek, Ravi Theja Gollapudi et al.ASPLOS 2025
