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
ARROW-3016: [Docs][C++] Memory profiling with perf #12307
Conversation
docs/source/cpp/memory.rst
Outdated
https://www.maartenbreddels.com/perf/jupyter/python/tracing/gil/2021/01/14/Tracing-the-Python-GIL.html | ||
https://jvns.ca/linux-tracing-zine.pdf | ||
https://jvns.ca/perf-zine.pdf | ||
https://www.brendangregg.com/blog/2015-06-28/linux-ftrace-uprobe.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe put these in a bulleted list? (I think these render as just a paragraph right now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm just dropping these since this isn't meant to be a perf tutorial.
docs/source/cpp/memory.rst
Outdated
-e probe_libarrow:je_arrow_dallocx \ | ||
./arrow-array-test --gtest_filter=StructArray* | ||
|
||
.. TODO: What are the equivalent probe calls for mimalloc and system allocator? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should all be in https://github.com/apache/arrow/blob/master/cpp/src/arrow/memory_pool.cc
0fbe29d
to
ecab113
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is pretty slick. Just two nits.
docs/source/cpp/memory.rst
Outdated
alias perf=/usr/lib/linux-tools/<version-path>/perf | ||
|
||
|
||
To track allocations, create probe points on each of the jemalloc methods used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jemalloc -> allocator?
Well the commands you provided earlier help me get unstuck on learning how to use perf probes, so thank you @lidavidm! 🙏 |
Benchmark runs are scheduled for baseline = 7d34a7c and contender = 5ab4112. 5ab4112 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Put together some scripts and an example for using perf to understand memory allocations in an Arrow C++ program. Closes apache#12307 from wjones127/ARROW-3016-memory-profile-docs Authored-by: Will Jones <willjones127@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Put together some scripts and an example for using perf to understand memory allocations in an Arrow C++ program.