[heap] Turn on RO_SPACE sharing for pointer compression

Makes the read-only space sharing the default even with pointer
compression if on Linux, Android or Chrome OS.

This won't have any immediate impact on Chrome since the platform page
allocator in chrome does not yet support allocation and remapping of
shared pages.

Bug: v8:10454
Change-Id: I3bc57080827efe38095a4bb1d02a53518727056a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454077
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70383}
This commit is contained in:
Dan Elphick 2020-10-07 11:29:15 +01:00 committed by Commit Bot
parent 14f17729e9
commit bbecd8d5b3

View File

@ -350,7 +350,8 @@ if (v8_multi_arch_build &&
v8_enable_pointer_compression = !v8_enable_pointer_compression
}
if (v8_enable_shared_ro_heap == "") {
v8_enable_shared_ro_heap = !v8_enable_pointer_compression
v8_enable_shared_ro_heap =
!v8_enable_pointer_compression || (is_linux || is_chromeos || is_android)
}
assert(!v8_disable_write_barriers || v8_enable_single_generation,
@ -365,7 +366,7 @@ assert(v8_current_cpu == "arm64" || !v8_control_flow_integrity,
if (v8_enable_shared_ro_heap && v8_enable_pointer_compression) {
assert(
is_linux || is_chromeos || is_android,
"Sharing read-only heap with pointer compression is only supported on Linux or Android")
"Sharing read-only heap with pointer compression is only supported on Linux/Android/ChromeOS")
}
assert(!v8_use_multi_snapshots || !v8_control_flow_integrity,