Created attachment 407144 [details] [diff] [review] WIP 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
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.