chromium/v8/src/heap/cppgc/concurrent-marker.cc

// Copyright 2020 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/cppgc/concurrent-marker.h"

#include "include/cppgc/platform.h"
#include "src/heap/cppgc/heap-base.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/marking-state.h"
#include "src/heap/cppgc/marking-visitor.h"
#include "src/heap/cppgc/stats-collector.h"

namespace cppgc {
namespace internal {

namespace {

static constexpr double kMarkingScheduleRatioBeforeConcurrentPriorityIncrease =;

static constexpr size_t kDefaultDeadlineCheckInterval =;

template <size_t kDeadlineCheckInterval = kDefaultDeadlineCheckInterval,
          typename WorklistLocal, typename Callback>
bool DrainWorklistWithYielding(
    JobDelegate* job_delegate, ConcurrentMarkingState& marking_state,
    heap::base::IncrementalMarkingSchedule& incremental_marking_schedule,
    WorklistLocal& worklist_local, Callback callback) {}

size_t WorkSizeForConcurrentMarking(MarkingWorklists& marking_worklists) {}

// Checks whether worklists' global pools hold any segment a concurrent marker
// can steal. This is called before the concurrent marker holds any Locals, so
// no need to check local segments.
bool HasWorkForConcurrentMarking(MarkingWorklists& marking_worklists) {}

class ConcurrentMarkingTask final : public v8::JobTask {};

ConcurrentMarkingTask::ConcurrentMarkingTask(
    ConcurrentMarkerBase& concurrent_marker)
    :{}

void ConcurrentMarkingTask::Run(JobDelegate* job_delegate) {}

size_t ConcurrentMarkingTask::GetMaxConcurrency(
    size_t current_worker_count) const {}

void ConcurrentMarkingTask::ProcessWorklists(
    JobDelegate* job_delegate, ConcurrentMarkingState& concurrent_marking_state,
    Visitor& concurrent_marking_visitor) {}

}  // namespace

ConcurrentMarkerBase::ConcurrentMarkerBase(
    HeapBase& heap, MarkingWorklists& marking_worklists,
    heap::base::IncrementalMarkingSchedule& incremental_marking_schedule,
    cppgc::Platform* platform)
    :{}

void ConcurrentMarkerBase::Start() {}

bool ConcurrentMarkerBase::Join() {}

bool ConcurrentMarkerBase::Cancel() {}

bool ConcurrentMarkerBase::IsActive() const {}

ConcurrentMarkerBase::~ConcurrentMarkerBase() {}

void ConcurrentMarkerBase::NotifyIncrementalMutatorStepCompleted() {}

void ConcurrentMarkerBase::NotifyOfWorkIfNeeded(cppgc::TaskPriority priority) {}

void ConcurrentMarkerBase::IncreaseMarkingPriorityIfNeeded() {}

std::unique_ptr<Visitor> ConcurrentMarker::CreateConcurrentMarkingVisitor(
    ConcurrentMarkingState& marking_state) const {}

}  // namespace internal
}  // namespace cppgc