0

Revert "[PA] Add partition_alloc_optimized_debug to partition_alloc.gni."

This reverts commit 4ef79b5f84.

Reason for revert: Seems to have increased duration of browser tests by about 20%, see chromium:1455341

Original change's description:
> [PA] Add partition_alloc_optimized_debug to partition_alloc.gni.
>
> Add partition_alloc_optimized_debug to PartitionAlloc to enable
> PartitionAlloc-Everywhere on Linux debug build. This is the same way
> as v8 does, i.e. v8_optimized_debug.
>
> Bug: 1151236, 1449923, 1429450
>
> Change-Id: I6abfbdb3d0ef11104ec7ccf9edcaef4e21ddb1f4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4599609
> Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
> Commit-Queue: Takashi Sakamoto <tasak@google.com>
> Cr-Commit-Position: refs/heads/main@{#1158006}

Bug: 1151236, 1449923, 1429450, 1455341
Change-Id: Ida8e829f92f538412c3455a6cc4b6026d6360790
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4620228
Owners-Override: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1158730}
This commit is contained in:
Antonio Sartori
2023-06-16 10:00:39 +00:00
committed by Chromium LUCI CQ
parent 1c12e916b5
commit ebd57a5ea7
3 changed files with 6 additions and 14 deletions
base/allocator/partition_allocator
build_overrides

@ -373,12 +373,9 @@ component("partition_alloc") {
# Partition alloc is relatively hot (>1% of cycles for users of CrOS). Use speed-focused
# optimizations for it.
if (!is_debug || partition_alloc_optimized_debug) {
if (!is_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_speed" ]
} else {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:no_optimize" ]
}
# We want to be able to test pkey mode without access to the default pkey.

@ -52,16 +52,6 @@ declare_args() {
}
declare_args() {
# Turns on compiler optimizations in PartitionAlloc in Debug build.
# If enabling PartitionAlloc-Everywhere in Debug build for tests in Debug
# build, since all memory allocations and deallocations are executed by
# non-optimized PartitionAlloc, chrome (including tests) will be much
# slower. This will cause debug trybots' timeouts. If we want to debug
# PartitionAlloc itself, use partition_alloc_optimized_debug=false.
# Otherwise, use partition_alloc_optimized_debug=true to enable optimized
# PartitionAlloc.
partition_alloc_optimized_debug = true
# PartitionAlloc-Everywhere (PA-E).
use_partition_alloc_as_malloc =
use_partition_alloc && use_partition_alloc_as_malloc_default

@ -37,8 +37,13 @@ _is_using_sanitizers = is_asan || is_hwasan || is_lsan || is_tsan || is_msan
# - Component build support is disabled on all platforms except Linux. It is
# known to cause issues on some (e.g. Windows with shims, Android with
# non-universal symbol wrapping), and has not been validated on others.
# - Disable on Linux when component and debug build are used together, because
# PA-E caused lots of timeouts on Linux Tests(dbg).
# TODO(crbug.com/1429450): fix the timeout issue and enable on linux debug
# and component build.
# - Windows: debug CRT is not compatible, see below.
_disable_partition_alloc_everywhere =
(is_linux && is_component_build && is_debug) ||
(!is_linux && is_component_build) || (is_win && is_debug)
# - NaCl: No plans to support it.