CounterPoint: Using Hardware Event Counters to Refute and Refine Microarchitectural Assumptions (Extended Version)
Nick Lindsay, Caroline Trippel, Anurag Khandelwal, Abhishek Bhattacharjee
TL;DR
CounterPoint automates the evaluation of microarchitectural hypotheses against large, noisy hardware event counter (HEC) data by representing expert ideas as μpath Decision Diagrams (μDDs) and deriving a model cone that captures all feasible HEC combinations. It then constructs tight counter confidence regions to mitigate multiplexing noise and uses linear programming feasibility testing to confirm or refute μDD-derived constraints, enabling iterative model refinement. The Haswell MMU case study demonstrates how CounterPoint uncovers undocumented features such as a TLB prefetcher, page-walk merging, and aborted walks, illustrating the framework's ability to reveal subtle hardware behaviors beyond traditional analysis. The approach scales to many counters, reduces reliance on manual constraint derivation, and provides a practical path toward forging trustworthy, data-driven microarchitectural models for complex architectures.
Abstract
Hardware event counters offer the potential to reveal not only performance bottlenecks but also detailed microarchitectural behavior. In practice, this promise is undermined by their vague specifications, opaque designs, and multiplexing noise, making event counter data hard to interpret. We introduce CounterPoint, a framework that tests user-specified microarchitectural models - expressed as $μ$path Decision Diagrams - for consistency with performance counter data. When mismatches occur, CounterPoint pinpoints plausible microarchitectural features that could explain them, using multi-dimensional counter confidence regions to mitigate multiplexing noise. We apply CounterPoint to the Haswell Memory Management Unit as a case study, shedding light on multiple undocumented and underdocumented microarchitectural behaviors. These include a load-store queue-side TLB prefetcher, merging page table walkers, abortable page table walks, and more. Overall, CounterPoint helps experts reconcile noisy hardware performance counter measurements with their mental model of the microarchitecture - uncovering subtle, previously hidden hardware features along the way.
