Repository navigation
Description
Meta: benchmark linker-coverage integrity — no silent n/a
The ld64.lld-always-n/a bug (#60) was not a one-off: the benchmark reports a linker as n/a
both when a linker is genuinely not yet supported (fine, if documented) and when it silently
fails to link due to an invocation/setup bug (not fine — it understates coverage and hides
regressions). Today those two cases look identical in the published charts. This meta issue makes
benchmark coverage provable and honest: every linker we claim to measure on a platform must be
verified to actually link in CI, and any remaining n/a must be an explicit, documented "pending"
state — never an accidental one.
Current state (from the benchmark-stats branch)
| Platform | Series present | Silent / accidental n/a |
|---|---|---|
x86_64-linux |
bfd, lld, mold, wild, reld (0.0216) | none |
x86_64-pc-windows-msvc |
link.exe, lld, reld = n/a | reld never measured |
aarch64-apple-darwin |
ld, ld64.lld*, reld = n/a | ld64.lld was silently broken (*fixed in #60); reld never measured |
Two distinct problems surface here:
- Accidental silent
n/afrom invocation/setup bugs — e.g.ld64.lld(bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60: clang maps
-fuse-ld=ld64.lldto a nonexistentld.ld64.lld). These must be impossible to ship silently. - reld is
n/aon Windows/macOS — the reld driver shim is built only on the Linux
benchmark-statsleg (ci/install-driver-shims.shruns underif: runner.os == 'Linux'), so
reld is never even attempted on the other two. The README documents reld's Windows/macOS numbers
as honestn/auntil the rustc-based bridge measurement lands — but that "pending" status lives
only in prose, not in the pipeline.
Goal
Make it structurally impossible for an expected linker to silently drop to n/a, and make
pending linkers explicit rather than indistinguishable from failures.
Plan
- Per-platform "expected linkers" gate. Define, per platform, the set of linkers that MUST
produce a real timing, and assert it in CI (the pattern added in bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60: run reld-bench for that
linker and fail if the cell isn/a). Expected sets, initially: linux = {bfd, lld, mold,
wild, reld}; windows = {link.exe, lld}; macOS = {ld, ld64.lld}. A missing timing for an
expected linker fails the build. - Distinguish pending from broken. Give reld-bench a way to mark a series as pending /
unsupported-by-design (carrying the reason it already prints as an HTML comment) so the chart
andlatest.jsonrender "pending" distinctly from "n/a (failed)". No expected linker may be
pending. - Close the reld Windows/macOS gap. Build/provision the reld shim (or the lld bridge
measurement) on the Windows and macOSbenchmark-statslegs so reld is actually measured
there — or, until the rustc-based bridge measurement lands, mark reld explicitly pending on
those platforms (not silentn/a). Ties to the bridge status in the README and issue Bridge linkers: run + benchmark reld on Windows and macOS now by delegating to lld (rust-lld) per platform #17. - Surface it (observability). Print the expected-vs-measured coverage per platform in the
job log / step summary (ties into ci(bench): print per-OS performance stats in the job + verbose benchmark-stats branch publish #53), so a missing linker is loud in the run, not only
discoverable by inspecting the published branch. - Regression guard. A
ci/testscheck (and/or the reld-bench self-test) asserting the
-fuse-ldmapping for each expected linker resolves to an accepted value (extends bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60's
resolve_fuse_ldtests to the full matrix), so a future rename/flag change can't reintroduce
a silentld.<name>-style failure.
Acceptance criteria
- CI fails if any platform's expected linker reports
n/ain the benchmark. -
latest.json/ the charts distinguish pending (documented, e.g. reld bridge on
Windows/macOS until measured) from failedn/a. - reld is either measured on Windows/macOS or explicitly marked pending there (no bare
n/a). - Per-platform expected-vs-measured coverage is printed in the job.
- RED -> GREEN: a test/CI gate that currently passes with a silently-
n/aexpected linker, and
fails after the gate is added (as bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60 demonstrated for macOSld64.lld).
Sub-issues / references
- Motivating instance (fixed): bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60 —
ld64.lldalwaysn/aon macOS; its macOS CI assertion
is the template for the per-platform gate. - Verbose job output / stats surfacing: ci(bench): print per-OS performance stats in the job + verbose benchmark-stats branch publish #53.
- reld bridge status / Windows+macOS measurement: README "Bridge status" and Bridge linkers: run + benchmark reld on Windows and macOS now by delegating to lld (rust-lld) per platform #17.
- Benchmark presentation: ci(bench): render benchmark charts vertically stacked (full width) as the generated default #54 (vertical stacking), and the assets/replay pipeline meta: frozen linker-object benchmark assets — benchmark-assets branch(es) + manifest.json (compile once, link every iteration) #57.
Decisions
- Priority: P2. Correctness/honesty of a public artifact; silent gaps understate coverage and
can mask regressions. - Expected vs pending is the core distinction — the fix is not "never show n/a" but "n/a must be
a deliberate, documented state, and expected linkers are gated." - bench: ld64.lld always n/a on macOS — clang maps -fuse-ld=ld64.lld to nonexistent ld.ld64.lld #60's macOS assertion is the reference implementation for the per-platform gates.
Activity