Closed
Bug 965916
Opened 11 years ago
Closed 11 years ago
On memory pressure, trigger a second GC if it would probably be productive
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
(Whiteboard: [MemShrink])
Attachments
(1 file)
2.79 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
When we finish a CC, we poke the GC if sCCollectedWaitingForGC exceeds some threshold. But if we're doing a GC->CC combo due to getting a memory pressure event, in nsJSEnvironmentObserver::Observe, we probably want to do that second GC immediately.
Assignee | ||
Comment 1•11 years ago
|
||
(Luke pointed out that we probably want that second GC on memory pressure.)
Assignee | ||
Comment 2•11 years ago
|
||
This really just makes the memory pressure more useful, we could add it either way.
Comment 3•11 years ago
|
||
And that second GC will then trigger second (async) CC too.
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3)
> And that second GC will then trigger second (async) CC too.
Sure. Hopefully it won't do much. The hope of the second GC is that it will free a bunch of stuff the CC made into garbage.
try run: https://tbpl.mozilla.org/?tree=Try&rev=0b86aae5b34f
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8368656 -
Flags: review?(bugs)
Updated•11 years ago
|
Attachment #8368656 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
![]() |
||
Comment 8•11 years ago
|
||
"Minimize memory usage" triggers 3 memory pressure events, precisely so that this GC/CC/GC dance gets done sufficiently. Could the number be reduced to 2 or 1 now?
Assignee | ||
Comment 9•11 years ago
|
||
Reducing it to 2 should be okay. In theory, 2 would have been okay before (in theory, 1 is okay now). Trading a little jankiness for less weirdness in case of bugginess is probably the way to go, or we'll just have to tell people to hit the button multiple times, which defeats the point.
![]() |
||
Comment 10•11 years ago
|
||
I was thinking that MMU happened when apps went into the background, but that's just vanilla memory-pressure. Yeah, jank after hitting the MMU button doesn't matter.
You need to log in
before you can comment on or make changes to this bug.
Description
•