Closed Bug 1417398 Opened 2 years ago Closed 2 years ago

Use a single JitCode instance for JitRuntime trampolines

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
Bug 1416572 did this for VMFunction wrappers, but we can do this for the other trampolines as well to get rid of some overhead. Also, some trampolines jump to other trampolines, we can use Labels for that now.

This also introduces TrampolinePtr and removes MacroAssembler::selfReferencePatch_ as it's unused now.
Attachment #8928491 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8928491 [details] [diff] [review]
Patch

Review of attachment 8928491 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this, this is way nicer! This will also reduce the number of executable pages allocated and protected too.

::: js/src/jit/CodeGenerator.cpp
@@ +8033,5 @@
>      masm.popReturnAddress();
>  #endif
>      masm.jump(ReturnReg);
>  
> +    lazyLinkStubEndOffset_ = masm.currentOffset();

nit-if-not-removed-in-future-patches: add a comment such as:

This is used to determine if we are under LazyLinkTopActivation function, while doing an invalidation during the link time.  The problem we are trying to avoid with this, is that the LazyLinkStub share the same stack frame layout as a JS jit frame, while it is yet to become a valid Ion frame.
Attachment #8928491 - Flags: review?(nicolas.b.pierron) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/30b2f19116ba
Use a single JitCode instance for JitRuntime trampolines. r=nbp
(In reply to Nicolas B. Pierron [:nbp] from comment #1)
> nit-if-not-removed-in-future-patches: add a comment such as:

I'll remove this in bug 1417399 :)
https://hg.mozilla.org/mozilla-central/rev/30b2f19116ba
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.