Javascript:SpiderMonkey:ProjectGenerationGarbageCollection: Difference between revisions

Mark as Outdated
No edit summary
(Mark as Outdated)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{outdated}}
<p>Wiki conversion of original Google Document: https://docs.google.com/a/jamsni.com/document/d/1-GZ8F0ZabvdpCnRQaecId0yuu4QFYr5pAvnRC_KFchc/edit
<p>Wiki conversion of original Google Document: https://docs.google.com/a/jamsni.com/document/d/1-GZ8F0ZabvdpCnRQaecId0yuu4QFYr5pAvnRC_KFchc/edit
</p><p><br />
</p>
</p>
<h1> Objective </h1>
 
== Objective ==
<p>Implement Generational Garbage collection in Spider Monkey. &lt;Some goal based off V8 performance delta&#160;% on Earley Boyer benchmark&gt;</p>
<p>Implement Generational Garbage collection in Spider Monkey. &lt;Some goal based off V8 performance delta&#160;% on Earley Boyer benchmark&gt;</p>
<b>Accountable</b>: Naveed<br />
<b>Accountable</b>: Naveed<br />
Line 10: Line 12:
<br/>
<br/>
<b>Tracking Bug:</b> [meta] Implement generational garbage collection - <span class="fck_mw_template"><span class="fck_mw_template"><span class="fck_mw_template">{{bug|619558}}</span></span></span>
<b>Tracking Bug:</b> [meta] Implement generational garbage collection - <span class="fck_mw_template"><span class="fck_mw_template"><span class="fck_mw_template">{{bug|619558}}</span></span></span>
<h1> Milestones </h1>
 
<table border=1>
== Milestones ==
<tr>
 
  <th>Status</th>
=== Endgame schedule ===
  <th>Milestone</th>
 
  <th>Task</th>
* Burndown of rooting hazards and unsafe references: https://people.mozilla.com/~sfink/analysis
  <th>Deliverable</th>
* Burndown of bugs blocking Exact Rooting: [https://metrics.mozilla.com/bugzilla-analysis/Dashboard-FinalBurndown.html#esfilter=%257B%22or%22%3A%255B%0A%09%257B%22term%22%3A%257B%22bug_id%22%3A753203%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A745742%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A773686%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A789551%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A791022%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A906940%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A813244%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A848151%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A831379%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A868799%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A877658%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A884617%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898220%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898606%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A791062%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A834909%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A831409%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898554%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A901731%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898970%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A864785%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A868483%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A877699%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898815%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A900144%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A899251%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A899251%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A900998%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A898608%257D%257D,%0A%09%257B%22term%22%3A%257B%22blocked_by%22%3A900713%257D%257D%0A%255D%257D&forTitle=Exact+Rooting&dueDate=2013-10-22&sampleMin=2013-08-01 https://metrics.mozilla.com/...]
  <th>Assigned</th>
 
  <th>Estimate</th>
{| class="wikitable"
  <th>Expected</th>
! Milestone
  <th>Actual</th>
! Bug
</tr>
! Old Estimated Date
<tr>
! Current Estimated Date
  <td>done</td>
! Actual Date
  <td>1</td>
! Nightly Version
  <td>Rooting analysis in the shell (x64)</td>
|-
  <td>green on mozilla-inbound</td>
| ...
  <td>sfink, jonco, evilpie, Ms2ger</td>
|
  <td>2 weeks</td>
|
  <td>2013-03-07</td>
|
  <td></td>
|
</tr>
|-
<tr>
| style="background:#def;" | [[RapidRelease/Calendar|Nightly 26 (B2G 1.2) is uplifted to Aurora]]
  <td>pending</td>
| style="background:#def;" |
  <td>2</td>
| style="background:#def;" | 2013-09-16
  <td>Rooting analysis in the shell (arm)</td>
| style="background:#def;" |
  <td>green on mozilla-inbound</td>
| style="background:#def;" |
  <td>sfink</td>
| style="background:#def;" |
  <td>2 weeks</td>
|-
  <td></td>
| All unsafe references found by static analysis have been fixed
  <td></td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=898608 898608]
</tr>
| 2013-09-23
<tr>
| 2013-10-02
  <td>in progress</td>
|
  <td>3</td>
| 27
  <td>Exactly rooted shell (x64)</td>
|-
  <td>green on mozilla-inbound</td>
| Static analysis of unsafe references is unhidden on TBPL
  <td>sfink, jonco, evilpie, Ms2ger</td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=834909 834909]
  <td>2 weeks</td>
