Optimize ExposeGCThingToActiveJS

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [qf])

Attachments

(1 attachment)

(Assignee)

Description

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

Most of these functions are inlined but the GCCellPtr::mayBeOwnedByOtherRuntime call is not and this often shows up in profiles. This patch has a few small optimizations:

* mayBeOwnedByOtherRuntime is now inlined and calls an out-of-line function only for strings and symbols. I added some logging and when I load Gmail the string/symbol cases only account for a few % so it seems worth it.

* I split CellIsMarkedGray in CellIsMarkedGray + TenuredCellIsMarkedGray so we can call TenuredCellIsMarkedGray when we already know the cell is tenured.
Attachment #8860974 - Flags: review?(jcoppeard)
(Assignee)

Updated

6 months ago
Blocks: 1351769
Whiteboard: [qf]

Comment 1

6 months ago
Comment on attachment 8860974 [details] [diff] [review]
Patch

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

Nice, thanks for the patch.
Attachment #8860974 - Flags: review?(jcoppeard) → review+

Comment 2

6 months ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b66d004acdcf
Optimize a few things in ExposeGCThingToActiveJS. r=jonco

Comment 3

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