This is a small library providing memory allocator wrappers to track memory usage.
- Measure allocation's high water mark per thread and globally. This can be reset to support processes with stages and identify highest allocation stages.
- Produce flame graphs for the number of allocations and bytes allocated per thread and globally.
- Support for multiple platforms with a pure Rust wrapper of global allocators.
LD_PRELOAD tools are linux only:
- bytehound tracks indivudal allocations with timestamp information, and contains a custom UI to visualize and query the data.
- heaptrack ligthweight alternative to valgrind's massif, has a GUI to visualize the data, roughly same functionality.
Interpreter based tools:
- valgrind (port: valgrind-macos),
much more advanced tooling, this tool is similar to massif. Limited to architectures the interpreter supports.
- dhat this rust library is also limited to the supported architectures of valgrind.
Allocators with metrics:
- talc custom allocator with metrics.
- tikv-jemallocator tikv-jemallco-sys tikv-jemalloc-ctl jemalloc specific, doesn't support flame graphs.
- trallocator
- alloc-track
- leaktracer
MacOS:
- Instruments doesn't do well with long traces.
CPU focused:
- measureme cpu / instruction count focused.
- coz throughput / latency focused.
- samply sampling flame graph integrated with https://profiler.firefox.com.
- pprof-rs sampling cpu profiler.
Other tools:
- tracy + rust_tracy_client, visualization tool, requires collectors.
Unwind libraries:
- mini-backtrace, wraps llvm-libunwind and allows to recover the instruction pointers. need additional work to retrieve the function names [needs to configure include paths to find headers]
- framehop library used by samply.
- unwind wrapper around gnu's libunwind [needs libunwind-generic dependency].
- libunwind-rs another wraper around gnu's libunwind.
- unwinding implements stack unwind, doesnt seem to be useful for inspection [compilation error, missing mod].
- vex-libunwind, lack safe api for get_proc_info [compilation errors with constants]