| 2013-09-25
  <td>2013-03-14</td>
| 2013-10-03
  <td></td>
|
</tr>
| 27
<tr>
|-
  <td>pending</td>
| All rooting hazards found by static analysis have been fixed
  <td>4</td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=898606 898606]
  <td>Exactly rooted shell (arm)</td>
| 2013-10-18
  <td>green on mozilla-inbound</td>
| 2013-10-07
  <td>sfink</td>
|
  <td>2 weeks</td>
| 27
  <td></td>
|-
  <td></td>
| Static analysis of rooting hazards is unhidden on TBPL
</tr>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=834909 834909]
<tr>
| 2013-10-22
  <td>in progress (needs bug)</td>
| 2013-10-08
  <td>4.1</td>
|
  <td>Exactly rooted source /js (x64)</td>
| 27
  <td>green on mozilla-inbound</td>
|-
  <td>jonco</td>
| style="background:#def;" | [[RapidRelease/Calendar|Nightly 27 is uplifted to Aurora]]
  <td></td>
| style="background:#def;" |
  <td></td>
| style="background:#def;" | 2013-10-28
  <td></td>
| style="background:#def;" |
</tr>
| style="background:#def;" |
<tr>
| style="background:#def;" |
  <td>in progress (needs bug)</td>
|-
  <td>4.2</td>
| ...
  <td>Exactly rooted source /js (ARM)</td>
|
  <td>green on mozilla-inbound</td>
|
  <td>jonco</td>
|
  <td></td>
|
  <td></td>
| 28
  <td></td>
|-
</tr>
| All GGC crashes found by fuzzers have been fixed
<tr>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=877471 877471]
  <td>in progress (Bug 706885)</td>
| 2013-11-__
  <td>5</td>
| 2013-10-__
  <td>GGC no-jit shell only build on TBPL (x64)</td>
|
  <td>green on mozilla-inbound</td>
| 28
  <td>terrence</td>
|-
  <td>1.5 month</td>
| AWFY with GGC >= AWFY without GGC
  <td>2013-02-21</td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=875863 875863]
  <td>2013-04-07</td>
| 2013-11-__
</tr>
|
<tr>
|
  <td>pending</td>
| 28
  <td>6</td>
|-
  <td>GGC no-jit shell only build on TBPL (arm)</td>
| GGC is enabled for desktop and Android
  <td>green on mozilla-inbound</td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=619558 619558]
  <td>sfink, terrence</td>
| 2013-11-__
  <td>2 weeks</td>
|
  <td></td>
|
  <td></td>
| 28
</tr>
|-
<tr>
| GGC is enabled for B2G 1.3
  <td>in progress (Bug 851057)</td>
