Goal
Build deterministic performance attribution and regression infrastructure that identifies the exact tier, runtime phase, synchronization point, allocation site, and memory cost responsible for every material change.
Scope
- Extend machine-readable counters for interpreter, VM quick kernels, baseline JIT, optimizer OSR/deopt, runtime operations, invalidation, code retirement, GC phases, allocator publication, shape/property/element locks, thread lifecycle, Wasm dispatch, and host callbacks.
- Capture wall time, CPU time, allocations/bytes, peak and retained RSS, GC pause p50/p95/max, compilation latency, code bytes, tier publication/rejection/deopt counts, lock contention, and worker/thread wait time.
- Ingest trustworthy hardware/energy/thermal counters through #503, preserving availability, permission, multiplexing, calibration, and logical-work normalization rather than substituting missing values.
- Register and consume exact generated-code symbols/native stacks through #501 so samples are attributed to artifacts, tiers, origins, inline frames, runtime stubs, and retired generations rather than anonymous mappings.
- Provide an exact-parent A/B driver that alternates order, validates inputs/checksums/metadata, records raw samples, and fails dirty-tree publication.
- Add stable profile schemas so an implementation issue can link one causal artifact rather than a prose impression.
- Run performance checks on a declared quiet reference host. Hosted CI artifacts may diagnose drift but must not become claims against the recorded M3 Pro baseline.
- Preserve rejected experiments and their reason so known failures are not repeatedly rediscovered.
- Measure instrumentation itself with disabled/enabled exact-parent A/Bs; production-disabled counters, symbols, sampling hooks, and profile schemas must have zero or bounded negligible overhead.
Guardrails
- Instrumentation must be opt-in and must prove that the production-disabled path has zero or bounded measured overhead.
- A threshold adjustment is not a fix unless a profile shows the threshold is causal and the same change is robust across input scale/distribution.
- A faster result that increases unbounded retention, skips work, changes checksums, or changes semantic/tier accounting is rejected.
Acceptance
- Every #460 workload reports complete tier/runtime/GC/memory attribution.
- Stable hosts additionally report #503 efficiency/thermal data, and every native backend emits #501 symbolized attribution.
- Exact-parent tooling reproduces existing object-churn and JIT profile artifacts byte-for-byte or through a versioned schema migration.
- A noise-qualified >10% regression on stable reference-host rows blocks publication; row-level changes remain visible below that threshold.
- Performance artifacts name exact zig-js, zig-gc, zig-regex, Zig, OS, hardware, power, and workload revisions.
- Instrumentation-overhead fixtures quantify disabled/enabled wall, CPU, RSS, code-size, and contention cost before a profiler becomes a publication requirement.
- Benchmark validation, docs generation, link checks, and focused unit tests run in CI without executing long reference-host measurements.
Foundation
- Baseline dispatch profile.
- Object-churn phase profile.
- Independent stable-ID A/B.
- Existing publication guard: 018517d2.