{
  "id": 17561228,
  "title": "Non-Determinism and Overcount on Modern Hardware Performance Counter Implementations",
  "url": "https://urgent.news/2026/11/01/non-determinism-and-overcount-on-modern-hardware-performance-counter",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-01T07:55:47.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://web.eece.maine.edu/~vweaver/projects/deterministic/deterministic_counters.pdf"
  },
  "original_language": "en",
  "account": "Ideal hardware performance counters are expected to provide exact, deterministic results. However, this is not always the case with real-world performance monitoring unit (PMU) implementations on x86_64 machines. Events that should be deterministic, like retired instructions, exhibit variation and overcounting even in strictly controlled environments. These non-intuitive effects pose challenges for applications requiring strict determinism, such as deterministic replay or deterministic threading libraries.\n\nA study was conducted on eleven different x86_64 CPU implementations to investigate the sources of divergence from expected count totals. Only a few counter events were found to have enough determinism to be used without adjustment in deterministic execution environments. Notably, the iret interrupt return instruction appears to count as a userspace instruction despite running in kernel space, leading to non-deterministic counts. Counter events that do not count for iret, such as conditional branches and retired stores, appear to be more deterministic.\n\nThe investigation also extended to ARM, IA64, POWER, and SPARC systems, where the counter events exhibited more determinism. The study explores various methods of working around the limitations of x86_64 events, but in many cases, this would require architectural redesign of the underlying PMU.",
  "summary": "Abstract: Ideal hardware performance counters provide exact deterministic results. Real-world performance monitoring unit (PMU) implementations do not always live up to this ideal. Events that should be exact and deterministic (such as retired instructions) show run-to-run variation and overcount on x86_64 machines, even when run in strictly controlled environments. These effects are…",
  "key_points": [
    "Non-deterministic results in hardware performance counters on x8664 machines.",
    "Retired instructions exhibit variation and overcounting even in controlled environments.",
    "Some counter events, like iret and conditional branches, show more deterministic behavior."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}