The GTK+ port enables (build-time) the MEMORY_SAMPLE feature by default. Let's do this also for WPE. With this feature enabled, you can then set the environment variable WEBKIT_SAMPLE_MEMORY=1 and each second you will get detailed memory stats of the WebKit internals printed on a file with the name of the process in /tmp If the environment variable is not set, then this does nothing.
Created attachment 319361 [details] Patch
Comment on attachment 319361 [details] Patch I think you want it to be PRIVATE as nobody would ever want to do a release build with it enabled.
(In reply to Michael Catanzaro from comment #2) > Comment on attachment 319361 [details] > Patch > > I think you want it to be PRIVATE as nobody would ever want to do a release > build with it enabled. do you mean "that nobody will want to disable this" ? On the GTK+ port is also set like this (PUBLIC) and this is getting enabled on all the GTK+ release builds by default. I want this enabled at build time on all release builds. Its just disabled by default at runtime. Its really useful when you need to answer questions like "why WebKit is using more memory than expected on this webpage? is because some JS leak or something else?." The file it generates is easily parsed with a script to produce nice charts.
OK let me flip the question around: why would you want to *dis*able it, then? I think it should be PRIVATE for GTK+ too.
(In reply to Michael Catanzaro from comment #4) > OK let me flip the question around: why would you want to *dis*able it, > then? I think it should be PRIVATE for GTK+ too. OK.. I will switch it to private (and set the GTK+ one to private also)
Committed r221372: <http://trac.webkit.org/changeset/221372>