Compartment checks do a slow TLS lookup

RESOLVED FIXED in Firefox 56

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks: 1 bug)

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
Created attachment 8881984 [details] [diff] [review]
Patch

START_ASSERT_SAME_COMPARTMENT calls CurrentThreadIsHeapBusy which does an OOL call where we do a TLS lookup. Compartment checks are Nightly-only but this overhead makes it harder to profile.

Here's a patch to just inline CurrentThreadIsHeapBusy in START_ASSERT_SAME_COMPARTMENT.
Attachment #8881984 - Flags: review?(jcoppeard)

Updated

6 months ago
Attachment #8881984 - Flags: review?(jcoppeard) → review+

Comment 1

6 months ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e54513aa7922
Inline CurrentThreadIsHeapBusy in START_ASSERT_SAME_COMPARTMENT to avoid a TLS lookup for each compartment check. r=jonco

Comment 2

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e54513aa7922
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.