Closed
Bug 1285890
Opened 8 years ago
Closed 2 years ago
Remove locking on lazy linking
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
104 Branch
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: h4writer, Assigned: jandem)
Details
Attachments
(2 files)
I added the locking when trying to find the root cause of crashes during lazy linking. I eventually found the culprit, but never removed the locking. Lets remove it.
Reporter | ||
Comment 1•8 years ago
|
||
Another reason the locking isn't needed anymore, is because the ionLazyLinkList doesn't need locking. This patch removes this locking. FinishOffThreadBuilder was hard to follow, since it has code that should only happend on the main thread and code that was shared. That is why I spit it into two functions: FinishBuilderOnThread and FinishBuilderOffThread. The OffThread version can only be used in very specific cases, which it guards for.
Assignee: nobody → hv1989
Attachment #8769616 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8769616 [details] [diff] [review] Patch Review of attachment 8769616 [details] [diff] [review]: ----------------------------------------------------------------- Nice asserts. ::: js/src/jit/Ion.cpp @@ +476,5 @@ > +void > +jit::FinishBuilderOnThread(JSRuntime* runtime, IonBuilder* builder) > +{ > + MOZ_ASSERT(TlsPerThreadData.get()->runtimeFromMainThread(), > + "Should only be mutated by the main thread."); Nit: fix indentation @@ +485,5 @@ > + { > + builder->script()->baselineScript()->removePendingIonBuilder(builder->script()); > + } > + > + // If the builder is still in one of the helper thread list, then remove it. Nit: lists
Attachment #8769616 -
Flags: review?(jdemooij) → review+
Updated•8 years ago
|
Priority: -- → P3
Comment 3•8 years ago
|
||
Hannes, this patch doesn't seem to apply any more. Is it still needed?
Flags: needinfo?(hv1989)
Reporter | ||
Comment 4•8 years ago
|
||
This is still in my "I want to land this" list. Though jit-tests was upset and I do know why and it isn't an easy fix. I will come back to this hopefully.
Flags: needinfo?(hv1989)
Comment 5•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: hv1989 → nobody
Assignee | ||
Comment 6•2 years ago
|
||
A lot has changed, but part of this still applies: there's still an unnecessary AutoLockHelperThreadState
in LinkIonScript
. The second one is necessary today because of the off-thread IonFree task.
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 7•2 years ago
|
||
Both the lazy link list and the pendingIonCompileTask
are only used on the main thread.
Updated•2 years ago
|
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Assignee | ||
Updated•2 years ago
|
Flags: needinfo?(jdemooij)
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8b6edbc1963 Remove unnecessary AutoLockHelperThreadState in LinkIonScript. r=jonco
Comment 9•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox104:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•