Closed Bug 1736338 Opened 3 years ago Closed 3 years ago

Barrier overhead from use of Heap<JSObject*> in ArrayBufferOrView

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox93 --- unaffected
firefox94 --- wontfix
firefox95 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file Micro-benchmark

I noticed this in a profile last week but forgot where. Fortunately I can still reproduce this with a micro-benchmark. For the attached one I have this profile:

https://share.firefox.dev/3parIgP

We spend a lot of time in JS::HeapObjectPostWriteBarrier. I wonder if this is made worse because ArrayBufferView is passed by value and we end up copying it a lot.

The micro-benchmark took about 1400 ms on my Mac before these changes, now it takes about 2000 ms, so it's a pretty severe regression for DOM bindings that use typed arrays.

Flags: needinfo?(sphink)

The Bugbug bot thinks this bug is a defect, but please change it back in case of error.

Type: task → defect

Set release status flags based on info from the regressing bug 1720422

We talked about this at the GC meeting last week. I think we came to the conclusion that the Heap<> wrapper is not necessary at the moment as these are currently all roots, and if they are used on the heap we can arrange it so you can Heap<ArrayBufferOrView>.

This was triggering post-barriers. This is unnecessary because this type is currently
only used on the stack.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(sphink)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb32ebc906a3
Stop using Heap<> in ArrayBufferOrView. r=sfink
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

Given where we are in the cycle with no betas left for Fx94, let's let this ride the trains rather than trying to uplift directly into RC builds.

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: