|
From: Philippe W. <phi...@sk...> - 2013-10-31 15:38:22
|
On Thu, 2013-10-31 at 14:06 +0400, Konstantin Tokarev wrote: > Hi all, > > I'm trying to use massif to analyze memory usage of WebKit. I build it without embedded tcmalloc, so > "normal" heap allocations are traced by massif. However, its JavaScript engine still uses separate > mmap-based heap. How can I trace allocations made in this heap with massif? API is not malloc-like, > so I guess I need to write some code to get this functions replaced in Valgrind. > > P.S. I've tried --pages-as-heap=yes to trace mmap directly, but results were completely garbage. > massif supports the client requests VALGRIND_MALLOCLIKE_BLOCK, VALGRIND_RESIZEINPLACE_BLOCK and VALGRIND_FREELIKE_BLOCK. Inserting calls to these inside the JavaScript engine where it allocates, re-allocates and frees blocks should allow to describe memory usage by the JavaScript engine. Pḧilippe |