656c68a781
This reverts commit d4056c61d5
.
Reason for revert: Fails on GCC, please check https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20gcc/6184
Original change's description:
> cppgc: Add page memory allocation backend
>
> This is a port of src/components/gc that was added recently.
>
> Differences:
> - Added back bucketing to the page pool, as that guarantees that
> arenas used for specific types do not have their pages used by other
> arenas.
> - Replaced base::flat_map with std::map. This may cause performance
> regressions when using PageMemoryRegionTree in hot paths. A
> vector-like representation may be used to fix such a regression
>
> Bug: chromium:1056170
> Change-Id: I03e3abe55faf7bb50c8011dafc23396889bf66db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2139586
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67073}
TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,bikineev@chromium.org,omerkatz@chromium.org
Change-Id: I1e421898bb8a08f32d8eb2355ed547e0ee38b429
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2140949
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67074}
380 lines
12 KiB
Plaintext
380 lines
12 KiB
Plaintext
# Copyright 2016 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.
|
|
|
|
import("../../gni/v8.gni")
|
|
|
|
if (is_fuchsia) {
|
|
import("//build/config/fuchsia/rules.gni")
|
|
|
|
cr_fuchsia_package("v8_unittests_pkg") {
|
|
testonly = true
|
|
binary = ":unittests"
|
|
package_name_override = "v8_unittests"
|
|
}
|
|
|
|
fuchsia_package_runner("v8_unittests_fuchsia") {
|
|
testonly = true
|
|
package = ":v8_unittests_pkg"
|
|
package_name_override = "v8_unittests"
|
|
}
|
|
}
|
|
|
|
# Stand-alone target for C++ GC unittests. This is used to ensure that it
|
|
# builds without V8 as well. They are also included in the regular unittests
|
|
# target for simplicity.
|
|
v8_executable("cppgc_unittests") {
|
|
testonly = true
|
|
|
|
configs = [
|
|
"../..:external_config",
|
|
"../..:internal_config_base",
|
|
]
|
|
|
|
sources = [ "heap/cppgc/run-all-unittests.cc" ]
|
|
|
|
deps = [
|
|
":cppgc_unittests_sources",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
|
|
v8_source_set("cppgc_unittests_sources") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"heap/cppgc/finalizer-trait_unittest.cc",
|
|
"heap/cppgc/garbage-collected_unittest.cc",
|
|
"heap/cppgc/gc-info_unittest.cc",
|
|
"heap/cppgc/heap-object-header_unittest.cc",
|
|
"heap/cppgc/heap_unittest.cc",
|
|
"heap/cppgc/member_unittests.cc",
|
|
"heap/cppgc/source-location_unittest.cc",
|
|
"heap/cppgc/stack_unittest.cc",
|
|
"heap/cppgc/tests.cc",
|
|
"heap/cppgc/tests.h",
|
|
"heap/cppgc/visitor_unittest.cc",
|
|
]
|
|
|
|
configs = [
|
|
"../..:external_config",
|
|
"../..:internal_config_base",
|
|
"../..:cppgc_base_config",
|
|
]
|
|
|
|
deps = [
|
|
"../..:cppgc_for_testing",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
|
|
v8_executable("unittests") {
|
|
testonly = true
|
|
|
|
# TODO(machenbach): Translate from gyp.
|
|
#['OS=="aix"', {
|
|
# 'ldflags': [ '-Wl,-bbigtoc' ],
|
|
#}],
|
|
|
|
deps = [
|
|
":cppgc_unittests_sources",
|
|
":unittests_sources",
|
|
"../..:v8_for_testing",
|
|
"../..:v8_libbase",
|
|
"../..:v8_libplatform",
|
|
"//build/win:default_exe_manifest",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
|
|
data_deps = [ "../../tools:v8_testrunner" ]
|
|
|
|
data = [
|
|
"testcfg.py",
|
|
"unittests.status",
|
|
]
|
|
|
|
configs = [
|
|
"../..:external_config",
|
|
"../..:internal_config_base",
|
|
]
|
|
}
|
|
|
|
v8_source_set("unittests_sources") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"../../test/common/assembler-tester.h",
|
|
"../../test/common/wasm/wasm-macro-gen.h",
|
|
"../../testing/gmock-support.h",
|
|
"../../testing/gtest-support.h",
|
|
"api/access-check-unittest.cc",
|
|
"api/exception-unittest.cc",
|
|
"api/interceptor-unittest.cc",
|
|
"api/isolate-unittest.cc",
|
|
"api/remote-object-unittest.cc",
|
|
"api/resource-constraints-unittest.cc",
|
|
"api/v8-object-unittest.cc",
|
|
"asmjs/asm-scanner-unittest.cc",
|
|
"asmjs/asm-types-unittest.cc",
|
|
"base/address-region-unittest.cc",
|
|
"base/atomic-utils-unittest.cc",
|
|
"base/bits-unittest.cc",
|
|
"base/cpu-unittest.cc",
|
|
"base/division-by-constant-unittest.cc",
|
|
"base/flags-unittest.cc",
|
|
"base/functional-unittest.cc",
|
|
"base/ieee754-unittest.cc",
|
|
"base/iterator-unittest.cc",
|
|
"base/list-unittest.cc",
|
|
"base/logging-unittest.cc",
|
|
"base/macros-unittest.cc",
|
|
"base/ostreams-unittest.cc",
|
|
"base/platform/condition-variable-unittest.cc",
|
|
"base/platform/mutex-unittest.cc",
|
|
"base/platform/platform-unittest.cc",
|
|
"base/platform/semaphore-unittest.cc",
|
|
"base/platform/time-unittest.cc",
|
|
"base/region-allocator-unittest.cc",
|
|
"base/sys-info-unittest.cc",
|
|
"base/template-utils-unittest.cc",
|
|
"base/threaded-list-unittest.cc",
|
|
"base/utils/random-number-generator-unittest.cc",
|
|
"base/vlq-base64-unittest.cc",
|
|
"codegen/code-stub-assembler-unittest.cc",
|
|
"codegen/code-stub-assembler-unittest.h",
|
|
"codegen/register-configuration-unittest.cc",
|
|
"codegen/source-position-table-unittest.cc",
|
|
"compiler-dispatcher/compiler-dispatcher-unittest.cc",
|
|
"compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc",
|
|
"compiler/backend/instruction-selector-unittest.cc",
|
|
"compiler/backend/instruction-selector-unittest.h",
|
|
"compiler/backend/instruction-sequence-unittest.cc",
|
|
"compiler/backend/instruction-sequence-unittest.h",
|
|
"compiler/backend/instruction-unittest.cc",
|
|
"compiler/branch-elimination-unittest.cc",
|
|
"compiler/bytecode-analysis-unittest.cc",
|
|
"compiler/checkpoint-elimination-unittest.cc",
|
|
"compiler/common-operator-reducer-unittest.cc",
|
|
"compiler/common-operator-unittest.cc",
|
|
"compiler/compiler-test-utils.h",
|
|
"compiler/constant-folding-reducer-unittest.cc",
|
|
"compiler/control-equivalence-unittest.cc",
|
|
"compiler/control-flow-optimizer-unittest.cc",
|
|
"compiler/dead-code-elimination-unittest.cc",
|
|
"compiler/decompression-optimizer-unittest.cc",
|
|
"compiler/diamond-unittest.cc",
|
|
"compiler/effect-control-linearizer-unittest.cc",
|
|
"compiler/graph-reducer-unittest.cc",
|
|
"compiler/graph-reducer-unittest.h",
|
|
"compiler/graph-trimmer-unittest.cc",
|
|
"compiler/graph-unittest.cc",
|
|
"compiler/graph-unittest.h",
|
|
"compiler/int64-lowering-unittest.cc",
|
|
"compiler/js-call-reducer-unittest.cc",
|
|
"compiler/js-create-lowering-unittest.cc",
|
|
"compiler/js-intrinsic-lowering-unittest.cc",
|
|
"compiler/js-native-context-specialization-unittest.cc",
|
|
"compiler/js-operator-unittest.cc",
|
|
"compiler/js-typed-lowering-unittest.cc",
|
|
"compiler/linkage-tail-call-unittest.cc",
|
|
"compiler/load-elimination-unittest.cc",
|
|
"compiler/loop-peeling-unittest.cc",
|
|
"compiler/machine-operator-reducer-unittest.cc",
|
|
"compiler/machine-operator-unittest.cc",
|
|
"compiler/node-cache-unittest.cc",
|
|
"compiler/node-matchers-unittest.cc",
|
|
"compiler/node-properties-unittest.cc",
|
|
"compiler/node-test-utils.cc",
|
|
"compiler/node-test-utils.h",
|
|
"compiler/node-unittest.cc",
|
|
"compiler/opcodes-unittest.cc",
|
|
"compiler/persistent-unittest.cc",
|
|
"compiler/redundancy-elimination-unittest.cc",
|
|
"compiler/regalloc/live-range-unittest.cc",
|
|
"compiler/regalloc/move-optimizer-unittest.cc",
|
|
"compiler/regalloc/register-allocator-unittest.cc",
|
|
"compiler/schedule-unittest.cc",
|
|
"compiler/scheduler-rpo-unittest.cc",
|
|
"compiler/scheduler-unittest.cc",
|
|
"compiler/simplified-lowering-unittest.cc",
|
|
"compiler/simplified-operator-reducer-unittest.cc",
|
|
"compiler/simplified-operator-unittest.cc",
|
|
"compiler/state-values-utils-unittest.cc",
|
|
"compiler/typed-optimization-unittest.cc",
|
|
"compiler/typer-unittest.cc",
|
|
"compiler/value-numbering-reducer-unittest.cc",
|
|
"compiler/zone-stats-unittest.cc",
|
|
"date/date-cache-unittest.cc",
|
|
"diagnostics/eh-frame-iterator-unittest.cc",
|
|
"diagnostics/eh-frame-writer-unittest.cc",
|
|
"execution/microtask-queue-unittest.cc",
|
|
"heap/barrier-unittest.cc",
|
|
"heap/bitmap-test-utils.h",
|
|
"heap/bitmap-unittest.cc",
|
|
"heap/code-object-registry-unittest.cc",
|
|
"heap/embedder-tracing-unittest.cc",
|
|
"heap/gc-idle-time-handler-unittest.cc",
|
|
"heap/gc-tracer-unittest.cc",
|
|
"heap/heap-controller-unittest.cc",
|
|
"heap/heap-unittest.cc",
|
|
"heap/item-parallel-job-unittest.cc",
|
|
"heap/local-heap-unittest.cc",
|
|
"heap/marking-unittest.cc",
|
|
"heap/marking-worklist-unittest.cc",
|
|
"heap/memory-reducer-unittest.cc",
|
|
"heap/object-stats-unittest.cc",
|
|
"heap/off-thread-factory-unittest.cc",
|
|
"heap/safepoint-unittest.cc",
|
|
"heap/slot-set-unittest.cc",
|
|
"heap/spaces-unittest.cc",
|
|
"heap/unmapper-unittest.cc",
|
|
"heap/worklist-unittest.cc",
|
|
"interpreter/bytecode-array-builder-unittest.cc",
|
|
"interpreter/bytecode-array-iterator-unittest.cc",
|
|
"interpreter/bytecode-array-random-iterator-unittest.cc",
|
|
"interpreter/bytecode-array-writer-unittest.cc",
|
|
"interpreter/bytecode-decoder-unittest.cc",
|
|
"interpreter/bytecode-node-unittest.cc",
|
|
"interpreter/bytecode-operands-unittest.cc",
|
|
"interpreter/bytecode-register-allocator-unittest.cc",
|
|
"interpreter/bytecode-register-optimizer-unittest.cc",
|
|
"interpreter/bytecode-source-info-unittest.cc",
|
|
"interpreter/bytecode-utils.h",
|
|
"interpreter/bytecodes-unittest.cc",
|
|
"interpreter/constant-array-builder-unittest.cc",
|
|
"interpreter/interpreter-assembler-unittest.cc",
|
|
"interpreter/interpreter-assembler-unittest.h",
|
|
"libplatform/default-platform-unittest.cc",
|
|
"libplatform/default-worker-threads-task-runner-unittest.cc",
|
|
"libplatform/task-queue-unittest.cc",
|
|
"libplatform/worker-thread-unittest.cc",
|
|
"logging/counters-unittest.cc",
|
|
"numbers/bigint-unittest.cc",
|
|
"numbers/conversions-unittest.cc",
|
|
"objects/backing-store-unittest.cc",
|
|
"objects/object-unittest.cc",
|
|
"objects/osr-optimized-code-cache-unittest.cc",
|
|
"objects/value-serializer-unittest.cc",
|
|
"objects/weakarraylist-unittest.cc",
|
|
"parser/ast-value-unittest.cc",
|
|
"parser/preparser-unittest.cc",
|
|
"profiler/strings-storage-unittest.cc",
|
|
"regress/regress-crbug-1041240-unittest.cc",
|
|
"regress/regress-crbug-1056054-unittest.cc",
|
|
"regress/regress-crbug-938251-unittest.cc",
|
|
"run-all-unittests.cc",
|
|
"strings/char-predicates-unittest.cc",
|
|
"strings/unicode-unittest.cc",
|
|
"tasks/background-compile-task-unittest.cc",
|
|
"tasks/cancelable-tasks-unittest.cc",
|
|
"test-helpers.cc",
|
|
"test-helpers.h",
|
|
"test-utils.cc",
|
|
"test-utils.h",
|
|
"torque/earley-parser-unittest.cc",
|
|
"torque/ls-json-unittest.cc",
|
|
"torque/ls-message-unittest.cc",
|
|
"torque/ls-server-data-unittest.cc",
|
|
"torque/torque-unittest.cc",
|
|
"torque/torque-utils-unittest.cc",
|
|
"utils/allocation-unittest.cc",
|
|
"utils/detachable-vector-unittest.cc",
|
|
"utils/locked-queue-unittest.cc",
|
|
"utils/utils-unittest.cc",
|
|
"utils/vector-unittest.cc",
|
|
"wasm/control-transfer-unittest.cc",
|
|
"wasm/decoder-unittest.cc",
|
|
"wasm/function-body-decoder-unittest.cc",
|
|
"wasm/leb-helper-unittest.cc",
|
|
"wasm/loop-assignment-analysis-unittest.cc",
|
|
"wasm/module-decoder-unittest.cc",
|
|
"wasm/streaming-decoder-unittest.cc",
|
|
"wasm/wasm-code-manager-unittest.cc",
|
|
"wasm/wasm-compiler-unittest.cc",
|
|
"wasm/wasm-macro-gen-unittest.cc",
|
|
"wasm/wasm-module-builder-unittest.cc",
|
|
"wasm/wasm-module-sourcemap-unittest.cc",
|
|
"wasm/wasm-opcodes-unittest.cc",
|
|
"zone/zone-allocator-unittest.cc",
|
|
"zone/zone-chunk-list-unittest.cc",
|
|
"zone/zone-unittest.cc",
|
|
]
|
|
|
|
if (v8_current_cpu == "arm") {
|
|
sources += [
|
|
"assembler/turbo-assembler-arm-unittest.cc",
|
|
"compiler/arm/instruction-selector-arm-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "arm64") {
|
|
sources += [
|
|
"assembler/turbo-assembler-arm64-unittest.cc",
|
|
"compiler/arm64/instruction-selector-arm64-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "x86") {
|
|
sources += [
|
|
"assembler/turbo-assembler-ia32-unittest.cc",
|
|
"compiler/ia32/instruction-selector-ia32-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
|
|
sources += [
|
|
"assembler/turbo-assembler-mips-unittest.cc",
|
|
"compiler/mips/instruction-selector-mips-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
|
|
sources += [
|
|
"assembler/turbo-assembler-mips64-unittest.cc",
|
|
"compiler/mips64/instruction-selector-mips64-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "x64") {
|
|
sources += [
|
|
"assembler/turbo-assembler-x64-unittest.cc",
|
|
"compiler/x64/instruction-selector-x64-unittest.cc",
|
|
"wasm/trap-handler-x64-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
|
|
sources += [
|
|
"assembler/turbo-assembler-ppc-unittest.cc",
|
|
"compiler/ppc/instruction-selector-ppc-unittest.cc",
|
|
]
|
|
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
|
|
sources += [
|
|
"assembler/turbo-assembler-s390-unittest.cc",
|
|
"compiler/s390/instruction-selector-s390-unittest.cc",
|
|
]
|
|
}
|
|
|
|
if (is_posix) {
|
|
sources += [ "wasm/trap-handler-posix-unittest.cc" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
sources += [ "wasm/trap-handler-win-unittest.cc" ]
|
|
}
|
|
|
|
configs = [
|
|
"../..:external_config",
|
|
"../..:internal_config_base",
|
|
]
|
|
|
|
deps = [
|
|
"..:common_test_headers",
|
|
"../..:v8_for_testing",
|
|
"../..:v8_libbase",
|
|
"../..:v8_libplatform",
|
|
"../../third_party/inspector_protocol:crdtp_test",
|
|
"//build/win:default_exe_manifest",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
|
|
if (is_win) {
|
|
# This warning is benignly triggered by the U16 and U32 macros in
|
|
# bytecode-utils.h.
|
|
# C4309: 'static_cast': truncation of constant value
|
|
cflags = [ "/wd4309" ]
|
|
}
|
|
}
|