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

Unified Diff: src/heap/heap.cc

Issue 2002013002: [heap] Pass a force_promotion flag to the evacuation routine in the scavenger. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use the enum {PromotionMode} instead of a boolean flag. Created 4 years, 7 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/heap.h ('k') | src/heap/scavenger.h » ('j') | src/heap/scavenger.cc » ('J')
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 3c8b876bf5d1e5b529001a985fe5ecabfdd92085..bdca5533f0c047ca66709e3b1deceb5e02b6a151 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1668,7 +1668,7 @@ void Heap::Scavenge() {
// Copy objects reachable from the old generation.
TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS);
RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) {
- return Scavenger::CheckAndScavengeObject(this, addr);
+ return Scavenger::CheckAndScavengeObject(this, addr, DEFAULT_PROMOTION);
});
RememberedSet<OLD_TO_NEW>::IterateTyped(
@@ -1676,7 +1676,7 @@ void Heap::Scavenge() {
return UpdateTypedSlotHelper::UpdateTypedSlot(
isolate(), type, addr, [this](Object** addr) {
return Scavenger::CheckAndScavengeObject(
- this, reinterpret_cast<Address>(addr));
+ this, reinterpret_cast<Address>(addr), FORCE_PROMOTION);
ulan 2016/05/23 13:04:22 Please add a comment why we force promotion here.
ahaas 2016/05/23 13:31:48 Done.
});
});
}
@@ -4665,8 +4665,8 @@ void Heap::IteratePromotedObjectPointers(HeapObject* object, Address start,
Object* target = *slot;
if (target->IsHeapObject()) {
if (Heap::InFromSpace(target)) {
- callback(reinterpret_cast<HeapObject**>(slot),
- HeapObject::cast(target));
+ callback(reinterpret_cast<HeapObject**>(slot), HeapObject::cast(target),
+ DEFAULT_PROMOTION);
Object* new_target = *slot;
if (InNewSpace(new_target)) {
SLOW_DCHECK(Heap::InToSpace(new_target));
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/scavenger.h » ('j') | src/heap/scavenger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698