Ticket #466 (closed task: wontfix)
Add SpiderMonkey JIT stats to profiler
| Reported by: | Philip | Owned by: | |
|---|---|---|---|
| Priority: | Nice to Have | Milestone: | |
| Component: | Core engine | Keywords: | simple |
| Cc: |
Description
Currently we don't enable SpiderMonkey's JIT (because it adds complexity and hasn't yet been necessary), but at some point we might do so, in which case this will become more useful:
jstracer.cpp currently provides InitJITStatsClass which sets up a stats object (see also shell/js.cpp which calls it) if there's appropriate build flags (maybe just DEBUG), and records various data about how the JIT is working (see jitstats.tbl).
It might be useful to make that data accessible in the game, so we can see if anything causes the JIT to stop working properly. This should probably be implemented as part of the in-game profiler - see ps/ProfileViewer.h, and also see CRendererStatsTable in renderer/Renderer.cpp as an example of how to return data to be displayed.
We have multiple SpiderMonkey runtimes, and it looks like there's only a single global copy of the JIT stats, so that's probably not ideal but it might work okay anyway.

Milestone Unclassified deleted