ReviewOS

zig-utils/zig-js

Perf: add causal attribution and exact-parent regression infrastructure

#461
Open chris opened this 9 days ago ·
9 days ago

Parent: #459 Depends on: #460

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

9 days ago

Foundational attribution and exact-parent infrastructure landed on main in 37dfdcc2.

This adds:

  • frozen zig-js-performance-attribution-v1 with 55 required metrics spanning wall/CPU/memory, interpreter/VM/native tiers, compile/deopt/code lifetime, runtime/Wasm calls, GC phases, allocator publication, locks/workers, #503 hardware efficiency, and #501 symbol coverage;
  • mandatory measured / unavailable / not_applicable observations, so absent instrumentation cannot silently become zero or disappear;
  • lossless, SHA-pinned versioned migration for both accepted object-churn exact-parent TSV layouts, with structural tests against the checked-in July 29 artifacts;
  • a generic exact-parent collector that verifies the candidate first-parent relationship, clean zig-js/zig-gc/zig-regex worktrees, source and binary hashes, exact row identity/checksum, alternating pair order, process CPU and peak RSS;
  • the specified noise-qualified publication gate: >10% candidate wall regression only blocks on a declared quiet reference host when both variants are <=5% RSD; diagnostic/hosted runs remain visible but non-gating;
  • CI-fast validation through zig build benchmark-comparison-test, plus documented reproduction and successful docs link/build gates.

Validation completed:

  • zig build benchmark-comparison-test
  • lossless migration + validation of the 112-row independent object-churn artifact
  • lossless field mapping of the 56-row shared GC artifact
  • a real runner CPU/RSS parsing smoke
  • python3 tools/docs-link-check.py
  • bun run docs:build

The issue remains open. Per-workload engine instrumentation for the still-unavailable schema fields, instrumentation-overhead evidence, #501 symbols, and #503 counters remain required before the acceptance list is complete.

9 days ago

6bae81e7 restores the exact-parent harness Required Check in hosted CI.

The harness intentionally validates HEAD, its first parent, and a non-parent HEAD~2 rejection witness. The gate previously used the checkout action's depth-1 default, so ancestry resolution failed before the seven contract tests could run. The primary gate checkout now retains exactly three commits; the existing harness passes 7/7 locally. This changes no measurement or publication threshold and flips 0 test262 cases.

9 days ago

Follow-up CI evidence for 6bae81e7: the actual benchmark-comparison-harness Required Check completed successfully with exact-parent ancestry available.

9 days ago

Published a new exact-parent causal artifact in 5e0c4023: report and raw counters.

It names exact zig-js parent/candidate, zig-gc, zig-regex, Zig, OS, hardware, power/host class, workload hash, and binary hashes; alternates seven fresh-process pairs; retains raw timing while excluding it from performance claims on a non-quiet host; and separates the causal stages. Publications stay 288→284 while invalidation/reclaimed-mapping churn falls 281→4 (-98.6%). Candidate-only fields report 4 exact-shape retirements, 67 survivors, and 65,536 retired bytes; parent-side precise fields are honestly unavailable because the exact parent predates them.

186083b8 also made the exact-parent self-test intrinsically shallow-checkout-safe by testing against its own three-commit fixture. The clean performance run passed that Home-powered harness and the full 1,540-sample publication guard. This advances the exact-parent/schema and identity acceptance work, but does not claim the broader #461 profiler contract is complete.

9 days ago

Landed https://github.com/zig-utils/zig-js/commit/44b097e19f3ac40200771d91b37f894bce7b92b2 on main.\n\nThis publishes the clean full-work zig-js-representative-v8 tier-attribution sidecar: 18 families, 36 base/structural-variant workloads, and 108 configuration/warmup/invocation snapshots at exact revision a1b5c39. All frozen checksums matched; every pair selected the same non-empty tier set and allocated the same environment count in warmup and invocation. The historical V2 artifact remains byte-for-byte untouched.\n\nValidation: full representative-tier-attribution generation; zig build docs-link-check (92 files); bun run docs:build (49 pages, manifest reproduced). Flips 0 test262 cases.\n\nThis closes the current 18-family tier-inventory coverage gap in #461. Runtime, GC, memory, instrumentation-overhead, #501 symbol, and #503 counter acceptance work remains open.

9 days ago

