Le 20/12/2013 17:07, Nicolas B. Pierron a écrit :
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 thought doing a "delete" could move the object shape to a hashmap?
IIRC a couple of months ago, the devtools team (Joe Walker specifically?) made some changes to the devtools code to change some "delete" to "= undefined" and that improved performance.

(I do not remember what is the limit, as it changed recently for the GameBoy benchmark)
The last number I remember is 128 (which sounded like a lot), but it may be outdated.

I think that what Julien is asking doesn't have to do only with the current heuristics. As you suggest, the heuristics can change over time and it's certainly a lot of work for non-SM devs to track what object has a Shape and which is a HashMap. It may be good to know what objects are HashMaps (regardless of this heuristics at first) to investigate whether it is caused by the source code or a change in SM heuristics for instance.

   + (you can see I did some Java in the past ;) )

I am sorry, we cannot do anything for you about that.
Mouahahahah :-)

   + 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".
I imagine function expression, generator expressions, RegExp literals, JSON.parse, etc. count too?
In any case, this is really a good info.

David
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to