| [https://bugzilla.mozilla.org/show_bug.cgi?id=619558 619558]
  <td>7</td>
| 2013-11-__
  <td>JIT support (x64)</td>
|
  <td>TBPL build using JITs and Ion+Baseline+GGC displayed on AWFY</td>
|
  <td>bhackett</td>
| 28
  <td>1 - 2 months</td>
|-
  <td>2013-03-15</td>
| ...
  <td></td>
|
</tr>
|
<tr>
|
  <td>pending</td>
|
  <td>8</td>
| 28
  <td>JIT support (arm)</td>
|-
  <td>TBPL build using JITs and Ion+Baseline+GGC displayed on AWFY</td>
| style="background:#def;" | [[RapidRelease/Calendar|Nightly 28 (B2G 1.3) is uplifted to Aurora]]
  <td>bhackett sfink</td>
| style="background:#def;" |
  <td>2 weeks</td>
| style="background:#def;" | 2013-12-09
  <td></td>
| style="background:#def;" |
  <td></td>
| style="background:#def;" |
</tr>
| style="background:#def;" |
<tr>
|-
  <td>not started</td>
| ...
  <td>9</td>
|
  <td>Optimized GGC in shell (x64 + arm)</td>
|
  <td>Ion+GGC faster than Ion-GGC on AWFY</td>
|
  <td>bhackett</td>
|
  <td>2 - 3 months</td>
| 29
  <td>2013-06-01</td>
|-
  <td></td>
| style="background:#def;" | [[RapidRelease/Calendar|Nightly 29 is uplifted to Aurora]]
</tr>
| style="background:#def;" |
<tr>
| style="background:#def;" | 2014-01-20
  <td>not started</td>
| style="background:#def;" |
  <td>10</td>
| style="background:#def;" |
  <td>Rooting analysis in the browser</td>
| style="background:#def;" |
  <td>too slow to run on TBPL</td>
|-
  <td>sfink, jonco, evilpie, Ms2ger, terrence</td>
| ...
  <td>2 - 3 months</td>
|
  <td>2013-06-01</td>
|
  <td></td>
|
</tr>
|
<tr>
| 30
  <td>in progress</td>
|}
  <td>11</td>
 
  <td>Exactly rooted browser (x64 + arm)</td>
=== Original schedule ===
  <td>green on mozilla-inbound</td>
 
  <td>sfink, jonco, evilpie, Ms2ger, terrence</td>
{| class="wikitable"
  <td>2 - 4 month</td>
! Milestone
  <td>2013-07-01</td>
! Task
  <td></td>
! Deliverable
</tr>
! Assigned
<tr>
! Estimated Weeks
  <td>not started</td>
! Expected Date
  <td>12</td>
! Actual Date
  <td>GGC in the browser (x64 + arm)</td>
|-
  <td>green on AWFY</td>
| 1
  <td>terrence</td>
| Rooting analysis in the shell (x64)
  <td>3 - 4 months</td>
| green on mozilla-inbound
  <td>2013-10-01</td>
| sfink, jonco, evilpie, Ms2ger
  <td></td>
| 2
</tr>
| 3/7/2013
</table>
| 3/2/2013
<h1> Steps </h1>
|-
<h2> Exact Rooting done in JS Shell <span class="fck_mw_template"><span class="fck_mw_template">{{bug|753203}}</span></span> </h2>
| 2
| Rooting analysis in the shell (arm)
| green on mozilla-inbound
| sfink
| 2
|
| pending
|-
| 3
| Exactly rooted shell (x64)
| green on mozilla-inbound
| sfink, jonco, evilpie, Ms2ger
| 2
| 3/14/2013
| done?
|-
| 4
| Exactly rooted shell (arm)
| green on mozilla-inbound
| sfink
| 2
|
| pending
|-
| 4.1
| Exactly rooted js/src
| green on mozilla-inbound
| jonco
| 3
| 5/9/2013
| in progress
|-
| 5
| GGC no-jit shell only build on TBPL (x64)
| green on mozilla-inbound
| terrence
| 6
| 2/21/2013
| 4/7/2013
|-
| 6
| GGC no-jit shell only build on TBPL (arm)
| green on mozilla-inbound
| sfink, terrence
| 2
|
| pending
|-
| 7
| JIT support (x64) (Bug 706885)
| TBPL build using JITs and Ion+Baseline+GGC displayed on AWFY
| bhacket
| 8
| 3/15/2013
| 4/7/2013
|-
| 8
| JIT support (arm)
| TBPL build using JITs and Ion+Baseline+GGC displayed on AWFY
| bhacket
| 2
|
| pending
|-
| 9
| Optimized GGC in shell (x64 + arm)
| Ion+GGC faster than Ion-GGC on AWFY
| bhacket
| 12
| 6/1/2013   
| not started
|-
| 10
| Static rooting analysis - browser
| available via mrgiggles and URL
| sfink, bhacket
| 12
| 6/1/2013
| done
|-
| 10.1
| Static analysis on TBPL - browser
| visible on tbpl
| sfink
|
|
| not started            
|-
| 10.2
| Static rooting analysis - b2g
| available via mrgiggles and URL
| sfink
|
|
| pending
|-
| 10.3
| Static analysis on TBPL - b2g
| visible on tbpl
| sfink
|
|
| not started           
|-
| 11
| Exactly rooted browser (x64 + arm)
| green on mozilla-inbound
| sfink, jonco, evilpie, Ms2ger, terrence
| 16
| 7/1/2013   
| in progress
|-
| 12
| GGC in the browser (x64 + arm)
| green on AWFY
| terrence
| 16
| 10/1/2013
| not started
|}
 
