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

Unified Diff: src/heap/scavenger.cc

Issue 2862563002: [heap] Pause black allocation during GCs (Closed)
Patch Set: Created 3 years, 8 months 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 | « src/heap/incremental-marking.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/scavenger.cc
diff --git a/src/heap/scavenger.cc b/src/heap/scavenger.cc
index f23e34217be60b341932b9f8903435a3cb631103..e2113887297539bee0549ab4433fbe0af5e8bfd5 100644
--- a/src/heap/scavenger.cc
+++ b/src/heap/scavenger.cc
@@ -191,6 +191,8 @@ class ScavengingVisitor : public StaticVisitorBase {
HeapObject* target = NULL; // Initialization to please compiler.
if (allocation.To(&target)) {
+ DCHECK(ObjectMarking::IsWhite(
+ target, heap->mark_compact_collector()->marking_state(target)));
MigrateObject(heap, object, target, object_size);
// Update slot to new target using CAS. A concurrent sweeper thread my
@@ -201,10 +203,7 @@ class ScavengingVisitor : public StaticVisitorBase {
reinterpret_cast<base::AtomicWord>(target));
if (object_contents == POINTER_OBJECT) {
- // TODO(mlippautz): Query collector for marking state.
- heap->promotion_queue()->insert(
- target, object_size,
- ObjectMarking::IsBlack(object, MarkingState::Internal(object)));
+ heap->promotion_queue()->insert(target, object_size);
}
heap->IncrementPromotedObjectsSize(object_size);
return true;
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698