[webkit-dev] WebKit memory instrumentation

Konstantin Tokarev annulen at yandex.ru
Tue Jul 24 12:40:15 PDT 2012

24.07.2012, 22:30, "Allan Sandfeld Jensen" <kde at carewolf.com>:
> Hi
> This is very interesting. I have been trying to debug memory-comsumption
> lately as well, though I have used different methods:
> I guess this API is to make the data available in web-inspector right?
> I have gathered similar data using valgrind's massif which can tell you which
> objects have been allocated, when and where and how much memory they use, but
> massif is very slow and can require some perl-processing afterwards to get
> good data out off.

I'm using massif-visualizer - it's quite enough to extract all interesting data.

> Lately though, I have been using a different system. like many undocumented
> secrets in WebKit, there are a series of memory statistics functions for the
> various memory subsystems. Take a look at
> Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm for some examples of what it
> can tell you.
> It doesn't tell you how large the elements of the render-tree are, but the
> render-tree is not that that significant anymore, but it tells you how much is
> allocated for JavaScript heap, stack or pre-compiled code separetely, and how
> much is used by various caches, and how much can be garbage-collected if you
> have a memory pressure handler to trigger it. This has been very useful to me
> at least.
> I can see how this new system is more powerful, but I can not help to feel it
> is somehow doing the wrong thing at the wrong place.
> Best Regards
> `Allan Sandfeld
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev


More information about the webkit-dev mailing list