== Steps ==
 
=== Exact Rooting done in JS Shell {{bug|753203}} ===
 
<p>12 weeks started
<p>12 weeks started
</p>
</p>
<ul><li> Rooting Analysis on TinderBox (sfink) - done
<ul><li> Dynamic rooting analysis on tbpl (sfink) - done
<ul><li> Still need to unhide it for inbound - get it green, keep it green
<ul><li> Unhidden on inbound</li></ul>
</li></ul>
</li><li> Get the root analysis build green - done
</li><li> Get the root analysis build green - done
<ul><li> Get jit-tests green <span class="fck_mw_template"><span class="fck_mw_template">{{bug|745742}}</span></span>
<ul><li> Get jit-tests green <span class="fck_mw_template"><span class="fck_mw_template">{{bug|745742}}</span></span>
Line 185: Line 310:
<ul><li> Fix all discovered rooting hazards (~800) (sfink,jonco) - 4 weeks
<ul><li> Fix all discovered rooting hazards (~800) (sfink,jonco) - 4 weeks
</li><li> Optimize all discovered over-rooting (~100)
</li><li> Optimize all discovered over-rooting (~100)
</li><li> Automate static analysis <span class="fck_mw_template"><span class="fck_mw_template">{{bug|834912}}</span></span> (sfink)
</li><li> Automate static analysis <span class="fck_mw_template"><span class="fck_mw_template">{{bug|834912}}</span></span> - done (sfink)
<ul><li> Need a server (dm-sixgill01?)
</li><li> http://people.mozilla.org/~sfink/analysis/browser/rootingHazards.txt
</li><li> http://people.mozilla.org/~sfink/data/rootingHazards.txt
</li><li> http://people.mozilla.org/~sfink/analysis/browser/gcFunctions.txt
</li><li> http://people.mozilla.org/~sfink/data/gcFunctions.txt
</li><li> http://people.mozilla.org/~sfink/analysis/browser/allFunctions.txt
</li><li> http://people.mozilla.org/~sfink/data/allFunctions.txt
</li></ul>
</li></ul>
</li></ul>
</li></ul>
</li></ul>
<h2> JIT Integration with post barriers - 4 weeks, parallelized </h2>
 
=== JIT Integration with post barriers - 4 weeks, parallelized ===
 
<ul><li> IonMonkey <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831506}}</span></span> - 1 week (bhackett)
<ul><li> IonMonkey <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831506}}</span></span> - 1 week (bhackett)
</li><li> JaegerMonkey <span class="fck_mw_template"><span class="fck_mw_template">{{bug|764876}}</span></span> - 2 days (bhackett)
</li><li> JaegerMonkey <span class="fck_mw_template"><span class="fck_mw_template">{{bug|764876}}</span></span> - 2 days (bhackett)
</li><li> Baseline JIT <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831507}}</span></span> - &lt;ask jandem/djvj for an estimate&gt;
</li><li> Baseline JIT <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831507}}</span></span> - &lt;ask jandem/djvj for an estimate&gt;
</li></ul>
</li></ul>
<h2> Generational Garbage Collection in the Shell </h2>
 
=== Generational Garbage Collection in the Shell ===
 
<ul><li> Implement prototype algorithm (terrence) - 1 week
<ul><li> Implement prototype algorithm (terrence) - 1 week
</li><li> This is a potential milestone: we would need to build it and test it on TBPL similar to how |r| works now -- |GGCJS|.
</li><li> This is a potential milestone: we would need to build it and test it on TBPL similar to how |r| works now -- |GGCJS| - done.
</li><li> Re-implement HashTable rekeying
</li><li> Re-implement HashTable rekeying
<ul><li> We undid this code because it was a perf regression and was still a bit buggy. (terrence) - 3 weeks
<ul><li> We undid this code because it was a perf regression and was still a bit buggy. (terrence) - 3 weeks
Line 206: Line 333:
</li></ul>
</li></ul>
</li></ul>
</li></ul>
<h2> Exactly Root the Browser <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831379}}</span></span> - 10 weeks </h2>
 
