[heap] Disable shared heap when write barriers are disabled

Shared heap requires write barriers to keep track of old to shared
references.

This CL also disables all shared-memory/* mjsunit tests for single
generation configurations. These tests generally should not work
since the single generation bot also disables write barriers.
This should resolve the remaining single generation failures.

Bug: v8:11708, v8:13322
Change-Id: Ie0b0cbbc782afb607c1d13ccb4edcb2672ebf51b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3934770
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83528}
This commit is contained in:
Omer Katz 2022-10-05 00:48:17 +02:00 committed by V8 LUCI CQ
parent c3dffe6e2b
commit 572f55a4ad
3 changed files with 10 additions and 10 deletions

View File

@ -113,9 +113,10 @@ namespace internal {
#define COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL false
#endif
#if defined(V8_SHARED_RO_HEAP) && \
(!defined(V8_COMPRESS_POINTERS) || \
defined(V8_COMPRESS_POINTERS_IN_SHARED_CAGE))
#if defined(V8_SHARED_RO_HEAP) && \
(!defined(V8_COMPRESS_POINTERS) || \
defined(V8_COMPRESS_POINTERS_IN_SHARED_CAGE)) && \
!defined(V8_DISABLE_WRITE_BARRIERS)
#define V8_CAN_CREATE_SHARED_HEAP_BOOL true
#else
#define V8_CAN_CREATE_SHARED_HEAP_BOOL false

View File

@ -3279,13 +3279,15 @@ Isolate* Isolate::GetProcessWideSharedIsolate(bool* created_shared_isolate) {
DCHECK(HasFlagThatRequiresSharedHeap());
FATAL(
"Build configuration does not support creating shared heap. The RO "
"heap must be shared, and pointer compression must either be off or "
"use a shared cage. V8 is compiled with RO heap %s and pointers %s.",
"heap must be shared, pointer compression must either be off or "
"use a shared cage, and write barriers must not be disabled. V8 is "
"compiled with RO heap %s, pointers %s and write barriers %s.",
V8_SHARED_RO_HEAP_BOOL ? "SHARED" : "NOT SHARED",
!COMPRESS_POINTERS_BOOL ? "NOT COMPRESSED"
: (COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL
? "COMPRESSED IN SHARED CAGE"
: "COMPRESSED IN PER-ISOLATE CAGE"));
: "COMPRESSED IN PER-ISOLATE CAGE"),
V8_DISABLE_WRITE_BARRIERS_BOOL ? "DISABLED" : "ENABLED");
}
base::MutexGuard guard(process_wide_shared_isolate_mutex_.Pointer());

View File

@ -1563,10 +1563,7 @@
'es6/collections-constructor-*': [SKIP],
'es6/map-constructor-entry-side-effect*': [SKIP],
'shared-memory/shared-string-promotion-minor': [SKIP],
'shared-memory/shared-string-promotion-major': [SKIP],
'shared-memory/shared-string-in-code-object': [SKIP],
'shared-memory/shared-string-in-weak-map': [SKIP],
'shared-memory/*': [SKIP],
}], # single_generation
################################################################################