FooBarWidget/heap_dumper_visualizer

eBPF, /proc/PID/mem, CRIU, and gdb/gcore for generic heap dumps?

chadbrewbaker opened this issue · 1 comments

Any interest in expanding to generic linux process heap dumps?

https://github.com/iovisor/bcc/blob/master/tools/profile.py is the most popular eBPF script for logging stack traces.

I was hoping of creating a tool that similarly did /proc/PID/mem snapshots to visualize the heaps of arbitrary processes.

I know there is https://criu.org/Main_Page - like IBM/Intel MPI checkpoint it can write an entire cgroup stack and memory to file. This would certainly work. Might also have to log all the malloc() and free() calls.

GDB and gcore can also do it https://serverfault.com/questions/173999/dump-a-linux-processs-memory-to-file.

https://github.com/facebookexperimental/rbperf does the eBPF but doesn't seem to support more than logging libc memory calls - no heap visualization.

This project is mostly meant for research, not for serious usage. Building a more production-ready tool is out of scope of this project. Furthermore, I don't really have time right now for an effort to build a more production-ready tool.

Your references are very interesting however, so thank you for that!