=== Exactly Root the Browser <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831379}}</span></span> - 10 weeks ===
 
<ul><li> This is a potential milestone: we would turn on exact rooting for release FF at this point. We would not get a performance boost from this (necessarily), but it would lock in our work to this point.
<ul><li> This is a potential milestone: we would turn on exact rooting for release FF at this point. We would not get a performance boost from this (necessarily), but it would lock in our work to this point.
</li></ul>
</li></ul>
<h2> Performance Tuning - 4 weeks (This should probably start asap) </h2>
 
=== Performance Tuning - 4 weeks (This should probably start asap) ===
 
<ul><li> Implement a Nursery <span class="fck_mw_template"><span class="fck_mw_template">{{bug|706885}}</span></span> - 1 week
<ul><li> Implement a Nursery <span class="fck_mw_template"><span class="fck_mw_template">{{bug|706885}}</span></span> - 1 week
</li><li> Test against V8 Earley-Boyer benchmark.
</li><li> Test against V8 Earley-Boyer benchmark.
<ul><li> Also v8 deltablue, raytrace
<ul><li> Also v8 deltablue, raytrace
</li></ul>
</li></ul>
</li><li> We may need to Implement Bill’s Pools/Zones idea to get the nursery to the requisite perf <span class="fck_mw_template"><span class="fck_mw_template">{{bug|759585}}</span></span> - 6 weeks
</li><li> We may need to Implement Bill’s Pools/Zones idea to get the nursery to the requisite perf <span class="fck_mw_template"><span class="fck_mw_template">{{bug|759585}}</span></span> - 6 weeks - done
</li><li> Refactor code to avoid rooting on hot paths and keep rooter overhead acceptable <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831886}}</span></span> (bhackett) - done
</li><li> Refactor code to avoid rooting on hot paths and keep rooter overhead acceptable <span class="fck_mw_template"><span class="fck_mw_template">{{bug|831886}}</span></span> (bhackett) - done
</li></ul>
</li></ul>
<h2> Make the Post Barrier Verifier Green in the browser <span class="fck_mw_template"><span class="fck_mw_template">{{bug|764882}}</span></span> </h2>
 
=== Make the Post Barrier Verifier Green in the browser <span class="fck_mw_template"><span class="fck_mw_template">{{bug|764882}}</span></span> ===
 
<ul><li> Investigate how long it will take to do generational barriers - 1 week
<ul><li> Investigate how long it will take to do generational barriers - 1 week
</li><li> We may need to rewrite the maps in xpconnect and the browser in terms of HashTable: this could be a bunch of work.  
</li><li> We may need to rewrite the maps in xpconnect and the browser in terms of HashTable: this could be a bunch of work.  
</li><li> Make JS_IsAboutToBeFinalized indirect <span class="fck_mw_template"><span class="fck_mw_template">{{bug|765432}}</span></span> - 10 weeks
</li><li> Make JS_IsAboutToBeFinalized indirect <span class="fck_mw_template"><span class="fck_mw_template">{{bug|765432}}</span></span> - 10 weeks
</li></ul>
</li></ul>
<h1> Other </h1>
 
== Other ==
 
<ul><li> Should we establish a new benchmark specifically for GGC. (sfink votes yes)
<ul><li> Should we establish a new benchmark specifically for GGC. (sfink votes yes)
<ul><li> What would it measure? there are multiple goals, e.g. throughput/MMU/pause time
<ul><li> What would it measure? there are multiple goals, e.g. throughput/MMU/pause time
Line 239: Line 374:
</li></ul>
</li></ul>
</li></ul>
</li></ul>
<h1> Risks </h1>
 
== Risks ==
 
<ul>
<ul>
<li> Team is responsible for many top crashers</li>
<li> Team is responsible for many top crashers</li>
52

edits