JavaScript:TraceMonkey: Difference between revisions

Mark as Outdated
(Mark as Outdated)
 
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== TraceMonkey Tasks ==
{{OutdatedSpiderMonkey}}
 
== About TraceMonkey ==
TraceMonkey adds native‐code compilation to Mozilla’s JavaScript® engine (known as “SpiderMonkey”). It is based on a technique developed at UC Irvine called [http://www.ics.uci.edu/%7Efranz/Site/pubs-pdf/ICS-TR-06-16.pdf “trace trees”], and building on code and ideas shared with the Tamarin Tracing project. The net result is a massive speed increase both in the browser chrome and Web‐page content.
 
== Playing with TraceMonkey ==
TraceMonkey is currently available and ''enabled by default'' in stable 32-bit Firefox 3.5+ and [ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/ nightly builds]. If you want to modify the types of JavaScript that are executed using TraceMonkey:
* open a new tab;
* type “'''about:config'''” and hit enter;
* read the warning and heed its wisdom;
* enter “'''jit'''” in the filter field;
* change the value of “'''javascript.options.jit.content'''” to enable (true) and disable (false) TraceMonkey for JavaScript in Web content;
* change the value of “'''javascript.options.jit.chrome'''” to enable (true) and disable (false) TraceMonkey for JavaScript in XUL/chrome.
 
If you experience instability, please [http://bugzilla.mozilla.org file a bug] and reference any crash report ID that might be relevant.  As of 2009, of the stable builds only the 32-bit versions of Firefox have TraceMonkey available (use nightly builds for 64-bit support).


Here are a few pending tasks. Most of them benefit Tamarin-Tracing and TraceMonkey. Tasks that only benefit TraceMonkey are marked with a star(*).
== Hacking on TraceMonkey ==
The TM tree is located at http://hg.mozilla.org/tracemonkey.


* Setup performance & compliance test framework for shell using a MacMini.(*)
We are currently still in rapid‐development mode. Our commit policy is as follows: if you are confident you know what you are doing, push now and prepare to answer questions later if you break the tree. If you have commit access to hg.mozilla.org, feel free to commit any patch you feel is sensible. Even white‐space clean‐up, additional comments or general code clean‐up/naming‐consistency changes are welcome.
** Skill set: perl, shell scripts and such
** Effort: couple days tops


* Cleanup page allocation code in nanojit.
Run trace-test.js and all benchmarks in t/* before you commit. Commits that break any of these tests are allowed if sensible, but please let everyone know why you break what and what has to happen to fix it.
** Skill set: C/C++, gdb, some understanding of Tamarin would be good
** Effort: 1 week


* Make more JSOPs traceable.(*)
The main channel to discuss TM is #jsapi on irc.mozilla.org.  
** Skill set: solid experience with SpiderMonkey
** Effort: on-going


* Implement soft-float math in TraceMonkey. The code already exists in Tamarin-Tracing and just needs to be ported over. Coordinate with upstream maintainer to extract soft-float code into a filter and get a patch for that into Tamarin-Tracing.
== TraceMonkey Tasks ==
** Skill set: C/C++, gdb, no fear of ARM assembly
Beta 1
** Effort: 2 weeks
** fuzzer bugs fixed
** slow script dialog
** perf matches a2
** test suites passing
** gcov
** content_jit
** nanojit x86 (this works, but it must remain so)
** OOM nanojit/tracer testing
** disable tracer in the presence of debugger


* Add loop-spanning register allocation to nanojit and get patch into Tamarin-Tracing.
Beta 2
** Skill set: C/C++, gdb, experience with compiler construction advisable
** tracing recursion
** Effort: 2-4 weeks, depending on implementation strategy
** trace over DOM fast stubs (not into)
** event handler tracing
** ARM nanojit


* Fix vprof in Tamarin to make it usable on Mac and Linux.
Future Features
** Skill set: C/C++
** SSE opts
** Effort: 2 days
** PPC nanojit
** built‐in reg usage
** Nanojit [[JavaScript:Verifier|Verifier]]


* Help Intel with type stability analysis on real-world JS code.
== Security Review ==
** Skill set: understanding of JS, C/C++
[[TraceMonkeySecurityReviewForm]]
** Effort: 2 weeks


* Port nanojit to PowerPC (lower priority).
** Skill set: solid understanding of architecture issues, C/C++, lots of gdb
** Effort: 4 weeks


* Update ARM/Linux JIT
Javascript is a trademark or registered trademark of Sun Microsystems, Inc. in
** Skill set: ARM assembly, C/C++, gdb
the U.S. and other countries.
** Effort: 2-4 weeks?
52

edits