Closed
Bug 925397
Opened 11 years ago
Closed 11 years ago
GenerationalGC: parallel/scatter jit-tests fail in threadsafe shell build
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file, 2 obsolete files)
2.67 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
The following tests currently fail in GGC threadsafe shell builds:
FAIL - parallel/scatter-6.js
FAIL - parallel/scatter-7.js
FAIL - parallel/scatter-8.js
Assignee | ||
Comment 1•11 years ago
|
||
The problem is that we're adding an entry to the store buffer's generic buffer in a parallel thread that doesn't have access to the runtime. Such threads should never see nursery allocated things so such a barrier should be unnecessary.
The barrier is added by DenseRangeWriteBarrierPost() for updates to multiple contiguous slots in a dense array.
The patch just checks whether a barrier is necessary by traversing the array until it finds an element that's in the nursery.
Attachment #815453 -
Flags: review?(terrence)
Comment 2•11 years ago
|
||
Comment on attachment 815453 [details] [diff] [review]
parallel-failure
Review of attachment 815453 [details] [diff] [review]:
-----------------------------------------------------------------
The reason we do the barrier this way rather than barriers on the individual elements is that the callers are extremely hot: moving the method out-of-line, much less adding so much code, is not going to work. I think our options are to make a single check on the |rt| arg or to specialize the PJS code to call a version of the function that does not barrier. How did PJS even get its hands on a full JSRuntime*?
Attachment #815453 -
Flags: review?(terrence)
Assignee | ||
Comment 3•11 years ago
|
||
Ok, this is only a problem when called from ParallelFunctions.cpp so it's simple to make that one call an unbarriered version.
Attachment #815453 -
Attachment is obsolete: true
Attachment #815826 -
Flags: review?(terrence)
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Terrence Cole [:terrence] from comment #2)
Oh and to answer your question,
> How did PJS even get its hands on a full JSRuntime*?
by calling Cell::runtimeFromAnyThread()... I feel this might be a good thing to audit at some point.
Comment 5•11 years ago
|
||
Comment on attachment 815826 [details] [diff] [review]
parallel-failure
Review of attachment 815826 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! r=me
Attachment #815826 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
backed this out for test failures like https://tbpl.mozilla.org/php/getParsedLog.php?id=29077828&tree=Mozilla-Inbound
Assignee | ||
Comment 8•11 years ago
|
||
So it turns out that PJS also uses the main thread to run a parallel slice, so the previous assertion was failing.
I've replaced this by actually asserting that the data copied in does not contain any nursery things.
Is this ok or do you think it will be too heavyweight? It's only called from jit::InitRestParameterPar() so I guess the array shouldn't be too large.
Attachment #815826 -
Attachment is obsolete: true
Attachment #817059 -
Flags: review?(terrence)
Comment 9•11 years ago
|
||
Comment on attachment 817059 [details] [diff] [review]
parallel.patch
Review of attachment 817059 [details] [diff] [review]:
-----------------------------------------------------------------
Yeah, that should be fine. r=me
Attachment #817059 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•