On Mon, Nov 6, 2017 at 1:53 AM, David Teller <dtel...@mozilla.com> wrote:

> I wanted to add something like that to about:performance, but at the
> time, my impression was that we did not have sufficient platform data on
> where allocations come from to provide something convincing.
>

​The SpiderMonkey Debugger API has hooks to capture the JS stack with some
probability for each JS object allocation:
https://developer.mozilla.org/en-US/docs/Tools/Debugger-API/Debugger.Memory#Allocation_Site_Tracking

The probability allows you to dial up or down the overhead vs amount of
data trade off.

The API was designed in such a way that it doesn't disable ion compilation
when enabled. It's not somethign we' want on all the time for everyone, but
should have low enough overhead that we could turn it on in something like
about:performance.

Would be great to expand that API to observe JS string allocations as
well.​​ C++ allocations could be useful too, but there are a lot more open
questions there.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to