Landed https://github.com/zig-utils/zig-js/commit/2c7c4f31025ffb793dc474ffe6847f1705f1dc76 on main.\n\nOpt-in representative phase snapshots now expose exact native-code state (live/currently retired/cumulatively reclaimed artifacts and bytes, plus shape/full/unknown invalidation and fallback counters) and precise-heap state (live bytes, last-full baseline, total collections, and full collections). New raw sidecars are schema version 2; schema-1 artifacts remain untouched. Gauges and cumulative counters are explicitly named and rendered separately from timing measurements, so heap residency is not mislabeled as RSS or allocation throughput.\n\nValidation: real 18-family quick collector; benchmark-comparison-test; focused attribution unit; test-parallel (1,501 passed, 0 skipped/failed/leaked); docs-link-check; reproducible BunPress build. Test262 flips are 0 because the conformance runner neither enables nor reads the opt-in snapshot.\n\nThis advances #461 native-tier lifetime/invalidation and heap-residency attribution. CPU/RSS/allocation-rate, GC pause distributions, runtime/host/Wasm dispatch, synchronization, instrumentation-overhead, #501 symbols, and #503 counters remain open.

9 days ago

Published the clean full-work schema-v2 evidence in https://github.com/zig-utils/zig-js/commit/e5b5640b1e4577d109f42aa4532ae141bcce3a82.\n\nThe raw artifact contains 108 configuration/warmup/invocation snapshots across all 36 V8 base/structural-variant workloads at exact implementation revision 2c7c4f3. Every snapshot retains the complete new native-code and heap inventories; frozen checksums, tier signatures, and environment-allocation parity passed. The rendered report exposes live code bytes, precise-heap live bytes, and cumulative collection counts by family and phase without converting them into timing or RSS claims.\n\nThe schema-1 V2 and V8 artifacts remain unchanged. Docs links pass across 93 files and the 49-page BunPress manifest reproduces. Flips 0 test262 cases.

9 days ago

Landed https://github.com/zig-utils/zig-js/commit/5be57aa8cd074b342a443c510d8653bf45e7ed54 on main.\n\nThis adds the required instrumentation disabled/enabled fixture for execution-tier attribution. It alternates fresh-process pairs from one exact ReleaseFast binary, validates the frozen representative workload/jobs/checksum for every sample, and records wall time, user/system CPU, peak RSS, retired instructions, cycles, and voluntary/involuntary context switches with logical-work normalization. Retained RSS is explicitly unavailable, single-thread contention is not applicable, and the same-binary runtime toggle does not claim to measure compile-time support size.\n\nValidation: real two-pair quick A/B; benchmark-comparison-test; dependency-audit (14 edges, 59 tools, 0 migration targets); docs-link-check (93 files); reproducible 49-page docs build. Test262 flips are 0 because the mode is benchmark-only.\n\nThe harness is complete; a clean seven-pair full-work artifact is the next publication step. Broader profiler-overhead fixtures for GC, synchronization, symbols, and #503 remain open.

9 days ago

The first full-work instrumentation artifact is published in https://github.com/zig-utils/zig-js/commit/8eb68138. It contains all 14 raw samples from seven alternating disabled/enabled pairs at exact harness revision 2fa9753, with frozen checksum/workload identity and wall, CPU, peak RSS, retired-instruction, cycle, and context-switch observations.\n\nThe recorded host was on battery and discharging, so the artifact is explicitly diagnostic and does not satisfy the negligible-overhead acceptance claim. The harness now defaults to diagnostic and https://github.com/zig-utils/zig-js/commit/2fa97532 makes quiet_reference fail closed without captured AC power; https://github.com/zig-utils/zig-js/commit/00e8fc7d also makes report provenance and raw-sample linkage mandatory.\n\nThe full collection path is proven. A quiet-reference AC rerun remains required before checking the overhead acceptance item.

9 days ago

Landed https://github.com/zig-utils/zig-js/commit/e6b7dc42 on main.\n\nThe opt-in sidecar now counts exact generic VM instruction dispatches, successful VM quick-kernel entries, native-tier runtime-operation entries, embedding host callbacks (including public-C-API direct callbacks), and WebAssembly export dispatches. Generic VM dispatches accumulate per activation and publish once, avoiding a profiling atomic on every instruction; ordinary contexts retain the existing null inventory pointer.\n\nThe frozen workload contract is now V9: it hash-inherits every V8 workload, mode, jobs, checksum, timed boundary, engine-availability ruling, and acceptance decision, changing only the versioned attribution inventory. New sidecars are schema 3, reject execution-inventory drift, and fail if any Wasm family records no invocation dispatch.\n\nValidation: real V9 quick collection covered all 36 workloads / 108 phase snapshots; 1,501 unit tests passed with 0 skipped, failed, or leaked; benchmark-comparison-test, dependency-audit (14 edges, 59 tools, 0 migrations), docs-link-check (94 files), and the reproducible 49-page docs build passed. Flips 0 test262 cases because conformance contexts do not enable the inventory.\n\nA clean full-work schema-v3 artifact is next. Allocation throughput, GC pause distributions, synchronization/wait attribution, retained RSS, compilation latency, #501 symbol samples, and the quiet-reference overhead rerun remain open.

