|
From: Frederic D. <fre...@mi...> - 2017-09-07 07:31:24
|
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 ? Thanks, Fred |
|
From: Milian W. <ma...@mi...> - 2017-09-07 12:29:15
|
On Thursday, September 7, 2017 9:03:55 AM CEST 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 ? If by visualizer you mean the massif_visualizer, then no - that is not supported. What you can do (afaik) is use vgdb to trigger snapshots of massif files. Bye -- Milian Wolff ma...@mi... http://milianw.de |
|
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 |
|
From: Frederic D. <fre...@mi...> - 2017-09-14 11:52:43
|
Hi, Thanks for your answers. Fred <www.mipsology.com> On 07/09/2017 19:53, Philippe Waroquiers wrote: > 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 > > > |