Closed Bug 1119303 Opened 10 years ago Closed 10 years ago

MSimdBox should use ooCallVM for allocating TypedObjects.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

So far, we are able to allocate SIMD objects from the nursery (Bug 1112454) as long as we do not have to trigger a Minor GC. Today, we are unable to do so because we are not yet capable of spilling SIMD registers from a Safepoint (Bug 1112164) Once this would be possible, this bug should be a minor fix which consist of duplicating the code we have for allocating TypedObjects, and doing the same out-of-line callVM before initializing the rest of the objects with the SIMD register which is popped back from the stack.
Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
Comment on attachment 8569374 [details] [diff] [review] Use an oolCallVM to allocate SIMD objects when the nursery is full. Review of attachment 8569374 [details] [diff] [review]: ----------------------------------------------------------------- Straightforward. ::: js/src/jit-test/tests/SIMD/nursery-overflow.js @@ +16,5 @@ > +function test() { > + var arr = []; > + > + // overflow the nursery with live SIMD objects. > + for (var i = 0; i < 100000; i++) { According to my calculation, the OolVMCall will be triggered if sizeof(SIMD.int32x4(1,1,1,1)) =~ 170 bytes and I am not sure the typed object overhead is that much... Can you confirm you've manually checked, please (by setting a breakpoint in the ool vm call?) @@ +25,5 @@ > +} > + > +var arr = test(); > +for (var i = 1; i < arr.length; i++) > + assertEqX4(i4sub(arr[i], arr[i - 1]), [1, 1, 1, 1]); Hmmm, you're actually testing i4sub as well here :P Do you mind please changing this to just (starting from i = 0): assertEqX4(arr[i], [i, i, i, i]); ::: js/src/jit/CodeGenerator.cpp @@ +4402,1 @@ > Any chance to share some code with visitNewTypedObject? This first part seems to be redundant with visitNewTypedObject now.
Attachment #8569374 - Flags: review?(benj) → review+
(In reply to Benjamin Bouvier [:bbouvier] from comment #2) > Comment on attachment 8569374 [details] [diff] [review] > Use an oolCallVM to allocate SIMD objects when the nursery is full. > > Review of attachment 8569374 [details] [diff] [review]: > ----------------------------------------------------------------- > > Straightforward. > > ::: js/src/jit-test/tests/SIMD/nursery-overflow.js > @@ +16,5 @@ > > +function test() { > > + var arr = []; > > + > > + // overflow the nursery with live SIMD objects. > > + for (var i = 0; i < 100000; i++) { > > According to my calculation, the OolVMCall will be triggered if > sizeof(SIMD.int32x4(1,1,1,1)) =~ 170 bytes and I am not sure the typed > object overhead is that much... Can you confirm you've manually checked, > please (by setting a breakpoint in the ool vm call?) I did check manually, by using IONFLAGS=bailouts before and after. And we had 2 bailouts reporting simdbox (way more by adding extra zeros), and of course, no bailouts at all after the patch. > ::: js/src/jit/CodeGenerator.cpp > @@ +4402,1 @@ > > > > Any chance to share some code with visitNewTypedObject? This first part > seems to be redundant with visitNewTypedObject now. Creating a member function to factor 3 lines sounds over kill. The oolCallVM should warn us if we add / remove arguments to the prototype of the function.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: