On Tue, Dec 17, 2013 at 2:55 PM, David Rajchenbach-Teller <dtel...@mozilla.com> wrote: > > Is it possible to write memory reporters for JS-implemented code?
It's possible. Some points about this... - Memory used by the JS engine already has good coverage in the "explicit" tree. - It's hard to measure the sizes of things in JS code. And there are lots of JS things (e.g. shapes) that aren't even visible from JS code. It might be interesting to measure counts of some things, though. - https://bugzilla.mozilla.org/show_bug.cgi?id=932156 is an idea to mark particular JS objects as special, and thus get identified specially in about:memory. IMO this is the most promising direction for improving reporting of JS code. - The DownloadThemAll! add-on implements some JS-side reporters. I'm not sure exactly what is measured, though. But in general, memory reporters are more relevant for C++ code. > Also, is it possible to write memory reporters for Chrome Worker code? That's also JS code, right? JS runtimes for workers get measured the same way that the main JS runtime does. So I don't think Chrome worker code needs any treatment different to other kinds of JS code. Nick _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform