Reviewers: Jakob,
Message:
PTAL
Description:
Remove the --collect-maps flag. Maps should be always collected.
Reasons:
- It is not used.
- It complicates code in GC.
BUG=chromium:499713
LOG=NO
Please review this at https://codereview.chromium.org/1184723002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -9 lines):
M src/flag-definitions.h
M src/heap-snapshot-generator.cc
M src/heap/mark-compact.cc
M src/heap/objects-visiting-inl.h
M src/objects-inl.h
M test/cctest/test-heap.cc
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
b9219372b906e0837fa10592abee6436cab1f423..af7cf5d7da6ff520d44a5d7228307284c07ce192
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -612,8 +612,6 @@ DEFINE_INT(trace_allocation_stack_interval, -1,
DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old
space")
DEFINE_BOOL(trace_fragmentation_verbose, false,
"report fragmentation for old space (detailed)")
-DEFINE_BOOL(collect_maps, true,
- "garbage collect maps from which no objects can be reached")
DEFINE_BOOL(weak_embedded_maps_in_optimized_code, true,
"make maps embedded in optimized code weak")
DEFINE_BOOL(weak_embedded_objects_in_optimized_code, true,
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index
2ee0c2df17e0f4005694475a68e9a30ebadd9262..a27f4194587f0f8705c4ee2f938f2b92d07feef4
100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1294,7 +1294,7 @@ void V8HeapExplorer::ExtractMapReferences(int entry,
Map* map) {
TransitionArray::cast(raw_transitions_or_prototype_info);
int transitions_entry = GetEntry(transitions)->index();
- if (FLAG_collect_maps && map->CanTransition()) {
+ if (map->CanTransition()) {
if (transitions->HasPrototypeTransitions()) {
FixedArray* prototype_transitions =
transitions->GetPrototypeTransitions();
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index
7494330263ea37c0ec0eb32fba3f1b3a19ceaff2..3513192c6ecbc40bf275d460f26dc2ee7bb09b2a
100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -345,7 +345,7 @@ void MarkCompactCollector::CollectGarbage() {
// arrays are cleared or contain only live code objects.
ProcessAndClearWeakCells();
- if (FLAG_collect_maps) ClearNonLiveReferences();
+ ClearNonLiveReferences();
ClearWeakCollections();
@@ -369,7 +369,7 @@ void MarkCompactCollector::CollectGarbage() {
#ifdef VERIFY_HEAP
VerifyWeakEmbeddedObjectsInCode();
- if (FLAG_collect_maps && FLAG_omit_map_checks_for_leaf_maps) {
+ if (FLAG_omit_map_checks_for_leaf_maps) {
VerifyOmittedMapChecks();
}
#endif
Index: src/heap/objects-visiting-inl.h
diff --git a/src/heap/objects-visiting-inl.h
b/src/heap/objects-visiting-inl.h
index
7f83f483ba750e9e149da2c8ed580f5f6fe0dee0..4a485b16b76c58fbc75f8036b8a83a9ed06fa878
100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -298,7 +298,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitMap(Map*
map,
// When map collection is enabled we have to mark through map's
transitions
// and back pointers in a special way to make these links weak.
- if (FLAG_collect_maps && map_object->CanTransition()) {
+ if (map_object->CanTransition()) {
MarkMapContents(heap, map_object);
} else {
StaticVisitor::VisitPointers(
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index
27528d644253793d8418fc019ec183557cd52c31..18c0a68b673370780782215523ca5240049ff22c
100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4867,7 +4867,6 @@ Object* Code::GetObjectFromEntryAddress(Address
location_of_address) {
bool Code::IsWeakObjectInOptimizedCode(Object* object) {
- if (!FLAG_collect_maps) return false;
if (object->IsMap()) {
return Map::cast(object)->CanTransition() &&
FLAG_weak_embedded_maps_in_optimized_code;
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index
3b163da600d70fdb7c34a381642246b783b39d59..e7d4f793614c79425f48301b8095de7d49c05688
100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3407,7 +3407,6 @@ TEST(TransitionArraySimpleToFull) {
TEST(Regress2143a) {
- i::FLAG_collect_maps = true;
i::FLAG_incremental_marking = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
@@ -3447,7 +3446,6 @@ TEST(Regress2143a) {
TEST(Regress2143b) {
- i::FLAG_collect_maps = true;
i::FLAG_incremental_marking = true;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.