Tintin: A Unified Hardware Performance Profiling Infrastructure to Uncover and Manage Uncertainty

Ao Li, Marion Sudvarg, Zihan Li, Sanjoy K. Baruah, Chris Gill, Ning ZhangOSDI 2025

TL;DR

This paper introduces Tintin, a novel hardware performance profiling infrastructure that tackles the challenges of event multiplexing errors and inflexible profiling scopes. By characterizing and minimizing measurement uncertainty, and providing a flexible mechanism for defining profiling scopes, Tintin significantly improves the accuracy and utility of hardware performance counter data.

What Problem Does This Paper Address?

Modern processors offer hardware performance counters (HPCs) to monitor microarchitectural events, crucial for understanding program behavior. However, two major challenges hinder their effective use:

  1. Event Multiplexing Errors: The number of events to monitor often exceeds the limited number of available HPCs. To overcome this, tools use "event multiplexing," where counters are time-shared. This process, however, introduces inaccuracies as events are not continuously monitored, and interpolation is used to estimate counts. Existing methods to mitigate this, like running the application multiple times, are impractical for real-time applications.
  2. Inflexible Profiling Scopes: Attributing HPC data to specific parts of a program's execution is difficult. Existing systems offer limited flexibility in defining "profiling scopes" (e.g., threads, processes, cores), making it hard to precisely link events to specific code regions or complex execution patterns. This can lead to misattribution and inaccurate analysis.

Methods

Tintin addresses these problems with a three-component modular kernel infrastructure:

  • Tintin-Monitor: This component measures HPC data and, crucially, characterizes measurement uncertainty at runtime. It uses the variance of event rates as a proxy for error and employs an efficient incremental update mechanism. This uncertainty is then reported to user-space applications.
  • Tintin-Scheduler: This component uses the uncertainty information from Tintin-Monitor to dynamically schedule events on HPCs. It formulates the problem as an elastic scheduling problem, aiming to minimize overall uncertainty by allocating more HPC time to events with higher variance. This is achieved through a quasilinear time algorithm.
  • Tintin-Manager: This component provides a unified mechanism for managing heterogeneous profiling requirements. It introduces a new kernel object called the "Event Profiling Context" (ePX), which acts as a first-class abstraction for defining flexible profiling scopes (e.g., code regions, execution instances). Tintin-Manager translates user requests into ePXs, manages them collectively, and resolves conflicts between overlapping scopes. It also extends the Linux perf_event API to provide access to its extended functionality, including reported uncertainty.

Datasets

The paper does not introduce new datasets for training. Instead, it evaluates Tintin using:

  • Benchmarks: SPEC CPU®2017 [11] and PARSEC 3.0 [9] benchmark suites are used for comprehensive evaluation of accuracy and overhead.
  • Real-world Applications:
    • Pond [37]: A resource orchestration subsystem for cloud environments.
  • DMon [35]: A tool for detecting software data locality issues.
  • Diamorphine rootkit [43]: Used in an intrusion detection system case study.

Key Insights and Ideas

  • Uncertainty as a First-Class Citizen: The most significant insight is treating measurement uncertainty not as an unavoidable byproduct, but as a quantifiable metric that can be actively managed and reported. This allows applications to make more informed decisions based on the confidence of the profiling data.
  • Elastic Scheduling for Uncertainty Minimization: Applying elastic scheduling principles to HPC event allocation, where more resources are dynamically given to events with higher uncertainty, is a clever way to optimize overall measurement accuracy.
  • ePX: A Unified Abstraction for Profiling Scopes: Elevating profiling scopes to a first-class kernel object (ePX) provides a much-needed abstraction layer to handle diverse and potentially conflicting profiling requirements uniformly. This simplifies management and improves attribution accuracy.
  • Minimal Overhead for Significant Gains: Tintin achieves its improvements with only a marginal increase in runtime overhead compared to existing tools, making it practical for real-world deployment.

Key Results

  • Improved Accuracy:
    • Pond: Tintin improved latency sensitivity prediction accuracy by an average of 0.51 compared to the baseline EMON tool, and by 0.15 on average compared to round-robin scheduling.
  • DMon: Tintin reliably detected data locality issues, identifying backend-bound behavior with 96.8% accuracy, whereas Linux perf_event often resulted in ambiguous mixtures.
  • Intrusion Detection: Tintin improved the AUC for rootkit detection from 0.57 (Linux perf_event) to 0.66 (without uncertainty) and 0.70 (with uncertainty).
  • General Benchmarks: Tintin's average error in event counts was under 5%, significantly outperforming Linux perf_event (average 9.01%) and CounterMiner (average 8.80%).
  • Reduced Overhead: Tintin exhibited an average runtime overhead of only 2.4%, slightly higher than perf_event's 1.9%, but significantly lower than other approaches like BayesPerf.
  • Effective Scope Conflict Resolution: In scenarios with conflicting profiling scopes, Tintin maintained measurement accuracy comparable to separate runs, demonstrating its ability to resolve overlaps without significant degradation.

Limitations and Future Work

  • Hardware Restrictions: Tintin's scheduler has limited support for PMU architectures that restrict certain events from being assigned to specific HPCs. Solving the restricted assignment problem efficiently is noted as a complex challenge.
  • Intrusion Detection Limitations: While Tintin improves the detection of malware using HPC data, the paper acknowledges that sophisticated attacks might still evade detection, as malicious behavior doesn't always manifest in easily detectable microarchitectural events.
  • Future Work: The authors suggest extending the ePX functionality to support binary instrumentation for profiling without source code modification. They also note that the current implementation of Tintin-Scheduler has limitations with very large numbers of events (over 1024), potentially leading to kernel unresponsiveness.

Summary updated

BibTeX
@inproceedings{li2025tintin,
  author = {Ao Li and Marion Sudvarg and Zihan Li and Sanjoy K. Baruah and Chris Gill and Ning Zhang},
  title = {{Tintin: A Unified Hardware Performance Profiling Infrastructure to Uncover and Manage Uncertainty}},
  booktitle = {OSDI},
  year = {2025},
  url = {https://openreview.net/forum?id=Y2Aw5EdSLD},
}

Loading related content...

Figure