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

[heap] Use atomic marking state in all configs

Use an atomic marking state in all builds - even builds with concurrent
marking disabled. This will allow us to simplify our code a bit.

This CL starts by always using MajorMarkingState for
MarkCompactCollector::MarkingState and removing V8_ATOMIC_MARKING_STATE.

Bug: v8:12470
Change-Id: I88a65647fb2142a63b2b51fc21391c8ef1baa82d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3314864
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78241}
parent ce9453bb
......@@ -44,7 +44,6 @@ config_setting(
# v8_enable_trace_baseline_exec
# v8_enable_trace_feedback_updates
# v8_enable_atomic_object_field_writes
# v8_enable_atomic_marking_state
# v8_enable_concurrent_marking
# v8_enable_ignition_dispatch_counting
# v8_enable_builtins_profiling
......
......@@ -146,11 +146,8 @@ declare_args() {
# into relaxed atomic operations.
v8_enable_atomic_object_field_writes = ""
# Sets -dV8_ATOMIC_MARKING_STATE
v8_enable_atomic_marking_state = ""
# Controls the default values of v8_enable_atomic_object_field_writes and
# v8_enable_concurrent_marking_state. See the default setting code below.
# Controls the default value of v8_enable_concurrent_marking_state. See the
# default setting code below.
v8_enable_concurrent_marking = true
# Sets -dV8_IGNITION_DISPATCH_COUNTING.
......@@ -430,9 +427,6 @@ if (v8_enable_single_generation == "") {
if (v8_enable_atomic_object_field_writes == "") {
v8_enable_atomic_object_field_writes = v8_enable_concurrent_marking
}
if (v8_enable_atomic_marking_state == "") {
v8_enable_atomic_marking_state = v8_enable_concurrent_marking
}
if (v8_enable_third_party_heap) {
v8_disable_write_barriers = true
v8_enable_single_generation = true
......@@ -446,8 +440,6 @@ if (v8_enable_single_generation) {
}
assert(!v8_enable_concurrent_marking || v8_enable_atomic_object_field_writes,
"Concurrent marking requires atomic object field writes.")
assert(!v8_enable_concurrent_marking || v8_enable_atomic_marking_state,
"Concurrent marking requires atomic marking state.")
if (v8_enable_trace_unoptimized == "") {
v8_enable_trace_unoptimized =
v8_enable_trace_ignition || v8_enable_trace_baseline_exec
......@@ -904,9 +896,6 @@ config("features") {
if (v8_enable_atomic_object_field_writes) {
defines += [ "V8_ATOMIC_OBJECT_FIELD_WRITES" ]
}
if (v8_enable_atomic_marking_state) {
defines += [ "V8_ATOMIC_MARKING_STATE" ]
}
if (v8_enable_ignition_dispatch_counting) {
defines += [ "V8_IGNITION_DISPATCH_COUNTING" ]
}
......@@ -2201,7 +2190,6 @@ action("v8_dump_build_config") {
"is_ubsan_vptr=$is_ubsan_vptr",
"target_cpu=\"$target_cpu\"",
"v8_current_cpu=\"$v8_current_cpu\"",
"v8_enable_atomic_marking_state=$v8_enable_atomic_marking_state",
"v8_enable_atomic_object_field_writes=" +
"$v8_enable_atomic_object_field_writes",
"v8_enable_concurrent_marking=$v8_enable_concurrent_marking",
......
......@@ -434,10 +434,6 @@ ConcurrentMarking::ConcurrentMarking(Heap* heap,
: heap_(heap),
marking_worklists_(marking_worklists),
weak_objects_(weak_objects) {
#ifndef V8_ATOMIC_MARKING_STATE
// Concurrent and parallel marking require atomic marking state.
CHECK(!FLAG_concurrent_marking && !FLAG_parallel_marking);
#endif
#ifndef V8_ATOMIC_OBJECT_FIELD_WRITES
// Concurrent marking requires atomic object field writes.
CHECK(!FLAG_concurrent_marking);
......
......@@ -81,11 +81,7 @@ class V8_EXPORT_PRIVATE IncrementalMarking final {
static constexpr size_t kEmbedderActivationThreshold = 0;
#endif
#ifdef V8_ATOMIC_MARKING_STATE
static const AccessMode kAtomicity = AccessMode::ATOMIC;
#else
static const AccessMode kAtomicity = AccessMode::NON_ATOMIC;
#endif
IncrementalMarking(Heap* heap, WeakObjects* weak_objects);
......
......@@ -444,11 +444,7 @@ class MainMarkingVisitor final
// Collector for young and old generation.
class MarkCompactCollector final : public MarkCompactCollectorBase {
public:
#ifdef V8_ATOMIC_MARKING_STATE
using MarkingState = MajorMarkingState;
#else
using MarkingState = MajorNonAtomicMarkingState;
#endif // V8_ATOMIC_MARKING_STATE
using AtomicMarkingState = MajorAtomicMarkingState;
using NonAtomicMarkingState = MajorNonAtomicMarkingState;
......
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