Closed
Bug 1379957
Opened 7 years ago
Closed 7 years ago
DOM workers continue to run idle GCs every few seconds when idle
Categories
(Core :: DOM: Workers, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
4.56 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
Something I noticed a while ago is that DOM worker threads periodically GC even when the browser is totally idle due to IdleGCTimerCallback running repeatedly. I tracked this down to the DebuggerOnGCRunnable which is enqued from CycleCollectedJSRuntime::GCSliceCallback. This happens at the end of GC and makes the worker run loop think that the worker is active again and restarts the idle GC timer. Ideally we would ignore events associated with GC when deciding whether the worker is idle but I don't know how feasible that is. A simpler mitigation would be to skip enqueuing this runnable if there were no debuggers active.
Assignee | ||
Comment 1•7 years ago
|
||
Nick, any ideas on how best to proceed?
Flags: needinfo?(nfitzgerald)
Comment 2•7 years ago
|
||
> A simpler mitigation would be to skip enqueuing this runnable if there were no debuggers active.
This one sounds more appealing to me, FWIW.
Comment 3•7 years ago
|
||
I think Olli was trying to make some worker GC changes recently as well. He might have opinions.
Comment 4•7 years ago
|
||
GC/CC scheduling on workers is totally busted, and when I tried to fix it, it always caused test failures :( But definitely debugger code shouldn't make the behavior worse.
Comment 5•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #0) > A simpler mitigation would be to skip enqueuing this runnable > if there were no debuggers active. Yeah, there's no point in posting this runnable if there aren't any debuggers observing any global within the set of zones being collected.compartment
Flags: needinfo?(nfitzgerald)
Assignee | ||
Comment 6•7 years ago
|
||
Patch to check whether there are any debuggers that will have their onGarbageCollect hooks fired before dispatching the runnable.
Assignee: nobody → jcoppeard
Attachment #8885717 -
Flags: review?(nfitzgerald)
Comment 7•7 years ago
|
||
Comment on attachment 8885717 [details] [diff] [review] bug1379957-only-fire-ongc-hook-when-necessary Review of attachment 8885717 [details] [diff] [review]: ----------------------------------------------------------------- Looks great :) Thanks!
Attachment #8885717 -
Flags: review?(nfitzgerald) → review+
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/872e9c8fec61 Only fire the debugger's onGarbageCollection hook when necessary to avoid extra worker GCs r=fitzgen
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/872e9c8fec61
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•