Performance of deallocation code paths - tree bitset#307
Draft
Performance of deallocation code paths - tree bitset#307
Conversation
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
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
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: