Non-Determinism and Overcount on Modern Hardware Performance Counter Implementations

Lobsters Hottest Papers

Summary

A research paper examining non-determinism and event overcount in modern hardware performance counter implementations, analyzing why performance measurements may not be reproducible across runs and platforms.

<p>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 non-intuitive to casual users and cause difficulties when strict determinism is desirable, such as when implementing deterministic replay or deterministic threading libraries.</p> <p>We investigate eleven different x86_64 CPU implementations and discover the sources of divergence from expected count totals. Of all the counter events investigated, we find only a few that exhibit enough determinism to be used without adjustment in deterministic execution environments. On these machines it appears that the iret interrupt return instruction counts as a userspace instruction despite running in kernel space, which keeps the counts from being deterministic. The deterministic events we find are those that do not count for iret, such as conditional branches and retired stores.</p> <p>We also briefly investigate ARM, IA64, POWER and SPARC systems and find that on these platforms the counter events have more determinism. We explore various methods of working around the limitations of the x86_64 events, but in many cases this is not possible and would require architectural redesign of the underlying PMU.</p> <p><a href="https://lobste.rs/s/pswl6z/non_determinism_overcount_on_modern">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 11/01/26, 09:34 AM

The content you've provided is raw binary PDF data (compressed streams using FlateDecode), not readable Chinese or English text. The actual document content is inside zlib-compressed streams that cannot be decoded from the source you've pasted. **To translate this PDF, you could:** 1. **Extract the text first** using a tool like `pdftotext` (from poppler-utils): ``` pdftotext deterministic_counters.pdf output.txt ``` Then share the extracted text for translation. 2. **Use a PDF reader** to open the file and copy the text content directly. 3. **Use a PDF-to-markdown converter** like `pandoc` or `pdf2md` to get structured text that can then be translated. The source URL appears to be a technical paper by Victor Weaver from the University of Maine, likely about deterministic hardware performance counters on modern CPUs (Intel/AMD). If you can extract and share the actual text content, I'd be happy to translate it for you.

Similar Articles

Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?

Hugging Face Daily Papers

This paper audits three performance-optimization benchmarks (GSO, SWE-Perf, SWE-efficiency) for coding agents, finding that runtime instability, scoring rules, and task coverage significantly affect reliability, and that many tasks are already solved by at least one public submission.

Deterministic Hypervisors For Cheap

Lobsters Hottest

The author discusses building a deterministic hypervisor, explaining the challenges of achieving determinism due to concurrency and hardware issues, while critiquing existing implementations in cybersecurity and virtualization.

Non-Determinism Doesn't Matter

Hacker News Top

A reflective blog post arguing that non-determinism in LLM output is not a fatal flaw for software development, since only the end result needs to be exact—not the path taken. The author advocates using AI to build deterministic, tested tools that agents can call, thereby harnessing randomness today to reduce randomness in future systems.