Commit de5dbbe5 authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[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: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82321}
parent 32f4b268
...@@ -142,12 +142,6 @@ class V8_EXPORT_PRIVATE IncrementalMarking final { ...@@ -142,12 +142,6 @@ class V8_EXPORT_PRIVATE IncrementalMarking final {
bool black_allocation() { return black_allocation_; } bool black_allocation() { return black_allocation_; }
void StartBlackAllocationForTesting() {
if (!black_allocation_) {
StartBlackAllocation();
}
}
MarkingWorklists::Local* local_marking_worklists() const { MarkingWorklists::Local* local_marking_worklists() const {
return collector_->local_marking_worklists(); return collector_->local_marking_worklists();
} }
......
...@@ -6000,7 +6000,7 @@ TEST(Regress615489) { ...@@ -6000,7 +6000,7 @@ TEST(Regress615489) {
i::GarbageCollectionReason::kTesting); i::GarbageCollectionReason::kTesting);
} }
CHECK(marking->IsMarking()); CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
{ {
AlwaysAllocateScopeForTesting always_allocate(heap); AlwaysAllocateScopeForTesting always_allocate(heap);
v8::HandleScope inner(CcTest::isolate()); v8::HandleScope inner(CcTest::isolate());
...@@ -6100,7 +6100,7 @@ TEST(LeftTrimFixedArrayInBlackArea) { ...@@ -6100,7 +6100,7 @@ TEST(LeftTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting); i::GarbageCollectionReason::kTesting);
} }
CHECK(marking->IsMarking()); CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and // Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area. // perform the allocation in a black area.
...@@ -6142,7 +6142,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) { ...@@ -6142,7 +6142,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting); i::GarbageCollectionReason::kTesting);
} }
CHECK(marking->IsMarking()); CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and // Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area. // perform the allocation in a black area.
...@@ -6211,7 +6211,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) { ...@@ -6211,7 +6211,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
i::GarbageCollectionReason::kTesting); i::GarbageCollectionReason::kTesting);
} }
CHECK(marking->IsMarking()); CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
// Ensure that we allocate a new page, set up a bump pointer area, and // Ensure that we allocate a new page, set up a bump pointer area, and
// perform the allocation in a black area. // perform the allocation in a black area.
...@@ -6694,7 +6694,7 @@ HEAP_TEST(RegressMissingWriteBarrierInAllocate) { ...@@ -6694,7 +6694,7 @@ HEAP_TEST(RegressMissingWriteBarrierInAllocate) {
AlwaysAllocateScopeForTesting always_allocate(heap); AlwaysAllocateScopeForTesting always_allocate(heap);
map = isolate->factory()->NewMap(HEAP_NUMBER_TYPE, HeapNumber::kSize); map = isolate->factory()->NewMap(HEAP_NUMBER_TYPE, HeapNumber::kSize);
} }
heap->incremental_marking()->StartBlackAllocationForTesting(); CHECK(heap->incremental_marking()->black_allocation());
Handle<HeapObject> object; Handle<HeapObject> object;
{ {
AlwaysAllocateScopeForTesting always_allocate(heap); AlwaysAllocateScopeForTesting always_allocate(heap);
......
...@@ -462,7 +462,7 @@ TEST(Regress5829) { ...@@ -462,7 +462,7 @@ TEST(Regress5829) {
i::GarbageCollectionReason::kTesting); i::GarbageCollectionReason::kTesting);
} }
CHECK(marking->IsMarking()); CHECK(marking->IsMarking());
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
Handle<FixedArray> array = Handle<FixedArray> array =
isolate->factory()->NewFixedArray(10, AllocationType::kOld); isolate->factory()->NewFixedArray(10, AllocationType::kOld);
Address old_end = array->address() + array->Size(); Address old_end = array->address() + array->Size();
......
...@@ -2103,7 +2103,7 @@ TEST(CodeSerializerLargeCodeObjectWithIncrementalMarking) { ...@@ -2103,7 +2103,7 @@ TEST(CodeSerializerLargeCodeObjectWithIncrementalMarking) {
heap::ForceEvacuationCandidate(ec_page); heap::ForceEvacuationCandidate(ec_page);
heap::SimulateIncrementalMarking(heap, false); heap::SimulateIncrementalMarking(heap, false);
IncrementalMarking* marking = heap->incremental_marking(); IncrementalMarking* marking = heap->incremental_marking();
marking->StartBlackAllocationForTesting(); CHECK(marking->black_allocation());
CHECK(marking->IsCompacting()); CHECK(marking->IsCompacting());
CHECK(MarkCompactCollector::IsOnEvacuationCandidate(*moving_object)); CHECK(MarkCompactCollector::IsOnEvacuationCandidate(*moving_object));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment