Skip to content

hackaugusto/mem-track

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory tracker

This is a small library providing memory allocator wrappers to track memory usage.

Features

  • 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.

Other tools and notes

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:

MacOS:

CPU focused:

Other tools:

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]

About

Memory profiling library for Rust applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages