Current Store and collection attribution
Accepted results: current profiling report and corrected v2 evidence. The first checkpoint is retained as rejected because its post-timing collector held a global mutable borrow across allocator reentry. The current collector copies fixed state into locals before allocating, and all six artifacts were rebuilt and 144 samples rerun after independent review.
This compact diagnostic starts from commit acbb2d7, the implementation measured
by the complete 2026-10-16-234007 suite. It copies the complete relevant SDK,
Store, Collections, platform, macro and fixture source closure from Git. It has
no path dependency on the live production crates. baseline-manifest.json
identifies the 190 copied baseline files; instrumentation only adds spans,
collectors and a diagnostic endpoint. Source copies are deliberately an experiment,
not a second supported implementation.
The selected operations are NodeStore insertion at 10k and removal at 100k in both placements, and stable Deque append and 32 distributed indexed reads at 10k and 100k. Empty read/write scopes are diagnostic controls. There are six artifacts, three PocketIC workers, three deterministic repetitions and 144 samples, not a full collection benchmark. See runner/README.md for exact population, snapshot and independent correctness checks.
The ordinary api_measure endpoint is retained. The additional profile_measure
endpoint performs the same application operation, prepares fixed collector buffers
before the body timer, and serializes diagnostics after the timer. Its __empty
operation enters a real root scope and skips the application service. Compare
ordinary, prepared-control and instrumented intervals separately. The accepted
full benchmark remains the production performance baseline: extra exports and
static diagnostic buffers mean even an uninstrumented experimental artifact is
not byte-identical to the accepted Wasm.
Nested spans produce separate whole-body and operation-only ledgers. Inclusive
values overlap; exclusive values remove immediate children once. The operation
exclusive sum must exactly equal the Operation inclusive interval, while the
body exclusive sum must equal EndpointBody inclusive. Overflow, unclosed spans
or truncated memory events invalidate the diagnostic. Span/event buffers are
fixed, explicitly prewarmed and present in both controls and instrumented builds.
Result strings and vectors allocate only after timing and capture end.
The enabled artifact combines phase and ordered backend tracing to keep the run small. Its phase shares are gross instrumented shares, including observer costs and code-generation/layout effects. They are not percentages of the ordinary uninstrumented interval. Paired controls expose the disturbance; a universal per-span subtraction would not recover exact original costs.
Trace events report logical offsets and actual Wasm addresses separately. A retained lend encloses its callback: first loads may be charged to nested decode spans. Stable source offsets and heap scratch addresses occupy different address spaces. Unique 4 KiB pages and 64 KiB regions in these observed ranges describe footprint, not automatically chargeable first accesses. SDK execution, stack, allocator and scratch accesses can precede or fall outside a backend event. Growth records are capacity changes and must be excluded from read/write unions.
The current IC source uses 4 KiB host pages, region mapping and explicit access / write charging. Stable-read paths depend on whether all requested source pages are still unaccessed: the buffered first-read path can avoid mapping the source, while a partially accessed request can enter the native copy path. Thus a later stable read can acquire a mapping charge even when some bytes were read earlier. The exact PocketIC 16 binary has prior controlled evidence in the region probe. Source-model claims and measured costs should remain distinct; the exact upstream source revision of that PocketIC binary is not established here.
Build and execution are owned by the shared measurement agent. The build script
uses the existing bench/target, records a frozen source manifest, checks it again
after compilation, and preserves final artifact hashes and compiler dep-info:
bash research/experiments/2026-10-17-profile/tools/build.sh /absolute/evidence/path
No production code or collection algorithm is changed by this diagnostic. Results are to guide shared-layer candidates, including root admission, metadata locality, allocation/free admission, and the distinction between tree repair CPU and backend page costs. The paired results and provenance have been independently reviewed; candidate performance gains still require their own ordinary benchmark measurements.