How to detect TraceMonkey?

435 views Asked by At

Is it possible to detect that a Firefox browser is running the TraceMonkey JavaScript interpreter? If so, is it possible to do it with JavaScript? A solution which involves examining the browser binary or shared libraries is also OK for me. I'm running Linux with Firefox 3.0.14 right now.

2

There are 2 answers

2
Peter On BEST ANSWER
  1. enter "about:config" as URL
  2. say you will be careful
  3. search "JIT"

you can check if it's enabled by looking at:

javascript.options.jit.chrome -> for browser UI and plugins

javascript.options.jit.content -> for web content

(you can also change the values)

btw. if your code is a little complex don't expect to get a speed comparable to V8. Tracemonkey fails with branchy code (it may be slower than spidermonkey).

More info: http://hacks.mozilla.org/2009/07/tracemonkey-overview/

0
Nickolay On

So, 3.0 doesn't have tracemonkey, and regarding your comment that in 3.5 it doesn't work either - are you maybe running distro-provided 64-bit? I recall reading that tracemonkey was disabled on 64-bit builds (the support was implemented only recently and is not in Firefox 3.5).