On 12/20/2013 06:24 AM, Julien Wajsberg wrote:
So here is my wishlist (please cope with any inacuraccies I could make): * have diagnostics about what happens within the JS engine: + when and why objects are handled as Hashmap instead of Structs (why === which JS code is producing this)
If you are talking about objects, this is only function of the number of properties on the object. (I do not remember what is the limit, as it changed recently for the GameBoy benchmark)
+ when and why functions are deoptimized
Currently the why is a difficult question, and involve some work to instrument the code. We had such a system for developing IonMonkey, but the problem is that we might not be able to be precise on the failure location as we might do optimizations which are unable to keep tracks of the original locations of operations.
* have diagnostics about what happens in the memory and other GC-related stuff + know when a GC happens (see below for the Profiler) + have a tool that shows the memory consumption over time (à la jconsole, cf [1], or visualvm [2]) + have a tool that shows the various memory generations in a runtime way (à la visualGC [3])
For information, we are already collecting similar statistics at the end of GC cycles. This is just a matter of collecting it in a way which can be exposed to dev-tools.
+ (you can see I did some Java in the past ;) )
I am sorry, we cannot do anything for you about that.
+ best of the best: show the JS locations where the most object creations and deletions happen
Jim Blandly is currently working on such instrumentation, AFAIK. Some partners already mention their interest in doing so.
* Have a web developer-friendly profiler + show the main events happening while a webpage is rendering: css refresh styles, reflow, repaint + ideally we should also see _why_ these events are happening, tracing back to a JS line
I thought that the Gecko Profiler Addon provided such annotation?
+ show when a GC happens, show also why this happens if possible and if it makes sense
A GC happens because we have reached a limit of allocation or because we have receive a srinking GC notification from the system. So I guess you want to see what might cause a GC to be triggered? In which case I can easily answer everything which has a "[", a "{" or a "new".
-- Nicolas B. Pierron _______________________________________________ dev-tech-js-engine-internals mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

