chromium/v8/src/heap/incremental-marking.cc

// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/heap/incremental-marking.h"

#include <inttypes.h>

#include <cmath>
#include <optional>

#include "src/base/logging.h"
#include "src/base/platform/time.h"
#include "src/common/globals.h"
#include "src/execution/vm-state-inl.h"
#include "src/flags/flags.h"
#include "src/handles/global-handles.h"
#include "src/heap/base/incremental-marking-schedule.h"
#include "src/heap/concurrent-marking.h"
#include "src/heap/gc-tracer-inl.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap.h"
#include "src/heap/incremental-marking-job.h"
#include "src/heap/mark-compact.h"
#include "src/heap/marking-barrier.h"
#include "src/heap/marking-visitor-inl.h"
#include "src/heap/marking-visitor.h"
#include "src/heap/memory-chunk-layout.h"
#include "src/heap/minor-mark-sweep.h"
#include "src/heap/mutable-page-metadata.h"
#include "src/heap/objects-visiting-inl.h"
#include "src/heap/objects-visiting.h"
#include "src/heap/safepoint.h"
#include "src/init/v8.h"
#include "src/logging/runtime-call-stats-scope.h"
#include "src/numbers/conversions.h"
#include "src/objects/data-handler-inl.h"
#include "src/objects/slots-inl.h"
#include "src/objects/visitors.h"
#include "src/tracing/trace-event.h"
#include "src/utils/utils.h"

namespace v8 {
namespace internal {

namespace {

static constexpr size_t kMajorGCYoungGenerationAllocationObserverStep =;
static constexpr size_t kMajorGCOldGenerationAllocationObserverStep =;

static constexpr v8::base::TimeDelta kMaxStepSizeOnTask =;
static constexpr v8::base::TimeDelta kMaxStepSizeOnAllocation =;

#ifndef DEBUG
static constexpr size_t kV8ActivationThreshold = 8 * MB;
static constexpr size_t kEmbedderActivationThreshold = 8 * MB;
#else
static constexpr size_t kV8ActivationThreshold =;
static constexpr size_t kEmbedderActivationThreshold =;
#endif  // DEBUG

base::TimeDelta GetMaxDuration(StepOrigin step_origin) {}

}  // namespace

IncrementalMarking::Observer::Observer(IncrementalMarking* incremental_marking,
                                       intptr_t step_size)
    :{}

void IncrementalMarking::Observer::Step(int, Address, size_t) {}

IncrementalMarking::IncrementalMarking(Heap* heap, WeakObjects* weak_objects)
    :{}

void IncrementalMarking::MarkBlackBackground(Tagged<HeapObject> obj,
                                             int object_size) {}

bool IncrementalMarking::CanAndShouldBeStarted() const {}

bool IncrementalMarking::CanBeStarted() const {}

bool IncrementalMarking::IsBelowActivationThresholds() const {}

void IncrementalMarking::Start(GarbageCollector garbage_collector,
                               GarbageCollectionReason gc_reason) {}

void IncrementalMarking::MarkRoots() {}

void IncrementalMarking::MarkRootsForTesting() {}

void IncrementalMarking::StartMarkingMajor() {}

void IncrementalMarking::StartMarkingMinor() {}

void IncrementalMarking::StartBlackAllocation() {}

void IncrementalMarking::PauseBlackAllocation() {}

void IncrementalMarking::FinishBlackAllocation() {}

void IncrementalMarking::StartPointerTableBlackAllocation() {}

void IncrementalMarking::StopPointerTableBlackAllocation() {}

void IncrementalMarking::UpdateMarkingWorklistAfterScavenge() {}

void IncrementalMarking::UpdateExternalPointerTableAfterScavenge() {}

void IncrementalMarking::UpdateMarkedBytesAfterScavenge(
    size_t dead_bytes_in_new_space) {}

v8::base::TimeDelta IncrementalMarking::EmbedderStep(
    v8::base::TimeDelta expected_duration) {}

bool IncrementalMarking::Stop() {}

size_t IncrementalMarking::OldGenerationSizeOfObjects() const {}

bool IncrementalMarking::ShouldWaitForTask() {}

bool IncrementalMarking::TryInitializeTaskTimeout() {}

size_t IncrementalMarking::GetScheduledBytes(StepOrigin step_origin) {}

void IncrementalMarking::AdvanceAndFinalizeIfComplete() {}

void IncrementalMarking::AdvanceAndFinalizeIfNecessary() {}

void IncrementalMarking::AdvanceForTesting(v8::base::TimeDelta max_duration,
                                           size_t max_bytes_to_mark) {}

bool IncrementalMarking::IsAheadOfSchedule() const {}

void IncrementalMarking::AdvanceOnAllocation() {}

bool IncrementalMarking::ShouldFinalize() const {}

void IncrementalMarking::FetchBytesMarkedConcurrently() {}

void IncrementalMarking::Step(v8::base::TimeDelta max_duration,
                              size_t max_bytes_to_process,
                              StepOrigin step_origin) {}

Isolate* IncrementalMarking::isolate() const {}

IncrementalMarking::PauseBlackAllocationScope::PauseBlackAllocationScope(
    IncrementalMarking* marking)
    :{}

IncrementalMarking::PauseBlackAllocationScope::~PauseBlackAllocationScope() {}

}  // namespace internal
}  // namespace v8