|
From: Philippe W. <phi...@sk...> - 2017-09-07 17:52:10
|
On Thu, 2017-09-07 at 09:03 +0200, Frederic DUMOULIN wrote: > Hi, > > I'm using valgrind + massif tool to observe the heap usage. > > I have an application binary using a shared library which does the > memory allocations. > There are few functions in the API but they are called many times. So > it's difficult to identify them in the visualizer only with the stack. > > Is there any way to add markers into the program which can be shown in > the visualizer ? Valgrind 3.13 has added a new way to visualise memory usage and/or memory leaks. Basically, memcheck/massif and helgrind can produce the memory usage (or leaks for memcheck) in a kcachegrind compatible file. The kcachegrind visualiser can then be used to visualise memory usage, and e.g. filter/select based on function names appearing in the stack trace. To produce such a report at the end of execution, you can give the option --xtree-memory=full You can also produce such files on demand during execution from a shell; by doing : vgdb xtmemory Philippe |