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

Unified Diff: src/heap/heap.cc

Issue 2397713002: [heap] Remove PromotionMode used by Scavenger (Closed)
Patch Set: Remove introduced tests Created 4 years, 2 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/heap-inl.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 4ceab15d0fcb251e6ec5d1fab9286caeb4b34f45..a9cc98da7bac158ebd0383bb040c035d8ccff284 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1639,7 +1639,6 @@ void Heap::Scavenge() {
Address new_space_front = new_space_->ToSpaceStart();
promotion_queue_.Initialize();
- PromotionMode promotion_mode = CurrentPromotionMode();
ScavengeVisitor scavenge_visitor(this);
if (FLAG_scavenge_reclaim_unmodified_objects) {
@@ -1692,8 +1691,7 @@ void Heap::Scavenge() {
{
TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_SEMISPACE);
- new_space_front =
- DoScavenge(&scavenge_visitor, new_space_front, promotion_mode);
+ new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
}
if (FLAG_scavenge_reclaim_unmodified_objects) {
@@ -1702,14 +1700,12 @@ void Heap::Scavenge() {
isolate()->global_handles()->IterateNewSpaceWeakUnmodifiedRoots(
&scavenge_visitor);
- new_space_front =
- DoScavenge(&scavenge_visitor, new_space_front, promotion_mode);
+ new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
} else {
TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OBJECT_GROUPS);
while (isolate()->global_handles()->IterateObjectGroups(
&scavenge_visitor, &IsUnscavengedHeapObject)) {
- new_space_front =
- DoScavenge(&scavenge_visitor, new_space_front, promotion_mode);
+ new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
}
isolate()->global_handles()->RemoveObjectGroups();
isolate()->global_handles()->RemoveImplicitRefGroups();
@@ -1719,8 +1715,7 @@ void Heap::Scavenge() {
isolate()->global_handles()->IterateNewSpaceWeakIndependentRoots(
&scavenge_visitor);
- new_space_front =
- DoScavenge(&scavenge_visitor, new_space_front, promotion_mode);
+ new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
}
UpdateNewSpaceReferencesInExternalStringTable(
@@ -1904,8 +1899,7 @@ void Heap::VisitExternalResources(v8::ExternalResourceVisitor* visitor) {
}
Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
- Address new_space_front,
- PromotionMode promotion_mode) {
+ Address new_space_front) {
do {
SemiSpace::AssertValidRange(new_space_front, new_space_->top());
// The addresses new_space_front and new_space_.top() define a
@@ -1914,14 +1908,8 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
while (new_space_front != new_space_->top()) {
if (!Page::IsAlignedToPageSize(new_space_front)) {
HeapObject* object = HeapObject::FromAddress(new_space_front);
- if (promotion_mode == PROMOTE_MARKED) {
- new_space_front += StaticScavengeVisitor<PROMOTE_MARKED>::IterateBody(
- object->map(), object);
- } else {
- new_space_front +=
- StaticScavengeVisitor<DEFAULT_PROMOTION>::IterateBody(
- object->map(), object);
- }
+ new_space_front +=
+ StaticScavengeVisitor::IterateBody(object->map(), object);
} else {
new_space_front = Page::FromAllocationAreaAddress(new_space_front)
->next_page()
@@ -5433,8 +5421,7 @@ V8_DECLARE_ONCE(initialize_gc_once);
static void InitializeGCOnce() {
Scavenger::Initialize();
- StaticScavengeVisitor<DEFAULT_PROMOTION>::Initialize();
- StaticScavengeVisitor<PROMOTE_MARKED>::Initialize();
+ StaticScavengeVisitor::Initialize();
MarkCompactCollector::Initialize();
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698