JIT Inspector and more

A quick Google search turned up nothing on planet, so I guess a lot of people haven’t seen Brian Hackett’s awesome experimental add-on JIT Inspector.

Prototype tool to track metrics for amount and optimization quality of JIT code executed.

Which basically means you can spot hot code points in JavaScript, which are often run or for some reason couldn’t be optimized by SpiderMonkey in a well enough fashion. You can also look at different metrics, which could possibly tell you how good SpiderMonkey (in particular Type Inference) “understands” this line of code.

For the moment this tool is mostly useful when you have a deeper understanding of the SpiderMonkey internals, but this could definitely become a very handy tool for web developers etc.

I already used this in a few cases and it really easy to spot problems, without having to start any kind of normal profiler like Shark.

Along these line Hannes Verschore has been working on some graphing tool for IonMonkey, which shows the time spent in different “modules” of the engine, like Garbage Collection, JIT Compilation or regular expression execution. To run this tool you need to compile IonMonkey, so for now you are better of looking at the pretty graphs.

Tags: mozilla