Closed Bug 523242 Opened 15 years ago Closed 13 years ago

factor FrameInfo typemaps out of VMSideExit typemaps

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: luke, Unassigned)

Details

Attachments

(1 file)

Attached patch WIPSplinter Review
Currently, if we have a side exit nested inside a function call inside a loop, any VMSideExit contains a typemap for the entire calldepth, even though the typemap information for all the outer calls is already in the calls' FrameInfos.  To see this overhead, one can simply make a static counter in TraceRecorder::snapshot():

duplication += NativeStackSlots(cx, callDepth) - NativeStackSlots(cx, 0);
total += NativeStackSlots(cx, callDepth) + treeInfo->globalSlots->length();

Printing these statistics at the end of recording (and resetting to 0 on ResetJIT), the highest amount of duplication I found was:

              total(K)   duplication(K)    %
v8-crypto:    1484       810               54
v8-deltablue: 881        374               42
v8-raytrace:  315        465               67
ss-raytrace:  262        128               48

So, while the percentage savings would be high, the absolute savings would less than 1MB.  The code required is also a bit tricky.  The changes to LeaveTree are in the patch and actually simplify the logic.  But there is more work required in the interpreter, to keep a stack of side exits analogous to what happens on trace.

I'm just going to leave this here for now.
This begs the question: what do we actually use the code cache for? We consume about 14mb of code cache for SS. That has to go somewhere.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: