You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Applications need a build-time allocator choice without changing allocation call sites or losing diagnostics. This adds a pure Rust mimalloc option alongside snmalloc.
rallocator!() keeps snmalloc as the default. Use rallocator!(backend = mimalloc) to select mimalloc or rallocator!(backend = snmalloc) to select snmalloc explicitly. Both backends use the common Rallocator facade. This change does not add runtime switching.
The snmalloc implementation moves into its own backend. The mimalloc port preserves native allocation classes, page ownership, remote frees, abandoned-page handling, arena management, and memory policy. Production code does not link the native mimalloc library.
Rallocator records allocation, resize, and free events. A successful resize records both storage addresses before the old block becomes reusable. Backend-specific state views and saved stack symbols make captures useful after the producer exits. The change preserves upstream's demand-driven runtime diagnostics and recording-independent allocator observations.
The CLI keeps live monitor and offline view. This removes the obsolete snapshot html command, its renderer and assets, and export-only test support.
BREAKING CHANGE: Rallocator is now backend-parameterized. Install it through the macro. Direct construction is hidden and unsafe. Readers accept only snapshot format 10, allocator schema 5, runtime schema 9, and monitor protocol 9. Previous formats are rejected. The public event and allocator codec enums also gain variants. The CLI removes snapshot html and its HTML-only test-util feature. Version changes happen at release time.
All fast-tier check groups passed, including final individual reruns. Workspace Clippy, documentation, formatting, generated READMEs, spelling, and external-type checks passed. The complete generated Windows coverage gate passed with all features and without default features. Every package met its existing threshold.
Tests and documentation examples passed for the six allocator and diagnostics packages on Windows x64 and Linux x64. Rust 1.95 tests and Linux cargo-careful checks also passed for those packages. Miri passed for the recorder, allocator schema, protocol, and selected portable allocator checks.
The initial mutation run found nine surviving changes. Consumer regressions and focused reruns closed eight. One redundant branch was removed.
The complete workspace anvil-pr tier was not run. CI must still cover macOS and ARM.
🤖 Preserve the complete allocator and telemetry implementation before rebasing. Add compile-time backend selection, backend-specific snapshots, captured stack symbols, and first-class resize events. Accept only current snapshot and monitor formats.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Update allocator and viewer tests for the current recorder API and schema identifiers. Clear retained buffers before testing disabled runtime instrumentation. Regenerate crate documentation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Construct the benchmark handle explicitly while keeping Criterion on the system allocator. Borrow the channel used by the state-test worker.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Document the Linux Miri check for cached TLS. The corresponding Windows path uses native assembly and remains covered by native tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Preserve one orphan allocation lifetime across consecutive moves when the capture contains no original allocation event. Exercise the monitor preparation boundary with address-based correlation keys.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Check orphan labels on the correct resize row and verify final-size allocation-to-free totals. Remove a redundant resize category from the traffic-only iterator; operation rows still retain every resize.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Check resize operation labels and distinguish known allocation origins from orphan resizes at the complete monitor preparation boundary.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Verify original allocation and final free labels beside the resize label. The focused monitor-row mutation run covers these assertions.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Remove the duplicate null guard from the common event builder. Rallocator already rejects failed requests before recording.
Cover failed normal and zeroed requests through both public backend selections. Keep the failed-resize case within GlobalAlloc's valid-size contract.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Use Event::allocation directly when checking that failed allocation requests produce no records.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The changes can abort on macOS through allocator-lock reentry and fabricate source locations by merging filename, line, and column from different lookups.
This PR adds build-time selection between Rust snmalloc and mimalloc backends while keeping snmalloc as the default. It extends Seismograph diagnostics and viewers to preserve resize history, backend-specific state, and saved stack symbols.
Changes:
Introduces backend selectors and separates snmalloc from the shared allocator interface.
Adds resize events, backend-aware snapshots, saved symbols, and strict format-version handling.
Updates terminal and HTML views, regression tests, documentation, and macOS checks.
File
Description
docs/runtime-analysis.md
Documents backend coverage and portable Miri tests.
crates/seismograph/tests/snapshot_symbols.rs
Tests saved symbols without registered sources.
crates/seismograph/tests/reallocation.rs
Tests resize recording, validation, and sampling.
crates/seismograph/src/recorder/event.rs
Adds resize event kinds, payloads, and accessors.
crates/seismograph/src/recorder/alloc.rs
Defines resize fields and correlation semantics.
crates/seismograph/src/recorder.rs
Adds platform-specific symbol lookup adjustment.
crates/seismograph/src/monitor.rs
Preserves cache policy in monitor configuration.
crates/seismograph/src/lib.rs
Documents saved stack symbols.
crates/seismograph/README.md
Regenerates symbol-capture documentation.
crates/seismograph/Cargo.toml
Adds native symbol-resolution dependency.
crates/seismograph_runtime/tests/on_demand.rs
Clears buffers before disabled-recording assertions.
🤖 Share the existing inline Darwin mutex between allocator backends. The standard library allocates pthread mutex storage on first lock, which reenters mimalloc during arena creation.
Preserve lock poisoning and leave allocation geometry and memory policy unchanged. Existing whole-process mimalloc tests cover the startup path.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Several rendering and decoding tests violate repository policy by relying on filesystem access, subprocesses, or loader threads, while documentation also misstates publication behavior and the supported dependency version.
This requirement selects the 0.3 release line and excludes the 0.4.0 package declared in crates/rallocator/Cargo.toml:6. Readers copying the dependency and the new backend-selection example are therefore directed to an older release line. Match the dependency example to this crate's version and regenerate the README from these doc comments.
Correct publication-policy documentation and regenerate the README
crates/seismograph_cli/src/main.rs:40
Sampled-out operations can publish state: crates/rallocator/src/allocator.rs:71,81,105 calls publish_state() without checking event acceptance, and both backend publishers check whether allocation recording is enabled. Describe publication as controlled by the allocation policy, not event acceptance, so users can correctly interpret fresh observations with no retained event. Correct the same claim in crates/seismograph_cli/src/native_view.rs:20–21, then regenerate the crate README.
Remove filesystem and CLI dependencies from rendering tests
These rendering tests write input fixtures and spawn the CLI through support::render_capture or support::render_html (tests/support/mod.rs:16–39), contrary to the repository test policy. Run the capture bytes through a shared in-process decode/render entry point and keep the existing HTML assertions. Apply the same change to crates/seismograph_cli/tests/snapshot_symbols.rs:44–55, which performs these operations directly.
🤖 A 128-TiB reservation can succeed on ARM hosts with wider address spaces. Use a valid 4-EiB request to test allocation failure and recovery without changing native allocation limits.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 Keep source filenames and coordinates from a single lookup so overrides cannot fabricate locations.
Use controlled events and scripted symbol resolution in snapshot tests. Extract the existing CLI into a library-backed executable, gate in-memory rendering utilities behind test-util, and feed the offline decoder through a reader.
Preserve the HTML assertions without temporary input files, subprocesses, or compiler-generated marker frames.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The warnings and test assertion incorrectly tie state publication to retained events, and the dependency example selects 0.3.x rather than the documented package’s 0.4.0 release.
🤖 Remove the usize::MAX resize call from the shared GlobalAlloc tests because its rounded size violates the trait's unsafe preconditions. Keep the valid 4-EiB failure request and verify that the original allocation stays live.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The documentation uses an outdated dependency version and incorrectly ties owner publication to retained events, requiring updates to the examples, generated README, and matching test assertion.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.9%. Comparing base (ff31146) to head (bb6a425). ⚠️ Report is 11 commits behind head on main.
❌ Your project check has failed because the head coverage (99.9%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage.
🤖 The Hello-write fixture now uses mocked process identity instead of native Windows security calls.
A socket-free handshake failure case rejects fabricated success without waiting for a test server.
Miri and mutation thresholds remain unchanged.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The allocator’s unsafe metadata lookup, cross-thread frees, and page reclamation require specialist review and platform CI results, with native runtime validation not performed in this review.
🤖 The truncation regression previously waited forever when the client skipped its connection.
The fixture now uses mocked I/O and detects client completion before accept.
The Hello request and truncated-response checks remain intact.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because both collectors advance a shared snapshot counter, potentially causing the second backend’s active owners to be misclassified as belonging to the previous round.
🤖 The reconciliation test now uses mocked I/O and detects a client that returns without the second handshake.
This prevents the handshake mutation from leaving its server blocked in native accept.
The stop request, source failure and authoritative recording assertions remain intact.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The unsafe allocator’s cross-thread ownership and metadata-reclamation invariants require specialist soundness review and the pending macOS/ARM CI results.
Preserve selectable backends, resize events, producer symbols and current-only snapshot formats. Move upstream regressions to their current owners and preserve the removal of HTML export.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unsafe page metadata, cross-thread reclamation, and thread teardown require specialist review beyond the supplied hunks, with macOS and ARM validation still pending.
Disable incremental test caches while preserving full debug symbols. Coverage builds each feature configuration in a fresh directory, so those caches only increase retained disk usage.
Construct checked NonNull pointers in the two allocator fixtures flagged by CodeQL, preserving their existing panic-on-null behavior without dismissing or suppressing the alerts.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because shared round advancement across allocator backends can incorrectly classify current publications as previous-round data depending on collection order.
Disabling test caches did not resolve hosted Windows disk exhaustion. Full collection retained much larger per-process coverage profiles and debug symbols, so avoid slowing developer test builds for an insufficient mitigation.
Keep the checked NonNull fixture construction, which passed CodeQL without alert dismissals or suppressions.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because per-source advancement of the shared counter can misclassify publications from the latest request as previous-round data during combined backend captures.
No open issues 🎉
Review effort: Balanced
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
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.
🤖 Applications need a build-time allocator choice without changing allocation call sites or losing diagnostics. This adds a pure Rust mimalloc option alongside snmalloc.
rallocator!()keeps snmalloc as the default. Userallocator!(backend = mimalloc)to select mimalloc orrallocator!(backend = snmalloc)to select snmalloc explicitly. Both backends use the commonRallocatorfacade. This change does not add runtime switching.The snmalloc implementation moves into its own backend. The mimalloc port preserves native allocation classes, page ownership, remote frees, abandoned-page handling, arena management, and memory policy. Production code does not link the native mimalloc library.
Rallocatorrecords allocation, resize, and free events. A successful resize records both storage addresses before the old block becomes reusable. Backend-specific state views and saved stack symbols make captures useful after the producer exits. The change preserves upstream's demand-driven runtime diagnostics and recording-independent allocator observations.The CLI keeps live
monitorand offlineview. This removes the obsoletesnapshot htmlcommand, its renderer and assets, and export-only test support.BREAKING CHANGE:
Rallocatoris now backend-parameterized. Install it through the macro. Direct construction is hidden and unsafe. Readers accept only snapshot format 10, allocator schema 5, runtime schema 9, and monitor protocol 9. Previous formats are rejected. The public event and allocator codec enums also gain variants. The CLI removessnapshot htmland its HTML-onlytest-utilfeature. Version changes happen at release time.All fast-tier check groups passed, including final individual reruns. Workspace Clippy, documentation, formatting, generated READMEs, spelling, and external-type checks passed. The complete generated Windows coverage gate passed with all features and without default features. Every package met its existing threshold.
Tests and documentation examples passed for the six allocator and diagnostics packages on Windows x64 and Linux x64. Rust 1.95 tests and Linux cargo-careful checks also passed for those packages. Miri passed for the recorder, allocator schema, protocol, and selected portable allocator checks.
The initial mutation run found nine surviving changes. Consumer regressions and focused reruns closed eight. One redundant branch was removed.
The complete workspace
anvil-prtier was not run. CI must still cover macOS and ARM.