|
From: Konstantin T. <an...@ya...> - 2013-11-02 12:40:06
|
31.10.2013, 19:38, "Philippe Waroquiers" <phi...@sk...>: > 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. Thank you! -- Regards, Konstantin |