-
Notifications
You must be signed in to change notification settings - Fork 375
feat: add native allocation accounting for memory observability #5934
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
Merged
andygrove
merged 8 commits into
apache:main
from
andygrove:feat-native-alloc-accounting
Sep 16, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
303875f
feat: add native allocation accounting for memory observability
andygrove 93d0770
bench: measure the alloc-accounting wrapper's per-allocation cost
andygrove ce9b13a
fix: settle the balance before delegating a free in AccountingAllocator
andygrove 2d78f87
fix: install the accounting wrapper for every allocator feature combi…
andygrove ca2f8c8
bench: link comet into alloc_overhead so the baseline uses the select…
andygrove ac51c5c
bench: check jemalloc liveness only when the library selected jemalloc
andygrove 4b71ad9
fix: teach analyze_trace about native_allocated and cover the account…
andygrove 5a4334a
fix: compare against observed zero reservations in analyze_trace and …
andygrove File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing in CI builds this feature.
pr_benchmark_check.yml:55runscargo clippy --all-targets --workspacewith default features, and no workflow passes--features. So the three backend arms, the wrapper, and the bench's jemalloc liveness check are compiled only on developer machines.The
mod backendpartition is nicely self-checking (zero matches gives an unresolvedbackend, two gives a duplicate module), but only for combinations someone actually compiles. Addingcargo check --features alloc-accountingplus onejemalloc,alloc-accountingcheck to an existing job would keep that property honest.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 4b71ad9. The
rust-testcomposite action now lintsdatafusion-cometwith--all-targets --features jemalloc,alloc-accounting(which covers the bench guards for the jemalloc case), runs thealloc_accountingtests with the wrapper installed over jemalloc, andcargo checks thealloc-accounting-only build for the system-allocator arm. That is the Linux Rust test job; the extra steps reuse its cache.