Skip to content

Track Apache Arrow mimalloc allocations#943

Draft
pablogsal wants to merge 1 commit into
bloomberg:mainfrom
pablogsal:arrow_support
Draft

Track Apache Arrow mimalloc allocations#943
pablogsal wants to merge 1 commit into
bloomberg:mainfrom
pablogsal:arrow_support

Conversation

@pablogsal
Copy link
Copy Markdown
Collaborator

Hook the arrow_mi_malloc_aligned / arrow_mi_realloc_aligned / arrow_mi_free symbols proposed in apache/arrow#41128 so memray can attribute Arrow's logical allocations instead of seeing only the underlying mmap arenas.

Also re-resolves hook originals on module-cache invalidation so symbols defined in libraries loaded after tracker init (like libarrow.so) resolve before their GOT entries are patched.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 6.25000% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.26%. Comparing base (d9e063f) to head (f7d234a).

Files with missing lines Patch % Lines
src/memray/_memray/hooks.cpp 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #943      +/-   ##
==========================================
- Coverage   92.41%   92.26%   -0.16%     
==========================================
  Files          99       99              
  Lines       11787    11803      +16     
  Branches      430      430              
==========================================
- Hits        10893    10890       -3     
- Misses        894      913      +19     
Flag Coverage Δ
cpp 92.26% <6.25%> (-0.16%) ⬇️
python_and_cython 92.26% <6.25%> (-0.16%) ⬇️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +901 to +905
#ifdef MEMRAY_HAS_GHOST_STACK
if (d_fast_unwind) {
ghost_stack_dump_stats();
}
#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was a rebase mistake

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