Closed
Bug 1018568
Opened 11 years ago
Closed 11 years ago
Eliminate AutoAssertOnGC overhead in opt builds
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(2 files)
|
4.26 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
|
1.86 KB,
patch
|
Details | Diff | Splinter Review |
I just landed some string patches and they regressed Sunspider, in particular base64. I tracked it down to an AutoCheckCannotGC I added, it's probably the TLS lookup in the AutoAssertOnGC constructor.
This patch makes AutoAssertOnGC a nop in opt builds and this fixes the regression locally.
Attachment #8432078 -
Flags: review?(terrence)
| Assignee | ||
Comment 1•11 years ago
|
||
I should probably also use the constructor that takes a JSRuntime*, I tested and it's faster.
Terrence, I think there's also a problem with string methods that are called (or could be called) from other threads. Should we move inUnsafeRegion to PerThreadData?
Flags: needinfo?(terrence)
| Assignee | ||
Comment 2•11 years ago
|
||
Oh nevermind, AutoAssertOnGC doesn't touch inUnsafeRegion if we're not on the main thread.
Flags: needinfo?(terrence)
| Assignee | ||
Comment 3•11 years ago
|
||
There is a MOZ_CRASH in AutoAssertOnGC::VerifyIsSafeToGC, if we want to keep that in opt builds maybe we could have two different classes, one debug-only and one also enabled in opt builds?
| Assignee | ||
Comment 4•11 years ago
|
||
We could also change AutoCheckCannotGC to only inherit from AutoAssertOnGC in debug builds.
This makes sense I think because AutoCheckCannotGC is checked by the static analysis, so the AutoAssertOnGC there is nice to have in debug builds but it's not very important for opt builds.
Let me know what you prefer.
| Assignee | ||
Comment 5•11 years ago
|
||
What I described in comment 4.
Attachment #8432084 -
Flags: feedback?(terrence)
Comment 6•11 years ago
|
||
Comment on attachment 8432078 [details] [diff] [review]
Patch
Review of attachment 8432078 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the bustage! I somehow forgot that we are now using this in every single string user now.
Given we haven't seen a crash spike from this in the last day or two, I think restoring the previous behavior is the right choice.
Attachment #8432078 -
Flags: review?(terrence) → review+
Updated•11 years ago
|
Attachment #8432084 -
Flags: feedback?(terrence)
| Assignee | ||
Comment 7•11 years ago
|
||
OK, pushed the first patch:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3bd75df9c682
Comment 8•11 years ago
|
||
Confirmed fixed on x86 mac and windows builds. Thanks!
Comment 9•11 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #8)
> Confirmed fixed on x86 mac and windows builds. Thanks!
*fixed regression of ss-base64 and octane-PdfJS
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•