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

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: Created 5 years, 1 month 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.cc » ('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..2e2953d77a65db233fc53b31c7334986dc8ee84e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1385,6 +1385,8 @@ void Heap::MarkCompact() {
gc_state_ = MARK_COMPACT;
LOG(isolate_, ResourceEvent("markcompact", "begin"));
+ new_space()->PauseInlineAllocationObservers();
Hannes Payer (out of office) 2015/11/26 09:55:10 A scope would be cleaner for pausing and resuming.
ofrobots 2015/12/02 06:05:31 Done.
+
uint64_t size_of_objects_before_gc = SizeOfObjects();
mark_compact_collector()->Prepare();
@@ -1402,6 +1404,8 @@ void Heap::MarkCompact() {
if (FLAG_allocation_site_pretenuring) {
EvaluateOldSpaceLocalPretenuring(size_of_objects_before_gc);
}
+
+ new_space()->ResumeInlineAllocationObservers();
}
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698