RUE-1223: make compiler timing contention-free - #2106
Merged
steveklabnik merged 1 commit intoAug 5, 2026
Conversation
steveklabnik
enabled auto-merge
August 5, 2026 05:39
steveklabnik
force-pushed
the
codex/rue-1223-contention-free-instrumentation
branch
from
August 5, 2026 05:50
5b593ff to
3b6ba59
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Timing collection ran on parallel query hot paths and serialized every span close and phase transition through one shared mutex. This change keeps the hot path local and merges once at worker completion or report generation, so instrumentation can coexist with compiler parallelism.
Performance
Alternating release-build pairs on an Apple M5 measured median paired instrumentation overhead of:
The ratio of Caldera's unpaired marginal medians was +2.64% on the noisy interactive host; raw samples and the pairing rationale are preserved in the acceptance ledger. Startup medians were both 0.01 s at the host timer's resolution.
Unattributed compiler-root time fell from 39.0% to 12.0% on Meridian and from 53.1% to 22.3% on Caldera. Instrumented and uninstrumented output hashes matched for both workloads, and the phase partition balanced exactly in integer nanoseconds.
Validation
scripts/rue fmtscripts/rue quick(30/30 targets)/opt/homebrew/bin/bash clippy.sh(63 targets)RUE_TEST_TIER=premerge ./test.sh(78/78 targets)Fixes RUE-1223.