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

Unified Diff: src/mark-compact.cc

Issue 10996017: Revert 12609 (Allow partial scanning of large arrays) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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/mark-compact.h ('k') | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 12609)
+++ src/mark-compact.cc (working copy)
@@ -1066,30 +1066,6 @@
}
}
- static void VisitHugeFixedArray(Heap* heap, FixedArray* array, int length);
-
- // The deque is contiguous and we use new space, it is therefore contained in
- // one page minus the header. It also has a size that is a power of two so
- // it is half the size of a page. We want to scan a number of array entries
- // that is less than the number of entries in the deque, so we divide by 2
- // once more.
- static const int kScanningChunk = Page::kPageSize / 4 / kPointerSize;
-
- INLINE(static void VisitFixedArray(Map* map, HeapObject* object)) {
- FixedArray* array = FixedArray::cast(object);
- int length = array->length();
- Heap* heap = map->GetHeap();
-
- if (length < kScanningChunk ||
- MemoryChunk::FromAddress(array->address())->owner()->identity() !=
- LO_SPACE) {
- Object** start = array->data_start();
- VisitPointers(heap, start, start + length);
- } else {
- VisitHugeFixedArray(heap, array, length);
- }
- }
-
// Marks the object black and pushes it on the marking stack.
INLINE(static void MarkObject(Heap* heap, HeapObject* object)) {
MarkBit mark = Marking::MarkBitFrom(object);
@@ -1528,27 +1504,6 @@
};
-void MarkCompactMarkingVisitor::VisitHugeFixedArray(Heap* heap,
- FixedArray* array,
- int length) {
- MemoryChunk* chunk = MemoryChunk::FromAddress(array->address());
-
- ASSERT(chunk->owner()->identity() == LO_SPACE);
-
- Object** start = array->data_start();
- int from =
- chunk->IsPartiallyScanned() ? chunk->PartiallyScannedProgress() : 0;
- int to = Min(from + kScanningChunk, length);
- VisitPointers(heap, start + from, start + to);
-
- if (to == length) {
- chunk->SetCompletelyScanned();
- } else {
- chunk->SetPartiallyScannedProgress(to);
- }
-}
-
-
void MarkCompactMarkingVisitor::ObjectStatsCountFixedArray(
FixedArrayBase* fixed_array,
FixedArraySubInstanceType fast_type,
@@ -1690,9 +1645,6 @@
table_.Register(kVisitJSRegExp,
&VisitRegExpAndFlushCode);
- table_.Register(kVisitFixedArray,
- &VisitFixedArray);
-
if (FLAG_track_gc_object_stats) {
// Copy the visitor table to make call-through possible.
non_count_table_.CopyFrom(&table_);
@@ -2176,7 +2128,6 @@
MarkCompactMarkingVisitor::IterateBody(map, object);
}
- ProcessLargePostponedArrays(heap(), &marking_deque_);
// Process encountered weak maps, mark objects only reachable by those
// weak maps and repeat until fix-point is reached.
@@ -2185,29 +2136,12 @@
}
-void MarkCompactCollector::ProcessLargePostponedArrays(Heap* heap,
- MarkingDeque* deque) {
- ASSERT(deque->IsEmpty());
- LargeObjectIterator it(heap->lo_space());
- for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
- if (!obj->IsFixedArray()) continue;
- MemoryChunk* p = MemoryChunk::FromAddress(obj->address());
- if (p->IsPartiallyScanned()) {
- deque->PushBlack(obj);
- }
- }
-}
-
-
// Sweep the heap for overflowed objects, clear their overflow bits, and
// push them on the marking stack. Stop early if the marking stack fills
// before sweeping completes. If sweeping completes, there are no remaining
// overflowed objects in the heap so the overflow flag on the markings stack
// is cleared.
void MarkCompactCollector::RefillMarkingDeque() {
- if (FLAG_trace_gc) {
- PrintPID("Marking queue overflowed\n");
- }
ASSERT(marking_deque_.overflowed());
SemiSpaceIterator new_it(heap()->new_space());
« no previous file with comments | « src/mark-compact.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698