-
-
Notifications
You must be signed in to change notification settings - Fork 720
refactor(allocator): move allocation tracking code into own module #12937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(allocator): move allocation tracking code into own module #12937
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #12937 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
|
Thanks for swift review @camchenry. |
…12937) Follow-on after #12555. Pure refactor. Move code related to allocation tracking into its own module, and introduce an `AllocationStats` struct. This reduces noise in `allocator.rs` and `alloc.rs`, with less repetitions of `#[cfg(all(feature = "track_allocations", not(feature = "disable_track_allocations")))]` etc. Also bulk out the doc comments explaining the unsoundness, and how we must take care to avoid allocation tracking code being compiled in production code.
71ab71e to
ff1d93b
Compare
6e5f7b8 to
4f31b73
Compare
…xc-project#12937) Follow-on after oxc-project#12555. Pure refactor. Move code related to allocation tracking into its own module, and introduce an `AllocationStats` struct. This reduces noise in `allocator.rs` and `alloc.rs`, with less repetitions of `#[cfg(all(feature = "track_allocations", not(feature = "disable_track_allocations")))]` etc. Also bulk out the doc comments explaining the unsoundness, and how we must take care to avoid allocation tracking code being compiled in production code.
…ocationStats` (#13043) `AllocationStats` (introduced in #12555 and #12937) previously had to contain `AtomicUsize`s because `Allocator` was `Sync`. #13033 removed the `Sync` impl for `Allocator`, so now there's no need for synchronization in `AllocationStats`, and these fields can be `Cell<usize>` instead.

Follow-on after #12555. Pure refactor.
Move code related to allocation tracking into its own module, and introduce an
AllocationStatsstruct.This reduces noise in
allocator.rsandalloc.rs, with less repetitions of#[cfg(all(feature = "track_allocations", not(feature = "disable_track_allocations")))]etc.Also bulk out the doc comments explaining the unsoundness, and how we must take care to avoid allocation tracking code being compiled in production code.