-
Notifications
You must be signed in to change notification settings - Fork 9
Performance of deallocation code paths - tree bitset #307
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
Draft
r1viollet
wants to merge
16
commits into
main
Choose a base branch
from
r1viollet/perf_dealloc_tree_bitset
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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 a bitset to track the addresses that are kept for heap profiling.
Fix the missing TLS storage initializations
- Removal of the lock - Minor fixes around the allocation code paths
Adjust the usage of the address bitset.
- Adjust the hashing logic
Remove the dependency between bitset and sampling period. Simplify the hashing logic.
Re-test the collision rate of the hash we use.
Improve the bitset set and unset flow to have a single atomic operation.
- Enforce power of two on size of bitset - Change the log_once api to take into account the place where it is called from - Naming updates
Improve the unit test for the LOG_ONCE API
While refactoring I introduced a regression on how indexes were computed
Rename local variable to avoid conflict with function name.
Ensure an allocation sample is pushed even if we encounter a collision in the bitset.
Implement a tree like bitset This ensures we account for all possible addresses without collisions
6c86d29 to
8b6bf27
Compare
- Fix the logic - Ensure we have a bounded number of mid level elements
8b6bf27 to
0dc37a2
Compare
a52c80c to
aa4e705
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Implement a radix tree strategy using bitsets
Motivation
Ensure we are accurate in the way we account for addresses.
Check @richardstartin 's idea
Results
Performance numbers look great.
With the reader thread, some samples are costing CPU
Without the reader thread: