Closed
Bug 1202923
Opened 9 years ago
Closed 9 years ago
Encapsulate GC begin and end notification callbacks in an RAII guard
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: terrence, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
5.67 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
It has always seemed exceedingly weird to me that multiple gcCycles can get explicitly aggregated into a single stats entry. I don't think anything other than EnqueuePendingParseTasksAfterGC needs to actually run here and not in gcCycle, so let's see if try agrees: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2c3f2860c735
Attachment #8658450 -
Flags: review?(jcoppeard)
Comment 1•9 years ago
|
||
Comment on attachment 8658450 [details] [diff] [review] 55_move_all_state_into_gcCycle-v0.diff Review of attachment 8658450 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsgc.cpp @@ +1638,1 @@ > } Nit: can get rid of braces here too. @@ +1665,1 @@ > } Ditto braces. @@ +6099,5 @@ > GCRuntime::gcCycle(SliceBudget& budget, JS::gcreason::Reason reason) > { > + AutoTraceLog logGC(TraceLoggerForMainThread(rt), TraceLogger_GC); > + AutoStopVerifyingBarriers av(rt, IsShutdownGC(reason)); > + AutoScheduleZonesForGC asz(rt); I'm not sure about moving AutoScheduleZonesForGC here. Don't we want to just do this once?
Attachment #8658450 -
Flags: review?(jcoppeard) → review+
Assignee | ||
Comment 2•9 years ago
|
||
Sorry it took me so long to get back to this! (In reply to Jon Coppeard (:jonco) from comment #1) > Comment on attachment 8658450 [details] [diff] [review] > 55_move_all_state_into_gcCycle-v0.diff > > Review of attachment 8658450 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/src/jsgc.cpp > @@ +1638,1 @@ > > } > > Nit: can get rid of braces here too. > > @@ +1665,1 @@ > > } > > Ditto braces. This is the MSVC 2013 ranged-for braces bug. Not much we can do in the short term. > @@ +6099,5 @@ > > GCRuntime::gcCycle(SliceBudget& budget, JS::gcreason::Reason reason) > > { > > + AutoTraceLog logGC(TraceLoggerForMainThread(rt), TraceLogger_GC); > > + AutoStopVerifyingBarriers av(rt, IsShutdownGC(reason)); > > + AutoScheduleZonesForGC asz(rt); > > I'm not sure about moving AutoScheduleZonesForGC here. Don't we want to > just do this once? I certainly *hope* that deciding what zones to GC would be idempotent if we do not run the mutator! But I don't know for sure and you are right to urge caution. I overreached a bit here. I've split this patch up so that it only includes the AutoNotify changes and will file separate bugs for moving the dangerous-looking stuff individually. Carrying the r+ as this is a pure subset.
Attachment #8658450 -
Attachment is obsolete: true
Attachment #8680320 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Summary: Move all GC state below the reset loop → Encapsulate GC begin and end notification callbacks in an RAII guard
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a0785a29ec4f
Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b526e349c77fd781319ba2fe95f78233b5670767 Bug 1202923 - Encapsulate GC begin and end notification callbacks in an RAII guard; r=jonco
Comment 5•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b526e349c77f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 6•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/b526e349c77f
status-b2g-v2.5:
--- → fixed
Comment 7•9 years ago
|
||
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
status-b2g-v2.5:
fixed → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•