docs(fork-instrument): evaluate instrumentation size overhead (kd-ok55)#834
Draft
brandonpayton wants to merge 1 commit into
Draft
Conversation
Measurement + assessment of fork-instrumentation code-size overhead with a do/defer/won't-fix recommendation. The fork-path reverse-reachability closure instruments 69-87% of ALL functions across 7 real runtimes (bash, coreutils, vim, git, ruby, php, php-fpm) and ~doubles the code section (perl +127%, ruby +167% clean single-step). Per-function cost is dominated (analytically; unmeasured) by per-scalar-local spill, a hard inline floor under wasm's static-local-index rule. Recommendation: DEFER a dedicated size project; DO a safe --stats enabler (prerequisite for adjudicating the size case); if prioritized, stage frame-ptr CSE (ABI-neutral ~15-20%) -> fork-live-only local spill -> selection tightening. Won't-fix the scaffolded table-driven trampoline for size (targets the minor dispatch term). Design/eval only; no emitter change. Artifacts + reproducible harness under test-runs/kd-ok55/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Design/evaluation for kd-ok55 (discovered from kd-lfas). No emitter change — this is a measurement + written assessment + do/defer/won't-fix recommendation for @brandon's sizing/prioritization. Draft: for review/decision, not merge.
Doc:
docs/plans/2026-07-02-fork-instrument-size-overhead-eval.md. Reproducible data undertest-runs/kd-ok55/.What was measured
bytes(f) ≈ A + B·callsites + C·locals, A≈110 B fixed, B≈27 B/call-site; the per-scalar-local term C is the largest per-function term by a byte-level read of the emitter but is unmeasured (synthetics have no locals) — hence the--statsrecommendation.Recommendation
--statsmode (no emitter change) — a prerequisite for adjudicating the per-function size case.call_indirectselection. Not the trampoline first.call_indirect+ per-function tables.Key claims independently adversarially reviewed; the apportionment was softened to a measured-vs-inferred split accordingly.
🤖 Generated with Claude Code