PoC for reducing resolution of data to make it feasible to analyse long application runs #53
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.
The existing
strip
option helps to reduce size of data so that it can be analyzed on machines without terabytes of RAM. This is done by removing all allocations that didn't exist at the end of test. Unfortunately this loses information that may be necessary to decide which of the visible allocations may be a leak as the trend of allocation is unknown (all visible allocations will be seemingly monotonically increasing).For that, instead in this PR
squeeze-resolution
option is introduced that reduces number of samples to smaller value (e.g. 100 from 100000000), combining multiple allocations so that "plots" of allocations look as original - but with reduced resolution, similarly to reducing 8k image into 128x128 one. The loss of detail is usually unimportant when analyzing memory allocation trend - as what matters is if memory remains at stable levels or is constantly growing, a question which plot of smaller resolution can answer.The PR is behind
master
, but it doesn't matter as by no means I think the code provided in PR could be merged upstream as it's most likely even occasionally incorrect, i.e. calculated values may be a bit off. Though this doesn't necessarily matter when finding memory leak and this PoC may be good enough for most people wanting to analyze.dat
files of huge size (e.g. 40GiB).