JSStackFrame Evisceration: Difference between revisions

(Created page with '== Removing JSStackFrame members / things on the call path<br> == This would leave sizeof(JSStackFrame) == 6 words.<br> === Directly remove<br> === *[https://bugzilla.mozilla.…')
 
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Removing JSStackFrame members / things on the call path<br> ==
This leaves sizeof(JSStackFrame) == 10 words (11 on 32-bit), but we only need to initialize 4 of those words on the common call path; the rest can be lazily (or never) initialized.


This would leave sizeof(JSStackFrame) == 6 words.<br>
=== Members to remove ===


=== Directly remove<br> ===
Sorted in estimated order of benefit / difficulty:


*[https://bugzilla.mozilla.org/show_bug.cgi?id=535912 blockChain]<br>
{| width="95%" cellspacing="4" cellpadding="1" border="0"
*[https://bugzilla.mozilla.org/show_bug.cgi?id=539144 argc/argv] (lw)<br>
|-
*[https://bugzilla.mozilla.org/show_bug.cgi?id=540675 callerVersion] (not just a predictable branch)<br>
| '''Task'''
*[https://bugzilla.mozilla.org/show_bug.cgi?id=550639 rval] (harder than originally expected, but its a uint64 on x86, so 2x points)<br>
| '''Size (wks)'''
*[https://bugzilla.mozilla.org/show_bug.cgi?id=557375 thisv] (uint64 on x86, 2x points)<br>
| '''Assignee'''
*annotation - remove UniversalXPConnect / ultimately, the calls to JS_{Get,Set}FrameAnnotation in nsScriptSecurityManager.cpp must go<br>
| '''Note'''
*displaySave - remove display optimization (cdleary)<br>
|-
 
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=539144 argc/argv/fun/script/thisv]
=== Remove from method-jit frame<br> ===
| 3
 
| lw
*ncode (merge with savedPC)<br>
| Requires StackSegment [https://bugzilla.mozilla.org/show_bug.cgi?id=579183 changes].
 
|-
=== Remove in non-interpreter stack frame<br> ===
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=595073 ncode]
 
| 3
*fun<br>
|
*script<br>
| Merge it with savedPC in method-jit.  Requires building map HW PC --> bytecode (which we sortof already heave
*hookData (?)<br>
|-
*imacpc (?)
| [https://bugzilla.mozilla.org/show_bug.cgi?id=593882 scopeChain]
 
| .5
== Remove from call path ==
|
 
|-
*PIC for fast natives calls
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=577708 displaySave]
*PIC/fast path for interpreted inline call
| 1
*Remove empty script check (not just a predictable branch)
| cdleary
| Remove display optimization for great justice!
|-
| XhookData
| .1
| lw
| Lazily initialize using JSStackFrame::flags.  Included in bug 539144.
|-
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=546848 annotation]
| 3
| sayrer
| Trivial if we can remove callers in nsScriptSecurityManager. Alas, that is not trivial, so this is going to take a while.  For now, we lazily initialize which gives practically all the benefit.
|-
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=540675 callerVersion]
| .5
| cdleary
| Mostly the challenge is just understanding the actual use case.
|-
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=535912 blockChain]
| 1
| wmmcloskey
| A bit tricky
|-
| [https://bugzilla.mozilla.org/show_bug.cgi?id=595073 rval]
| 1
|
| Lazily initialize with a JSStackFrame::flags bit and avoid ever writing in the hot JM call/return paths.
|-
| X[https://bugzilla.mozilla.org/show_bug.cgi?id=586358 imacpc]
| 1
| cdleary
| Leave uninitialized in call path and use JSStackFrame::flags to indicate whether there is or is not an imacpc.
|}
Confirmed users
367

edits