ad54f1bb17
This moves from Blink: 1) implementation of the marking write barrier; 2) WriteBarrierWorklist to Marker; 3) incremental/concurrent marking options. Bug: chromium:1056170 Change-Id: Ia3e31ffd920a99803420b1453695fe2fb8d843b8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218064 Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#68108}
35 lines
920 B
C++
35 lines
920 B
C++
// 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.
|
|
|
|
#ifndef INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_
|
|
#define INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_
|
|
|
|
#include "cppgc/internal/atomic-entry-flag.h"
|
|
#include "v8config.h" // NOLINT(build/include_directory)
|
|
|
|
namespace cppgc {
|
|
namespace internal {
|
|
|
|
class V8_EXPORT ProcessHeap final {
|
|
public:
|
|
static void EnterIncrementalOrConcurrentMarking() {
|
|
concurrent_marking_flag_.Enter();
|
|
}
|
|
static void ExitIncrementalOrConcurrentMarking() {
|
|
concurrent_marking_flag_.Exit();
|
|
}
|
|
|
|
static bool IsAnyIncrementalOrConcurrentMarking() {
|
|
return concurrent_marking_flag_.MightBeEntered();
|
|
}
|
|
|
|
private:
|
|
static AtomicEntryFlag concurrent_marking_flag_;
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace cppgc
|
|
|
|
#endif // INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_
|