[heap] Remove IncrementalMarking::StartBlackAllocationForTesting

Black allocation is already enabled when starting incremental marking.

Bug: v8:12775
Change-Id: I492c3ab89a3a3251ab005d2f3fc4ee46f28f5615
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820067
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82321}
This commit is contained in:
Dominik Inführ 2022-08-09 20:02:04 +02:00 committed by V8 LUCI CQ
parent 32f4b26816
commit de5dbbe553
4 changed files with 7 additions and 13 deletions

View File

@ -142,12 +142,6 @@ class V8_EXPORT_PRIVATE IncrementalMarking final {
bool black_allocation() { return black_allocation_; }
void StartBlackAllocationForTesting() {
if (!black_allocation_) {
StartBlackAllocation();
}
}
MarkingWorklists::Local* local_marking_worklists() const {
return collector_->local_marking_worklists();
}

View File

@ -6000,7 +6000,7 @@ TEST(Regress615489) {
i::GarbageCollectionReason::kTesting);
}
CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
{
AlwaysAllocateScopeForTesting always_allocate(heap);
v8::HandleScope inner(CcTest::isolate());
@ -6100,7 +6100,7 @@ TEST(LeftTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting);
}
CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area.
@ -6142,7 +6142,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting);
}
CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area.
@ -6211,7 +6211,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting);
}
CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area.
@ -6694,7 +6694,7 @@ HEAP_TEST(RegressMissingWriteBarrierInAllocate) {
AlwaysAllocateScopeForTesting always_allocate(heap);
map = isolate->factory()->NewMap(HEAP_NUMBER_TYPE, HeapNumber::kSize);
}
heap->incremental_marking()->StartBlackAllocationForTesting();
CHECK(heap->incremental_marking()->black_allocation());
Handle<HeapObject> object;
{
AlwaysAllocateScopeForTesting always_allocate(heap);

View File

@ -462,7 +462,7 @@ TEST(Regress5829) {
i::GarbageCollectionReason::kTesting);
}
CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
Handle<FixedArray> array =
isolate->factory()->NewFixedArray(10, AllocationType::kOld);
Address old_end = array->address() + array->Size();

View File

@ -2103,7 +2103,7 @@ TEST(CodeSerializerLargeCodeObjectWithIncrementalMarking) {
heap::ForceEvacuationCandidate(ec_page);
heap::SimulateIncrementalMarking(heap, false);
IncrementalMarking* marking = heap->incremental_marking();
marking->StartBlackAllocationForTesting();
CHECK(marking->black_allocation());
CHECK(marking->IsCompacting());
CHECK(MarkCompactCollector::IsOnEvacuationCandidate(*moving_object));