Open Bug 1823758 Opened 2 years ago Updated 1 year ago

Synthesize baseline interpreter trampolines when bailing out

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

People

(Reporter: iain, Assigned: denispal)

References

(Blocks 1 open bug)

Details

For the purposes of profiling, we want to be able to identify which function is running in blinterp. Bug 1815538 adds disambiguation trampolines to support this:

caller frame
disambiguation frame
blinterp callee frame

When we bail out, however, we start in a situation that looks like this:

caller frame
ion callee frame (possibly containing inlined calls)

And transition to something that looks like this:

caller frame (untouched)
blinterp callee frame
blinterp callee frame (previously inlined)
...

To keep using the disambiguation trampoline, we would instead need something like this:

caller frame (untouched)
disambiguation trampoline frame
blinterp callee frame
disambiguation trampoline frame (previously inlined)
blinterp callee frame (previously inlined)
...

This would require synthesizing the trampoline frames, similarly to how we currently synthesize rectifier frames.

One instance where this shows up is on the Matrix-React benchmark. It causes time in describeNativeComponentFrame to be attributed to its caller, describeFiber. describeNativeComponentFrame throws and catches an error in order to obtain a stack.

Assignee: nobody → dpalmeiro
You need to log in before you can comment on or make changes to this bug.