Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: src/heap/heap.cc

Issue 1465223009: [heap] pause observers during mark-compact (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use a scope for pausing/resuming inline allocation observers Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 46f62f001d4f2da005586b16de92b8191520458a..945add8e95d370444b1882e9fe4f97ca599e7955 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1382,6 +1382,8 @@ void Heap::CallGCEpilogueCallbacks(GCType gc_type,
void Heap::MarkCompact() {
+ PauseInlineAllocationObserversScope pause_observers(new_space());
+
gc_state_ = MARK_COMPACT;
LOG(isolate_, ResourceEvent("markcompact", "begin"));
@@ -1586,7 +1588,7 @@ void Heap::Scavenge() {
// Bump-pointer allocations done during scavenge are not real allocations.
// Pause the inline allocation steps.
- new_space()->PauseInlineAllocationObservers();
+ PauseInlineAllocationObserversScope pause_observers(new_space());
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this);
@@ -1717,8 +1719,6 @@ void Heap::Scavenge() {
// Set age mark.
new_space_.set_age_mark(new_space_.top());
- new_space()->ResumeInlineAllocationObservers();
-
array_buffer_tracker()->FreeDead(true);
// Update how much has survived scavenge.
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698