Skip to content
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

Disable leaks warning if tracing Python allocators #492

Conversation

godlygeek
Copy link
Contributor

We warn when generating a leaks report when pymalloc is in use, because
the memory held by pymalloc would appear to us as a leak when it has
actually just been set aside for future use.

But, when --trace-python-allocators is used, we do have visibility
into whether the memory has set aside for future use, and so we don't
need to show this warning in that case.

Capture this in the capture file header, and thread it through to the
metadata included in generated reports.

Signed-off-by: Matt Wozniski <[email protected]>
We warn when generating a leaks report when pymalloc is in use, because
the memory held by pymalloc would appear to us as a leak when it has
actually just been set aside for future use.

But, when `--trace-python-allocators` is used, we do have visibility
into whether the memory has set aside for future use, and so we don't
need to show this warning in that case.

Signed-off-by: Matt Wozniski <[email protected]>
@godlygeek godlygeek force-pushed the hide_leaks_warning_if_trace_python_allocators branch from c910b99 to 8fc1e5c Compare November 3, 2023 22:03
@codecov-commenter
Copy link

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (f33d028) 92.28% compared to head (8fc1e5c) 92.18%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #492      +/-   ##
==========================================
- Coverage   92.28%   92.18%   -0.11%     
==========================================
  Files          91       91              
  Lines       10849    10872      +23     
  Branches     1498     1499       +1     
==========================================
+ Hits        10012    10022      +10     
- Misses        835      847      +12     
- Partials        2        3       +1     
Flag Coverage Δ
cpp 85.74% <76.47%> (-0.33%) ⬇️
python_and_cython 95.45% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/memray/_memray/record_reader.cpp 77.03% <100.00%> (-1.00%) ⬇️
src/memray/_memray/record_writer.h 95.65% <ø> (ø)
src/memray/_memray/records.h 100.00% <ø> (ø)
src/memray/_metadata.py 100.00% <100.00%> (ø)
tests/integration/test_main.py 92.61% <100.00%> (+0.18%) ⬆️
tests/unit/test_stats_reporter.py 100.00% <ø> (ø)
src/memray/_memray/record_writer.cpp 85.46% <71.42%> (-0.41%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@godlygeek godlygeek merged commit aa3470a into bloomberg:main Nov 6, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants