Conversation
Configure jemalloc with --enable-prof-libunwind to use libunwind for heap profiling backtraces. This avoids a known livelock in gcc's _Unwind_Backtrace in multi-threaded programs (jemalloc/jemalloc#2282). The feature implies profiling since jemalloc requires --enable-prof alongside --enable-prof-libunwind. On Linux, the build emits cargo:rustc-link-lib=unwind. On Apple platforms no extra link is needed since unwind symbols are part of libSystem. Closes tikv#146 Signed-off-by: Andre da Silva <andre.dasilva@linera.io>
|
Welcome @ndr-ds! It looks like this is your first PR to tikv/jemallocator 🎉 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Cool, but this requires libunwind installed on system, right? I remember rust itself also use libunwind, is it possible to reuse the package? |
|
Rust uses |
Configure jemalloc with
--enable-prof-libunwindto use libunwind for heap profilingbacktraces. This avoids a known livelock in gcc's
_Unwind_Backtracein multi-threadedprograms (jemalloc/jemalloc#2282).
The feature implies
profilingsince jemalloc requires--enable-profalongside--enable-prof-libunwind. On Linux, the build emitscargo:rustc-link-lib=unwindtolink against libunwind. On Apple platforms no extra link is needed since unwind symbols
are part of libSystem.
As invited by @BusyJay in
#146 (comment).
Closes #146
Summary by CodeRabbit
profiling_libunwindfeature flag to enable libunwind-based backtracing for heap profiling, addressing a known livelock issue in multi-threaded environments. Requireslibunwind-devorlibunwind-develon Linux systems.