OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7041 RememberedSet<OLD_TO_NEW>::RemoveRange( | 7041 RememberedSet<OLD_TO_NEW>::RemoveRange( |
7042 chunk, chunk->area_end() - kPointerSize, chunk->area_end(), | 7042 chunk, chunk->area_end() - kPointerSize, chunk->area_end(), |
7043 SlotSet::FREE_EMPTY_BUCKETS); | 7043 SlotSet::FREE_EMPTY_BUCKETS); |
7044 slots[chunk->area_end() - kPointerSize] = false; | 7044 slots[chunk->area_end() - kPointerSize] = false; |
7045 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7045 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7046 CHECK(slots[addr]); | 7046 CHECK(slots[addr]); |
7047 return KEEP_SLOT; | 7047 return KEEP_SLOT; |
7048 }); | 7048 }); |
7049 } | 7049 } |
7050 | 7050 |
| 7051 HEAP_TEST(Regress670675) { |
| 7052 if (!FLAG_incremental_marking) return; |
| 7053 CcTest::InitializeVM(); |
| 7054 v8::HandleScope scope(CcTest::isolate()); |
| 7055 Heap* heap = CcTest::heap(); |
| 7056 Isolate* isolate = heap->isolate(); |
| 7057 i::MarkCompactCollector* collector = heap->mark_compact_collector(); |
| 7058 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); |
| 7059 |
| 7060 if (collector->sweeping_in_progress()) { |
| 7061 collector->EnsureSweepingCompleted(); |
| 7062 } |
| 7063 i::IncrementalMarking* marking = CcTest::heap()->incremental_marking(); |
| 7064 if (marking->IsStopped()) { |
| 7065 marking->Start(i::GarbageCollectionReason::kTesting); |
| 7066 } |
| 7067 size_t array_length = Page::kPageSize / kPointerSize + 100; |
| 7068 size_t n = heap->OldGenerationSpaceAvailable() / array_length; |
| 7069 for (size_t i = 0; i < n + 10; i++) { |
| 7070 { |
| 7071 HandleScope inner_scope(isolate); |
| 7072 isolate->factory()->NewFixedArray(static_cast<int>(array_length)); |
| 7073 } |
| 7074 if (marking->IsStopped()) break; |
| 7075 double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1; |
| 7076 marking->AdvanceIncrementalMarking( |
| 7077 deadline, IncrementalMarking::GC_VIA_STACK_GUARD, |
| 7078 IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8); |
| 7079 } |
| 7080 DCHECK(marking->IsStopped()); |
| 7081 } |
| 7082 |
7051 } // namespace internal | 7083 } // namespace internal |
7052 } // namespace v8 | 7084 } // namespace v8 |
OLD | NEW |