9 days ago

Published the clean full-work runtime-attribution evidence in https://github.com/zig-utils/zig-js/commit/79b7ff13.\n\nThe schema-v3 artifact contains 108 configuration/warmup/invocation snapshots across all 36 V9 base/variant workloads at exact implementation revision https://github.com/zig-utils/zig-js/commit/e6b7dc42. It retains the complete execution, admission, native-code, and precise-heap inventories. Frozen checksums, tier signatures, and environment-allocation parity passed.\n\nThe runtime panel now exposes exact VM dispatches, quick-kernel entries, native runtime operations, host callbacks, and Wasm dispatches per family and phase. All six Wasm base/variant invocation rows are nonzero (scalar 160 each, SIMD 200 each, memory 180 each as invocation-phase deltas). Zero quick-kernel and host-callback counts in this matrix remain explicit rather than being inferred or omitted.\n\nDocs links pass across 95 files and the 49-page BunPress manifest reproduces. Flips 0 test262 cases.\n\nThis completes the representative runtime-dispatch slice. Allocation count/bytes, GC pause distributions, synchronization/contention and worker-wait attribution, retained RSS, compilation latency, #501 symbolized native samples, #503 efficiency counters, and the quiet-reference overhead rerun remain open.

9 days ago

Pushed synchronization/worker-lifecycle attribution in .\n\nThis versions the representative contract to V10 while hash-inheriting all 18 V9 workload families, modes, jobs, checksums, timing boundaries, engine-availability rulings, and acceptance decisions. The opt-in sidecar now snapshots all 44 existing per-path synchronization fields from before context construction and validates the exact inventory plus lock-acquisition/contention and worker-total/max coherence. Scored timing rows remain uninstrumented.\n\nValidation: the real quick matrix completed 36 workload executions / 108 phase snapshots with frozen checksums and exact environment parity. These single-context lane-zero workloads recorded exact environment/object lock acquisitions, while contention, wait, and worker deltas measured zero. OK representative benchmark self-test: matrix, frozen checksums, and timing floor verified wasm-simd-benchmark self-test: ok OK performance-attribution self-test: schema failures and 168 legacy rows verified OK shared object-churn A/B self-test: telemetry, balancing, and publication finding verified OK benchmark comparison self-test: matrix, checksum, timing, and publication gates verified gc-generation-benchmark self-test: ok wasm-threads-benchmark self-test: ok OK benchmark publication self-test: history, noise, environment, and README gates verified representative matrix structural tests: 14/14 passed OK exact-parent self-test: identity, pairing, regression, and cleanliness gates verified OK representative tier attribution self-test: phases, checksums, tier/runtime/synchronization inventory, environment parity, native-code lifetime, and heap state verified OK instrumentation overhead self-test: parsing, alternation, checksums, metrics, and explicit boundaries verified OK object-churn GC profile self-test: telemetry, accounting, and findings verified OK independent object-churn self-test: parsing, classification, and checksum rejection verified, docs-link-check: 96 files, all links resolve, [?25l ⠋ Building documentation... ⠙ Building documentation... ⠹ Building documentation... ⠸ Building documentation... [?25h✓ Built 49 pages to HTML in 421.70308300000005ms, and pass.\n\nThis is not the shared-lane synchronization result and does not close #461. A full-work schema-4 artifact and shared-mode attribution/quiet-reference overhead evidence remain open, along with allocation/GC/RSS/compilation panels.

9 days ago

Published the full-work V10/schema-4 synchronization artifact in https://github.com/zig-utils/zig-js/commit/e81642f2e410f1c3718f8051ad392e2b5d60b552.

Evidence scope: 108 phase snapshots across all 36 base/variant workloads at exact implementation revision 539cdb0, with all 44 synchronization fields retained. The full runs record nonzero environment and object lock acquisitions (maximum cumulative snapshot values 36,930,189 and 57,613,358 respectively) and zero lock contention, wait time, or worker runs for the single-context lane-zero protocol. The docs explicitly keep shared-lane attribution separate rather than inferring it from these runs.

Publication checks: schema 4, V10, quick=false, 108 snapshots, 44 fields, exact clean revision; docs link check covers 96 files and docs build covers 49 pages. #461 remains open for shared-mode attribution/quiet-reference overhead and the allocation/GC/RSS/compilation panels.

9 days ago

Pushed exact allocation and per-cycle GC-pause attribution in https://github.com/zig-utils/zig-js/commit/1ca32088e053355ceb3c8b8431fa29f3daf6d06b.

V11 hash-inherits all 18 V10 workload families, 36 base/variant workloads, modes, jobs, checksums, timing boundaries, and acceptance decisions. It adds two deliberately separate allocation domains: successful Context backing allocator operations/growth/releases with exact bytes/current/peak, and logical GC-cell fresh/reused/relocation/delegated issuance plus frees/bytes. This avoids double-counting slab refills as cell allocations.

Every completed minor/full collection now appends its raw nanosecond pause to opt-in owned storage. Schema 5 rejects any sample overflow and requires full sample count == heap full collections and minor sample count == total minus full collections. Reports derive p50/p95/max by nearest rank and render none when a phase has no cycle. Ordinary contexts keep the original allocator chain and allocate no pause storage; the existing alternating overhead fixture measures the remaining nullable sink checks.

Validation: the real V11 quick matrix completed all 36 workloads / 108 snapshots with exact allocation coherence and no pause overflow; 1,502 unit tests passed with 0 skipped, failed, or leaked; focused profiler tests passed normally and under TSan; benchmark-comparison-test, dependency audit, docs links, and the 49-page docs build pass. A two-pair diagnostic A/B also completed with identical checksums, but is not promoted as quiet-reference evidence.

This removes allocations, allocated bytes, and GC pause p50/p95/max from the frozen pending-metric inventory. #461 remains open for CPU time, peak/retained RSS, compilation/deoptimization latency, shared-lane attribution, #501 symbols, #503 counters, and a clean quiet-reference overhead publication.

9 days ago

Follow-up correction pushed in https://github.com/zig-utils/zig-js/commit/4ceaa61eb5298ffd9c4824c100ad3b5dc01d7634 before publishing evidence.

The first full-work attempt was rejected by the V11 coherence gate on promises_async_microtasks. Root cause: allocation recorded requested cell bytes while free recorded physical size-class bytes, so relocation-heavy runs compared different domains. The fix records issued size-class storage bytes for slab and relocation allocation, matching the free side. The validator was not weakened.

After the fix, the full async probe reports 1,903,776,128 cumulative issued storage bytes versus 1,285,196,736 freed bytes, with exactly 531 raw pause samples for 531 heap collections. All 36 V11 quick workloads / 108 snapshots pass again, and a focused unit test now locks the fresh/reused/delegated size-class accounting contract. The rejected run wrote no artifact.

9 days ago

Published the clean full-work V11/schema-5 artifact in https://github.com/zig-utils/zig-js/commit/4a8634682d94af6482b1f00330c69194d62f2258.

Evidence: 108 phase snapshots across all 36 base/variant workloads at exact implementation revision 4ceaa61. The raw artifact retains all 16 allocation fields and exact histories for 1,953 completed collections. Overflow is zero, every full sample count equals heap full collections, and every minor count equals total minus full. The largest recorded pause is 554,069,000 ns; the report includes nearest-rank p50/p95/max per family and phase and renders none for no-cycle phases.

The new attribution also found a material causal outlier worth carrying into the remaining RSS work: regexp variant invocation ends at 23,789,570,528 requested Context-backing bytes versus 186,371,506 for base, while both report identical 276,754,304 GC-cell storage bytes. This localizes the difference outside GC-cell issuance; it is not converted into an RSS claim. The pending peak/retained RSS panel must measure how much of that requested backing is resident/retained.

Docs links now pass across 97 files and the 49-page manifest reproduces. This completes the representative allocations/allocated-bytes and GC pause p50/p95/max slice. #461 remains open for CPU, peak/retained RSS, compilation/deoptimization latency, shared-lane attribution, #501, #503, and clean quiet-reference overhead evidence.

9 days ago

Implemented process CPU and resident-memory attribution in 00b5e00 (feat(profiling): attribute process CPU and resident memory): https://github.com/zig-utils/zig-js/commit/00b5e00f

V12 preserves the existing 36-workload/108-snapshot phase contract and adds cumulative process user/system CPU from getrusage, Darwin ru_maxrss peak bytes, and live Mach resident_size bytes at configuration, warmup, and invocation boundaries. CPU is phase-delta attributed; peak and retained RSS remain boundary gauges. Invocation retained RSS is sampled after the workload host checkpoint and before Context destruction, so it is distinct from both allocator-requested bytes and process-exit peak.

Validation completed: all 36 quick workloads passed frozen checksums and resource coherence; the complete benchmark harness self-test family passed; ReleaseFast comparison runners built; docs manifest/build passed. Full-work V12 evidence remains the next step, so no quick values are being promoted as publication evidence.

9 days ago

Published the full-work V12 process-resource evidence in 957e42a (docs(bench): publish process resource attribution): https://github.com/zig-utils/zig-js/commit/957e42a9

The checked-in schema-6 artifact contains 108 snapshots across all 36 base/variant workloads, names exact implementation 00b5e00, and preserves four process fields at each configuration/warmup/invocation boundary: user CPU ns, system CPU ns, peak RSS bytes, and retained RSS bytes.

The full regexp invocation now separates the domains directly: base live resident RSS is 160,907,264 bytes; variant live resident RSS is 2,986,147,840 bytes with a 3,172,679,680-byte fresh-process peak, while the variant Context backing-current counter is 23,789,570,528 bytes. The docs explicitly state these are separate measured domains, not allocator-to-RSS conversions. Docs manifest and build both pass.

9 days ago

Implemented the remaining frozen tier timing metrics in f0546ee (feat(profiling): attribute tier transition latency): https://github.com/zig-utils/zig-js/commit/f0546ee8

V13 records baseline and optimizer successful/failed attempt counts plus total/max nanoseconds from an accepted compilation claim through publication outcome. Deoptimization latency starts only after native code returns a recoverable exit and ends after the bytecode continuation is fully reconstructed, excluding native execution before the exit. Successful tier-up counts are validated against owner publication counts; timed deoptimization counts are validated against execution deoptimization counts. Ordinary contexts retain a null attribution pointer and perform no clock reads.

Validation completed: all 36 quick workloads / 108 snapshots passed; the sharded unit suite passed 1,502/1,502 with zero skips, failures, or leaks; normal and TSan probes passed for both tier attribution and real native-finally deoptimization; benchmark harness and docs gates passed. Full-work V13 publication evidence is next.

9 days ago

Published the full-work V13 tier-transition evidence in b32ddd5 (docs(bench): publish tier transition attribution): https://github.com/zig-utils/zig-js/commit/b32ddd5b

The schema-7 artifact contains 108 snapshots across all 36 workloads, names exact implementation f0546ee, and preserves 17 timing fields per phase. Across the final fresh-process snapshots it records 272 tier-up attempts: 54 successful publications and 218 rejected attempts. Successful tier-up work totals 6,678,959 ns. It also records 9,841,288 fully reconstructed deoptimizations totaling 209,630,978 ns, with a 46,583 ns maximum individual recovery. Every successful tier-up count matches the independent owner publication count and every timed deoptimization count matches the execution counter.

The frozen issue-461 metric panel is now empty in V13; remaining pending panels belong to #503 and #504. Docs manifest/build pass.

9 days ago

Shared-realm attribution landed on main in 80d9af1c.

V14 preserves the frozen scored matrix and expands only the opt-in sidecar: all 18 base/variant families, both additional-panel workloads, and every supported 1/2/4/8-lane shared row now emit configuration/warmup/invocation tier, runtime, timing, synchronization, worker, allocation, exact GC-pause, CPU, and resident-memory observations. Shared invocation snapshots occur after all real JavaScript Threads join; validation requires the frozen lane checksum, base/variant tier and environment parity, and exactly one worker run per lane.

The real quick collection passed 170 executions / 510 phase snapshots. The complete benchmark harness family, dependency audit, 99-file docs link check, and reproducible 49-page docs build pass. Quick values were not published as performance evidence. A clean full-work schema-8 artifact remains next; #501, #503, and quiet-reference overhead qualification remain open.

9 days ago

Long-run evidence durability landed on main in f9ebfdfc.

The representative sidecar is now schema 9. After each complete configuration/warmup/invocation group, it validates the entire ordered prefix and atomically replaces a complete: false checkpoint. Resume is accepted only with the exact matrix, quick/full mode, runner binary, host, OS, Zig, zig-js, zig-gc, zig-regex, and JavaScriptCore identities. Date and power remain explicit per collection segment. Only all 510 snapshots can transition to complete: true and produce Markdown.

This was required after the host wrapper reaped a multi-hour V14 run during the RegExp shared rows. No jobs, lanes, checksums, or workload boundaries were reduced. The full harness family, dependency audit, 99-file link check, and 49-page docs build pass. The full-work V14/schema-9 collection is being restarted from this clean revision.

9 days ago

Landed the V15 resident-accounting correction in ef688ad.

The first real resumable V14 full run reached the 4-lane shared RegExp variant and correctly failed the invariant peak_rss_bytes >= retained_rss_bytes: Darwin getrusage().ru_maxrss and Mach task_vm_info.resident_size were not a coherent pair under memory pressure. This is a telemetry defect, not a gate to relax.

V15 hash-inherits the complete V14 workload/mode/lane contract and changes only the process resident source. Peak and current resident bytes now come from one task_vm_info snapshot (resident_size_peak / resident_size); CPU remains cumulative getrusage user/system time. Attribution artifacts advance to schema 10 so older mixed-domain checkpoints cannot resume silently.

Validation passed: all 510 quick attribution snapshots, the benchmark comparison harness, 18/18 matrix structural checks, documentation build/manifest, link check, and dependency audit. I am now running the durable full-fidelity V15/schema-10 collection from this exact commit; its atomic row checkpoints will survive continuation boundaries.

9 days ago

The RegExp blocker discovered by the durable V15 collection is fixed on main.

Dependency zig-regex 0da6eb2 adds reusable absolute-offset Matcher.findFrom. Engine commit 549ff01f gives each interpreter its own matcher scratch for a shared compiled RegExp and releases every Match metadata allocation.

The prior full checkpoint localized the failure to representative_regexp_variant: the 2-lane row took 873 s, used 1,683 s of CPU, peaked at 5.30 GB RSS, retained 983 MB, and ended with 73.7 GB of Context backing-current requests; the 4-lane row never reached a durable checkpoint before the host terminated it.

Post-fix exact V15 row probes preserve the frozen checksums:

  • 4 lanes x 800 jobs: checksum 818,496,000, completes in about 40 s, 1.48 GB peak RSS, 76 MB retained RSS;
  • 8 lanes x 800 jobs: checksum 1,643,904,000, completes in about 193 s, 1.12 GB peak RSS, 123 MB retained RSS.

The maximum row still exposes 1,172,517 arena contentions and 47.69 billion spins, so this evidence is not being misreported as completion of the broader allocator/scaling work. It proves the per-call Thompson VM construction and Match-lifetime defect is removed without changing the workload matrix or weakening an invariant.

Validation: 1,503/1,503 unit tests with zero skips/failures/leaks; benchmark-comparison-test; focused RegExp/split coverage; zig-regex 49/49 dependency steps. The old incomplete Aug 4 checkpoint remains untracked and will not be published. I am restarting the complete V15/schema-10 collection from exact engine revision 549ff01 and dependency revision 0da6eb2.

#461 remains open for the completed 510-snapshot publication plus #501, #503, and quiet-reference overhead qualification.

9 days ago

Published the complete shared-realm V15/schema-10 evidence in 96220688:

The artifact is complete=true, quick=false, and contains all 170 executions / 510 configuration-warmup-invocation snapshots in one exact-identity collection segment. It names measured implementation 549ff01, zig-regex 0da6eb2, zig-gc c89a10f, Zig 0.17.0-dev.1441, macOS 27.0, the M3 Pro host, system JSC, and the captured battery/discharging power state.

All frozen checksums, base/variant tier signatures, environment-allocation parity, worker-run counts, process resident coherence, allocation accounting, and exact GC-pause histories passed. The shared RegExp family now completes every 1/2/4/8-lane base and variant row; the eight-lane variant records checksum 1,643,904,000, 740,010 invocation arena contentions, 634,269,177,000 ns of process CPU, and 1,018,609,664 bytes retained RSS.

This is causal/full-work attribution evidence, not quiet-reference timing evidence: the captured host was on battery and discharging, so no row is promoted as a stable regression claim.

Publication gates: 100-file docs link check and reproducible 49-page BunPress build. Flips 0 test262 cases.

This completes the pending V15 shared-mode publication. #461 remains open for #501 symbolized native attribution, #503 efficiency/thermal counters, and quiet-reference overhead qualification.

9 days ago

Advanced by c13d7f6f (feat(profiling): measure debugger publication overhead).

The versioned instrumentation-overhead artifact is now schema v5 with separate execution_attribution and native_observability exact-binary A/B profiles. It adds full-process wall time and, for native observability, exact tier/code parity, GDB JIT symbol and unwind storage, publisher lifecycle totals, and Mach current/peak RSS before and after Context teardown. Validation fails closed on checksum, tier, code, lifecycle, or teardown drift while retaining the existing counter availability, calibration, thermal, AC-power, and quiet-reference gates.

Both profiles passed real alternating two-pair diagnostic runs. The native run preserved checksum 5,864,992 and 16,384 optimizer code bytes in both states; enabled publisher storage was 1,335 symbol bytes plus 72 unwind bytes and retired completely. Because the quick run and noisy calibration cannot support a stable cost claim, no raw report was added under docs/.data and no negligible-overhead conclusion is asserted.

Validation: full zig build benchmark-comparison-test, direct schema/self-test fixtures, docs manifest/build, and 100-file link audit. Flips 0 test262 cases.

This advances the instrumentation-overhead acceptance item. The issue remains open for quiet-reference publication evidence, remaining workload attribution, and the other acceptance rows.

9 days ago

#528 exercised the exact-parent tooling as a two-commit causal chain: benchmark parent -> secure native index -> retained-capacity refinement. Seven order-balanced pairs on both direct edges rejected the initial 8-item control regression and verified the refinement removed it; deterministic phase snapshots attribute backing calls/bytes, growth/releases, retained high-water, and GC-cell work. Overview: exact-parent-locale-list-allocation-2026-08-10.md.

9 days ago

#553 adds another complete use of the exact-parent infrastructure: three frozen parser-only module sizes, seven alternating pairs each, exact workload/binary/dependency/checksum identities, allocation replay, Darwin instructions/cycles/energy/thermal availability, and explicit dispersion qualification. The summary and raw artifacts publish stable causal instruction/allocation reductions while leaving noisy wall rows diagnostic. This advances #461 evidence coverage but does not close its remaining broader acceptance items.

9 days ago

#554 exercised the exact-parent attribution gate with six parser rows and 84 retained fresh-process samples. 2de66881 publishes wall/CPU, allocations/bytes, RSS, instructions/cycles/energy availability, thermal/power state, exact checksums, and binary/source hashes. All six schema validations, benchmark-comparison-test, and docs-link-check pass; the battery/fair-thermal run is explicitly diagnostic.

9 days ago

#556 completed another exact-parent publication in https://github.com/zig-utils/zig-js/commit/ac9dc52b : six rows, 84 fresh-process samples, AC power, nominal thermal state, exact binary/source/dependency/checksum identities, wall/CPU/RSS plus instructions/cycles/energy availability and dispersion. All six schema validations and benchmark self-tests pass.

9 days ago

Related performance/security work #558 is complete: 3ec9847f makes nested JSON.stringify output linear in successful output construction, and 61652299 publishes exact-parent evidence. The depth-4,096 row uses 0.2341x retired instructions and 0.0311x median peak RSS, without changing the 66/66 Test262 result.

9 days ago

Exact-parent infrastructure published seven more attributed rows for #557 in 6dbe188f: 98 order-balanced fresh processes, no discards, exact power/thermal/identity/checksum metadata, and explicit diagnostic wall caveats. Stable instruction evidence isolates 2.94-4.40% reductions on substantive string-run rows.

9 days ago

Dependency #460 is now complete in 5a8afbe0.

V16 freezes the 18-family attribution target unchanged and hash-pins the completed #503 efficiency/thermal and #504 independent-suite panels. Continue #461 against this exact contract. #461 remains open: its stable-host/native-symbol acceptance still depends on the open #501 work and the remaining complete-attribution closeout.

9 days ago

Related attribution child #661 is implemented in b815b3e7. Exact-parent samples can now preserve a frozen context_lifecycle telemetry row containing separated Context phases, CPU, same-domain peak/current/post-destroy RSS, soak checkpoints, exact option/checksum identity, and all finalizer counters. V19 hash-pins the runner/profile and keeps the panel out of scored aggregates. This advances lifecycle attribution but does not close #461 native-symbol or complete-workload attribution acceptance.

9 days ago

Causal lifecycle attribution opened #662: a five-second current-main cold Context sample records 257 Shape transition leaf samples and 158 platform AES leaves reached by per-Shape secure entropy. The child will preserve keyed collision resistance with one realm secret and uniquely derived per-map keys, then validate through the versioned #661 lifecycle schema.

9 days ago

#662 exercised the exact-parent infrastructure on the quiet reference host and published the validated raw attribution artifact plus generated report. It retained all seven alternating pairs, exact revisions/binary/source hashes, checksums, CPU/RSS, stable instructions/cycles/energy, nominal thermals, and zero discarded samples.

9 days ago

Child #670 now owns a versioned exact algorithmic-growth evidence profile for classifier fixes whose optimized boundary falls below stable wall/cycle/energy resolution while the exact parent grows superlinearly. It explicitly preserves the existing full-efficiency 5% policy and forbids threshold relaxation, asymmetric work, extrapolation, or throughput claims from diagnostic rows. The concrete blocker and two rejected #615 reference attempts are recorded in #670 and the #615 audit.

9 days ago

#670 additive algorithmic-growth evidence contract landed in fabf6c7c. It gives #615/#616/#618/#619/#621 a fail-closed path for instruction/allocation growth evidence without weakening or relabeling the existing full-efficiency profile. The first #615 collection attempt was correctly rejected due unrelated active build jobs; no noisy artifact was published.

9 days ago

Direct logical-revision exact-parent collection is now supported by 053ac8ad. Schema v2 may use binaries built directly from the logical parent/candidate, with optional revision assertions required to match exactly; schema v3 still fails closed unless both identical one-commit measurement overlays validate. The exact-parent self-test passes direct, overlay, dirty-tree, pairing, allocation replay, and competing-job fixtures. Flips 0 Test262 cases.

9 days ago

Acceptance metadata reconciled against the checked-in evidence and CI history:

  • Checked complete workload attribution: 96220688 records all #460 workloads across 170 executions / 510 snapshots with tier, runtime, timing, synchronization, worker, allocation, GC, CPU, and resident-memory attribution.
  • Checked exact-parent migration, the noise-qualified regression policy, and exact identity coverage: 37dfdcc introduced the versioned schemas, lossless migrations, exact-parent comparison, >10% stable-regression / 5% RSD publication gate, and repository/toolchain/host/workload identities; later schema migrations preserve those contracts.
  • Checked CI-safe validation/docs/link/unit coverage: the benchmark validation harness is exercised in CI without running the long reference-host measurements.

Two criteria intentionally remain open:

  • #501 still does not provide symbolized attribution for every native backend.
  • The diagnostic instrumentation A/B explicitly leaves retained RSS unavailable, lock contention inapplicable, and compile-time support code size unmeasured; it also is not quiet-reference publication evidence. The existing wall/CPU/peak-RSS diagnostic is therefore not enough to check the full overhead-fixture criterion.

No engine or tooling change is claimed by this bookkeeping update; #461 remains open for those two concrete gaps.

9 days ago

The representative-matrix follow-up for #461 is now landed in e305bba0 — fix(bench): publish representative matrix v27 (#774).

V27 repins the exact-parent tool after schema-v2 direct-binary support, requires declared schema-v2 binary revisions to equal both logical revisions exactly, retains schema-v3 identical one-commit overlays, and refuses partial assertions. The full benchmark gate passes 58/58 matrix checks and 18/18 consolidated validators.

This completes the stale-matrix integration follow-up only; it does not claim the still-open every-native-backend symbol or full profiler-overhead acceptance items.

9 days ago

#772 completed with exact mixed-tier native attribution and exposed a gap in the generated exact-parent artifact path. The DateTimeFormat row preserved checksum and exact execution/Shape counts while removing 11,200 managed cells and backing allocations, but the optional replay hook rejected its intentional 84,001 tree-walker entries because that hook currently encodes a VM-only boundary.\n\n#775 now owns a versioned, fail-closed mixed-tier replay contract. It must compare complete declared execution signatures; it may not merely allow tree-walker entries or weaken admission checks.\n\nCompleted evidence: https://github.com/zig-utils/zig-js/commit/836ac5b648429bdbdf1d791a2c3280eea799617e

Sign in to comment on this issue.