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

Unified Diff: src/heap/heap.cc

Issue 1465633002: [heap] pause/resume inline allocation observers around scavenge (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.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 130db430c7696ab865003b52b878afff76fbd423..e3d8b1bb7995987cde1f1903181e99a4bc2e751c 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1583,6 +1583,10 @@ void Heap::Scavenge() {
// trigger one during scavenge: scavenges allocation should always succeed.
AlwaysAllocateScope scope(isolate());
+ // Bump-pointer allocations done during scavenge are not real allocations.
+ // Pause the inline allocation steps.
+ new_space()->PauseInlineAllocationObservers();
+
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this);
#endif
@@ -1712,9 +1716,7 @@ void Heap::Scavenge() {
// Set age mark.
new_space_.set_age_mark(new_space_.top());
- // We start a new step without accounting the objects copied into to space
- // as those are not allocations.
- new_space_.StartNextInlineAllocationStep();
+ new_space()->ResumeInlineAllocationObservers();
array_buffer_tracker()->FreeDead(true);
« 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