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 6662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6673 CHECK(page->markbits()->AllBitsSetInRange( | 6673 CHECK(page->markbits()->AllBitsSetInRange( |
6674 page->AddressToMarkbitIndex(start_address), | 6674 page->AddressToMarkbitIndex(start_address), |
6675 page->AddressToMarkbitIndex(end_address))); | 6675 page->AddressToMarkbitIndex(end_address))); |
6676 CHECK(heap->old_space()->Contains(*array)); | 6676 CHECK(heap->old_space()->Contains(*array)); |
6677 | 6677 |
6678 // Trim it once by one word to make checking for white marking color uniform. | 6678 // Trim it once by one word to make checking for white marking color uniform. |
6679 Address previous = end_address - kPointerSize; | 6679 Address previous = end_address - kPointerSize; |
6680 heap->RightTrimFixedArray(*array, 1); | 6680 heap->RightTrimFixedArray(*array, 1); |
6681 HeapObject* filler = HeapObject::FromAddress(previous); | 6681 HeapObject* filler = HeapObject::FromAddress(previous); |
6682 CHECK(filler->IsFiller()); | 6682 CHECK(filler->IsFiller()); |
6683 CHECK(Marking::IsImpossible(ObjectMarking::MarkBitFrom(previous))); | 6683 CHECK(Marking::IsImpossible(ObjectMarking::MarkBitFrom(filler))); |
6684 | 6684 |
6685 // Trim 10 times by one, two, and three word. | 6685 // Trim 10 times by one, two, and three word. |
6686 for (int i = 1; i <= 3; i++) { | 6686 for (int i = 1; i <= 3; i++) { |
6687 for (int j = 0; j < 10; j++) { | 6687 for (int j = 0; j < 10; j++) { |
6688 previous -= kPointerSize * i; | 6688 previous -= kPointerSize * i; |
6689 heap->RightTrimFixedArray(*array, i); | 6689 heap->RightTrimFixedArray(*array, i); |
6690 HeapObject* filler = HeapObject::FromAddress(previous); | 6690 HeapObject* filler = HeapObject::FromAddress(previous); |
6691 CHECK(filler->IsFiller()); | 6691 CHECK(filler->IsFiller()); |
6692 CHECK(Marking::IsWhite(ObjectMarking::MarkBitFrom(previous))); | 6692 CHECK(Marking::IsWhite(ObjectMarking::MarkBitFrom(filler))); |
6693 } | 6693 } |
6694 } | 6694 } |
6695 | 6695 |
6696 heap::GcAndSweep(heap, OLD_SPACE); | 6696 heap::GcAndSweep(heap, OLD_SPACE); |
6697 } | 6697 } |
6698 | 6698 |
6699 TEST(Regress618958) { | 6699 TEST(Regress618958) { |
6700 if (!i::FLAG_incremental_marking) return; | 6700 if (!i::FLAG_incremental_marking) return; |
6701 CcTest::InitializeVM(); | 6701 CcTest::InitializeVM(); |
6702 v8::HandleScope scope(CcTest::isolate()); | 6702 v8::HandleScope scope(CcTest::isolate()); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6832 double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1; | 6832 double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1; |
6833 marking->AdvanceIncrementalMarking( | 6833 marking->AdvanceIncrementalMarking( |
6834 deadline, IncrementalMarking::GC_VIA_STACK_GUARD, | 6834 deadline, IncrementalMarking::GC_VIA_STACK_GUARD, |
6835 IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8); | 6835 IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8); |
6836 } | 6836 } |
6837 DCHECK(marking->IsStopped()); | 6837 DCHECK(marking->IsStopped()); |
6838 } | 6838 } |
6839 | 6839 |
6840 } // namespace internal | 6840 } // namespace internal |
6841 } // namespace v8 | 6841 } // namespace v8 |
OLD | NEW |