2016-06-01 14:14:28 +00:00
|
|
|
# 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")
|
|
|
|
|
2019-08-26 21:58:03 +00:00
|
|
|
config("cctest_config") {
|
|
|
|
# Work around a bug in the gold linker.
|
|
|
|
if (use_gold && target_cpu == "x86") {
|
|
|
|
ldflags = [ "-Wl,--icf=none" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-14 10:07:22 +00:00
|
|
|
v8_executable("cctest") {
|
2016-06-01 14:14:28 +00:00
|
|
|
testonly = true
|
2019-05-03 13:21:54 +00:00
|
|
|
|
2020-02-11 22:45:54 +00:00
|
|
|
sources = [ "cctest.cc" ]
|
2019-05-03 13:21:54 +00:00
|
|
|
|
2021-02-25 09:55:25 +00:00
|
|
|
deps = [ ":cctest_sources" ]
|
2018-03-26 13:12:27 +00:00
|
|
|
|
2020-02-11 22:45:54 +00:00
|
|
|
data_deps = [ "../../tools:v8_testrunner" ]
|
2018-03-26 13:12:27 +00:00
|
|
|
|
|
|
|
data = [
|
|
|
|
"testcfg.py",
|
|
|
|
"cctest.status",
|
|
|
|
"interpreter/bytecode_expectations/",
|
|
|
|
]
|
|
|
|
|
2017-09-24 20:50:48 +00:00
|
|
|
configs = [
|
|
|
|
"../..:external_config",
|
|
|
|
"../..:internal_config_base",
|
2020-03-04 11:35:45 +00:00
|
|
|
"../..:v8_tracing_config",
|
2019-08-26 21:58:03 +00:00
|
|
|
":cctest_config",
|
2017-09-24 20:50:48 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
ldflags = []
|
|
|
|
|
2020-04-17 20:46:18 +00:00
|
|
|
if (v8_use_perfetto) {
|
|
|
|
deps += [
|
|
|
|
# TODO(skyostil): Switch the test to use protozero.
|
|
|
|
"//third_party/perfetto/protos/perfetto/trace/interned_data:lite",
|
|
|
|
"//third_party/perfetto/protos/perfetto/trace/track_event:lite",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-24 20:50:48 +00:00
|
|
|
# TODO(machenbach): Translate from gyp.
|
|
|
|
#["OS=="aix"", {
|
|
|
|
# "ldflags": [ "-Wl,-bbigtoc" ],
|
|
|
|
#}],
|
|
|
|
}
|
|
|
|
|
2019-02-15 15:10:20 +00:00
|
|
|
v8_header_set("cctest_headers") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
configs = [
|
|
|
|
"../..:external_config",
|
|
|
|
"../..:internal_config_base",
|
|
|
|
]
|
|
|
|
|
2021-03-01 22:33:51 +00:00
|
|
|
deps = [
|
|
|
|
"../..:v8_internal_headers",
|
|
|
|
"../..:v8_libbase",
|
|
|
|
"../..:v8_libplatform",
|
|
|
|
]
|
2021-02-22 13:40:54 +00:00
|
|
|
|
2020-02-11 22:45:54 +00:00
|
|
|
sources = [ "cctest.h" ]
|
2019-02-15 15:10:20 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 20:20:38 +00:00
|
|
|
config("cctest_sources_config") {
|
|
|
|
if (is_clang) {
|
|
|
|
cflags = [ "-Wno-string-concatenation" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-24 20:50:48 +00:00
|
|
|
v8_source_set("cctest_sources") {
|
|
|
|
testonly = true
|
2016-06-01 14:14:28 +00:00
|
|
|
|
2016-09-14 19:02:12 +00:00
|
|
|
sources = [
|
2016-09-21 11:44:10 +00:00
|
|
|
### gcmole(all) ###
|
Reland "[turboassembler] Introduce hard-abort mode"
This is a reland of a462a7854a081f4f34bb4c112ee33f3d69efa309
Original change's description:
> [turboassembler] Introduce hard-abort mode
>
> For checks and assertions (mostly for debug code, like stack alignment
> or zero extension), we had two modes: Emit a call to the {Abort}
> runtime function (the default), and emit a debug break (used for
> testing, enabled via --trap-on-abort).
> In wasm, where we cannot just call a runtime function because code must
> be isolate independent, we always used the trap-on-abort behaviour.
> This causes problems for our fuzzers, which do not catch SIGTRAP, and
> hence do not detect debug code failures.
>
> This CL introduces a third mode ("hard abort"), which calls a C
> function via {ExternalReference}. The C function still outputs the
> abort reason, but does not print the stack trace. It then aborts via
> "OS::Abort", just like the runtime function.
> This will allow fuzzers to detect the crash and even find a nice error
> message.
>
> Even though this looks like a lot of code churn, it is actually not.
> Most added lines are new tests, and other changes are minimal.
>
> R=mstarzinger@chromium.org
>
> Bug: chromium:863799
> Change-Id: I77c58ff72db552d49014614436259ccfb49ba87b
> Reviewed-on: https://chromium-review.googlesource.com/1142163
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54592}
Bug: chromium:863799
Change-Id: I7729a47b4823a982a8e201df36520aa2b6ef5326
Reviewed-on: https://chromium-review.googlesource.com/1146100
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54656}
2018-07-24 14:12:47 +00:00
|
|
|
"../common/assembler-tester.h",
|
2020-10-05 15:01:50 +00:00
|
|
|
"../common/flag-utils.h",
|
2020-10-13 15:44:09 +00:00
|
|
|
"cctest-utils.h",
|
2019-05-16 09:43:58 +00:00
|
|
|
"collector.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/c-signature.h",
|
2016-09-19 10:58:59 +00:00
|
|
|
"compiler/call-tester.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/code-assembler-tester.h",
|
|
|
|
"compiler/codegen-tester.cc",
|
|
|
|
"compiler/codegen-tester.h",
|
|
|
|
"compiler/function-tester.cc",
|
|
|
|
"compiler/function-tester.h",
|
2021-01-26 16:48:03 +00:00
|
|
|
"compiler/node-observer-tester.h",
|
2021-08-19 16:00:17 +00:00
|
|
|
"compiler/test-atomic-load-store-codegen.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/test-basic-block-profiler.cc",
|
|
|
|
"compiler/test-branch-combine.cc",
|
2021-05-21 08:54:53 +00:00
|
|
|
"compiler/test-calls-with-arraylike-or-spread.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/test-code-assembler.cc",
|
2017-07-13 09:55:16 +00:00
|
|
|
"compiler/test-code-generator.cc",
|
2020-11-30 10:19:47 +00:00
|
|
|
"compiler/test-concurrent-shared-function-info.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/test-gap-resolver.cc",
|
|
|
|
"compiler/test-graph-visualizer.cc",
|
2018-03-13 13:50:00 +00:00
|
|
|
"compiler/test-instruction-scheduler.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/test-instruction.cc",
|
|
|
|
"compiler/test-js-constant-cache.cc",
|
|
|
|
"compiler/test-js-context-specialization.cc",
|
|
|
|
"compiler/test-js-typed-lowering.cc",
|
|
|
|
"compiler/test-jump-threading.cc",
|
|
|
|
"compiler/test-linkage.cc",
|
|
|
|
"compiler/test-loop-analysis.cc",
|
|
|
|
"compiler/test-machine-operator-reducer.cc",
|
|
|
|
"compiler/test-node.cc",
|
|
|
|
"compiler/test-operator.cc",
|
|
|
|
"compiler/test-representation-change.cc",
|
|
|
|
"compiler/test-run-bytecode-graph-builder.cc",
|
|
|
|
"compiler/test-run-calls-to-external-references.cc",
|
|
|
|
"compiler/test-run-deopt.cc",
|
|
|
|
"compiler/test-run-jsbranches.cc",
|
|
|
|
"compiler/test-run-jscalls.cc",
|
|
|
|
"compiler/test-run-jsexceptions.cc",
|
|
|
|
"compiler/test-run-jsobjects.cc",
|
|
|
|
"compiler/test-run-jsops.cc",
|
|
|
|
"compiler/test-run-load-store.cc",
|
|
|
|
"compiler/test-run-machops.cc",
|
|
|
|
"compiler/test-run-stackcheck.cc",
|
2017-12-18 18:55:23 +00:00
|
|
|
"compiler/test-run-tail-calls.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/test-run-unwinding-info.cc",
|
|
|
|
"compiler/test-run-variables.cc",
|
2021-01-26 16:48:03 +00:00
|
|
|
"compiler/test-sloppy-equality.cc",
|
2021-05-05 09:23:37 +00:00
|
|
|
"compiler/test-verify-type.cc",
|
2017-10-18 10:13:34 +00:00
|
|
|
"compiler/value-helper.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"compiler/value-helper.h",
|
2019-06-28 17:15:23 +00:00
|
|
|
"disasm-regex-helper.cc",
|
|
|
|
"disasm-regex-helper.h",
|
2016-09-19 10:58:59 +00:00
|
|
|
"expression-type-collector-macros.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"gay-fixed.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"gay-fixed.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"gay-precision.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"gay-precision.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"gay-shortest.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"gay-shortest.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"heap/heap-tester.h",
|
|
|
|
"heap/heap-utils.cc",
|
|
|
|
"heap/heap-utils.h",
|
|
|
|
"heap/test-alloc.cc",
|
|
|
|
"heap/test-array-buffer-tracker.cc",
|
|
|
|
"heap/test-compaction.cc",
|
2020-04-15 10:49:38 +00:00
|
|
|
"heap/test-concurrent-allocation.cc",
|
2017-03-06 15:19:36 +00:00
|
|
|
"heap/test-concurrent-marking.cc",
|
2017-12-07 13:02:05 +00:00
|
|
|
"heap/test-embedder-tracing.cc",
|
2018-07-26 06:42:03 +00:00
|
|
|
"heap/test-external-string-tracker.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"heap/test-heap.cc",
|
|
|
|
"heap/test-incremental-marking.cc",
|
2017-08-02 17:27:11 +00:00
|
|
|
"heap/test-invalidated-slots.cc",
|
2019-05-02 15:35:51 +00:00
|
|
|
"heap/test-iterators.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"heap/test-lab.cc",
|
|
|
|
"heap/test-mark-compact.cc",
|
2020-01-09 11:35:10 +00:00
|
|
|
"heap/test-memory-measurement.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"heap/test-page-promotion.cc",
|
2021-04-27 18:21:57 +00:00
|
|
|
"heap/test-shared-heap.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"heap/test-spaces.cc",
|
2018-04-19 15:34:13 +00:00
|
|
|
"heap/test-unmapper.cc",
|
2018-03-05 13:18:51 +00:00
|
|
|
"heap/test-weak-references.cc",
|
2020-07-03 07:26:57 +00:00
|
|
|
"heap/test-write-barrier.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"interpreter/bytecode-expectations-printer.cc",
|
|
|
|
"interpreter/bytecode-expectations-printer.h",
|
|
|
|
"interpreter/interpreter-tester.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"interpreter/interpreter-tester.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"interpreter/source-position-matcher.cc",
|
|
|
|
"interpreter/source-position-matcher.h",
|
|
|
|
"interpreter/test-bytecode-generator.cc",
|
|
|
|
"interpreter/test-interpreter-intrinsics.cc",
|
|
|
|
"interpreter/test-interpreter.cc",
|
|
|
|
"interpreter/test-source-positions.cc",
|
|
|
|
"libplatform/test-tracing.cc",
|
2021-05-18 14:18:33 +00:00
|
|
|
"libsampler/signals-and-mutexes.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"libsampler/test-sampler.cc",
|
2019-09-09 10:19:34 +00:00
|
|
|
"manually-externalized-buffer.h",
|
2016-11-18 14:56:32 +00:00
|
|
|
"parsing/test-parse-decision.cc",
|
2017-02-07 10:11:01 +00:00
|
|
|
"parsing/test-preparser.cc",
|
2016-09-16 13:59:40 +00:00
|
|
|
"parsing/test-scanner-streams.cc",
|
2016-09-19 16:50:29 +00:00
|
|
|
"parsing/test-scanner.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"print-extension.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"print-extension.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"profiler-extension.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"profiler-extension.h",
|
2017-02-07 10:11:01 +00:00
|
|
|
"scope-test-helper.h",
|
2017-04-07 13:31:29 +00:00
|
|
|
"setup-isolate-for-tests.cc",
|
|
|
|
"setup-isolate-for-tests.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-access-checks.cc",
|
2016-11-16 14:25:51 +00:00
|
|
|
"test-accessor-assembler.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-accessors.cc",
|
2017-08-01 01:41:13 +00:00
|
|
|
"test-allocation.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-api-accessors.cc",
|
2019-06-17 14:45:51 +00:00
|
|
|
"test-api-array-buffer.cc",
|
2020-02-14 22:28:25 +00:00
|
|
|
"test-api-icu.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-api-interceptors.cc",
|
2019-05-15 10:48:59 +00:00
|
|
|
"test-api-stack-traces.cc",
|
2019-06-17 14:45:51 +00:00
|
|
|
"test-api-typed-array.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-api.cc",
|
|
|
|
"test-api.h",
|
|
|
|
"test-array-list.cc",
|
|
|
|
"test-atomicops.cc",
|
|
|
|
"test-bignum-dtoa.cc",
|
|
|
|
"test-bignum.cc",
|
|
|
|
"test-bit-vector.cc",
|
|
|
|
"test-circular-queue.cc",
|
|
|
|
"test-code-layout.cc",
|
2019-12-16 16:30:20 +00:00
|
|
|
"test-code-pages.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-code-stub-assembler.cc",
|
|
|
|
"test-compiler.cc",
|
2020-06-10 13:45:24 +00:00
|
|
|
"test-concurrent-descriptor-array.cc",
|
2020-10-27 11:05:30 +00:00
|
|
|
"test-concurrent-feedback-vector.cc",
|
2021-02-22 11:24:34 +00:00
|
|
|
"test-concurrent-js-array.cc",
|
2020-07-02 08:22:19 +00:00
|
|
|
"test-concurrent-prototype.cc",
|
2020-07-21 14:37:56 +00:00
|
|
|
"test-concurrent-script-context-table.cc",
|
2020-11-12 10:24:32 +00:00
|
|
|
"test-concurrent-string.cc",
|
2020-07-14 11:18:36 +00:00
|
|
|
"test-concurrent-transition-array.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-constantpool.cc",
|
|
|
|
"test-conversions.cc",
|
|
|
|
"test-cpu-profiler.cc",
|
|
|
|
"test-date.cc",
|
Reland "Add postmortem debugging helper library"
This is a reland of 517ab73fd7e3fdb70220b9699bca4c69a32e212e
Updates since original: now compressed pointers passed to the function
GetObjectProperties are required to be sign-extended. Previously, the
function allowed zero-extended values, but that led to ambiguity on
pointers like 0x88044919: is it compressed or is the heap range actually
centered on 0x100000000?
Original change's description:
> Add postmortem debugging helper library
>
> This change begins to implement the functionality described in
> https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit#
> for investigating V8 state in crash dumps.
>
> This change adds a new library, v8_debug_helper, for providing platform-
> agnostic assistance with postmortem debugging. This library can be used
> by extensions built for debuggers such as WinDbg or lldb. Its public API
> is described by debug-helper.h; currently the only method it exposes is
> GetObjectProperties, but we'd like to add more functionality over time.
> The API surface is restricted to plain C-style structs and pointers, so
> that it's easy to link from a debugger extension built with a different
> toolchain.
>
> This change also adds a new cctest file to exercise some basic
> interaction with the new library.
>
> The API function GetObjectProperties takes an object pointer (which
> could be compressed, or weak, or a SMI), and returns a string
> description of the object and a list of properties the object contains.
> For now, the list of properties is entirely based on Torque object
> definitions, but we expect to add custom properties in future updates so
> that it can be easier to make sense of complex data structures such as
> dictionaries.
>
> GetObjectProperties does several things that are intended to generate
> somewhat useful results even in cases where memory may be corrupt or
> unavailable:
> - The caller may optionally provide a type string which will be used if
> the memory for the object's Map is inaccessible.
> - All object pointers are compared against the list of known objects
> generated by mkgrokdump. The caller may optionally provide the
> pointers for the first pages of various heap spaces, to avoid spurious
> matches. If those pointers are not provided, then any matches are
> prefixed with "maybe" in the resulting description string, such as
> "maybe UndefinedValue (0x4288000341 <Oddball>)".
>
> Bug: v8:9376
>
> Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62882}
Bug: v8:9376
Change-Id: I866a1cc9d4c34bfe10c7b98462451fe69763cf3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1717090
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#63008}
2019-07-30 14:38:15 +00:00
|
|
|
"test-debug-helper.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-debug.cc",
|
|
|
|
"test-decls.cc",
|
|
|
|
"test-deoptimization.cc",
|
2020-10-16 12:31:57 +00:00
|
|
|
"test-descriptor-array.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-dictionary.cc",
|
|
|
|
"test-diy-fp.cc",
|
|
|
|
"test-double.cc",
|
|
|
|
"test-dtoa.cc",
|
|
|
|
"test-elements-kind.cc",
|
2018-12-05 16:12:12 +00:00
|
|
|
"test-factory.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-fast-dtoa.cc",
|
|
|
|
"test-feedback-vector.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"test-feedback-vector.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-field-type-tracking.cc",
|
|
|
|
"test-fixed-dtoa.cc",
|
|
|
|
"test-flags.cc",
|
|
|
|
"test-func-name-inference.cc",
|
|
|
|
"test-global-handles.cc",
|
|
|
|
"test-global-object.cc",
|
2017-08-21 01:58:40 +00:00
|
|
|
"test-hashcode.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-hashmap.cc",
|
|
|
|
"test-heap-profiler.cc",
|
2018-11-20 14:45:08 +00:00
|
|
|
"test-icache.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-identity-map.cc",
|
2021-06-04 22:52:29 +00:00
|
|
|
"test-ignition-statistics-extension.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-inobject-slack-tracking.cc",
|
2018-06-05 16:03:05 +00:00
|
|
|
"test-inspector.cc",
|
2017-06-29 22:28:00 +00:00
|
|
|
"test-intl.cc",
|
2018-10-11 12:56:18 +00:00
|
|
|
"test-js-weak-refs.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-liveedit.cc",
|
2020-03-25 10:09:07 +00:00
|
|
|
"test-local-handles.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-lockers.cc",
|
|
|
|
"test-log.cc",
|
2017-02-21 17:23:38 +00:00
|
|
|
"test-managed.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-mementos.cc",
|
2016-09-20 23:38:58 +00:00
|
|
|
"test-modules.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-object.cc",
|
2017-05-29 09:29:19 +00:00
|
|
|
"test-orderedhashtable.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-parsing.cc",
|
2020-04-06 06:23:44 +00:00
|
|
|
"test-persistent-handles.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-platform.cc",
|
|
|
|
"test-profile-generator.cc",
|
2021-02-04 12:49:13 +00:00
|
|
|
"test-property-details.cc",
|
2021-04-10 02:09:41 +00:00
|
|
|
"test-ptr-compr-cage.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-random-number-generator.cc",
|
|
|
|
"test-regexp.cc",
|
|
|
|
"test-representation.cc",
|
2018-07-04 18:11:11 +00:00
|
|
|
"test-roots.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-sampler-api.cc",
|
|
|
|
"test-serialize.cc",
|
2018-09-05 09:28:55 +00:00
|
|
|
"test-smi-lexicographic-compare.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-strings.cc",
|
|
|
|
"test-strtod.cc",
|
2021-03-18 15:03:43 +00:00
|
|
|
"test-swiss-name-dictionary-csa.cc",
|
|
|
|
"test-swiss-name-dictionary-infra.cc",
|
2021-02-19 09:28:12 +00:00
|
|
|
"test-swiss-name-dictionary.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-symbols.cc",
|
|
|
|
"test-thread-termination.cc",
|
|
|
|
"test-threads.cc",
|
|
|
|
"test-trace-event.cc",
|
2016-10-06 15:27:03 +00:00
|
|
|
"test-traced-value.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-transitions.cc",
|
2017-07-28 07:01:59 +00:00
|
|
|
"test-transitions.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-typedarrays.cc",
|
|
|
|
"test-types.cc",
|
|
|
|
"test-unscopables-hidden-prototype.cc",
|
2019-12-19 11:56:25 +00:00
|
|
|
"test-unwinder-code-pages.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-usecounters.cc",
|
|
|
|
"test-utils.cc",
|
2020-10-13 20:42:34 +00:00
|
|
|
"test-verifiers.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-version.cc",
|
2021-08-11 14:18:28 +00:00
|
|
|
"test-virtual-memory-cage.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-weakmaps.cc",
|
|
|
|
"test-weaksets.cc",
|
2021-03-15 09:53:02 +00:00
|
|
|
"test-web-snapshots.cc",
|
2019-04-01 15:56:28 +00:00
|
|
|
"torque/test-torque.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"trace-extension.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"trace-extension.h",
|
2018-09-07 09:17:06 +00:00
|
|
|
"unicode-helpers.cc",
|
2017-02-07 10:11:01 +00:00
|
|
|
"unicode-helpers.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
]
|
2016-06-01 14:14:28 +00:00
|
|
|
|
2016-07-15 22:32:55 +00:00
|
|
|
if (v8_current_cpu == "arm") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:arm) ###
|
Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
"assembler-helper-arm.cc",
|
|
|
|
"assembler-helper-arm.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-arm.cc",
|
|
|
|
"test-disasm-arm.cc",
|
|
|
|
"test-macro-assembler-arm.cc",
|
Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
"test-sync-primitives-arm.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "arm64") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:arm64) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-arm64.cc",
|
|
|
|
"test-disasm-arm64.cc",
|
|
|
|
"test-fuzz-arm64.cc",
|
|
|
|
"test-javascript-arm64.cc",
|
|
|
|
"test-js-arm64-variables.cc",
|
2019-06-18 14:54:18 +00:00
|
|
|
"test-macro-assembler-arm64.cc",
|
2019-07-24 16:24:11 +00:00
|
|
|
"test-pointer-auth-arm64.cc",
|
Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
"test-sync-primitives-arm64.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-utils-arm64.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"test-utils-arm64.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
]
|
Unwind V8 frames correctly on Windows ARM64
On Windows ARM64, OS stack walking does not work because the V8 ARM64 backend
doesn't emit unwinding info and also because it doesn't emit ABI compliant
stack frames. This was fixed for Windows X64 (https://crrev.com/c/1469329) and
documented below:
https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0
This problem can be fixed similarly for Windows ARM64 by observing that V8
frames usually all have the same prolog which maintains a chain via frame
pointer (fp or x29 register).
stp fp, lr, [sp, ...]
One exception is JSEntry which stops fp pointer chain and needs to be handled
specially.
So it is possible to define XDATA with UNWIND_CODE which specify how Windows
should walk through V8 dynamic frames. The same as X64, since V8 Code objects
are all allocated in the same code-range for an Isolate, it is possible to
register at most 2 XDATA and a group of PDATA entries to cover stack walking
for all the code generated inside that code-range. This is more than 1
PDATA/XDATA because according to the Windows ARM64 exeption handling document,
1 PDATA can cover less than 1MB code range (see below doc).
https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling
This PR implements stackwalk for Windows ARM64 to be on par with X64, including
embedded builtins, jitted code and wasm jitted code, but not including register
handler for handling exception only, because there is no backward compatibility
to maintain for Windows ARM64 which was released since 1709 windows build.
Bug: chromium:893460
Change-Id: Ic74cbdad8af5cf342185030a4c53796f12ea5429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701133
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63002}
2019-07-27 06:36:52 +00:00
|
|
|
if (is_win) {
|
|
|
|
sources += [ "test-stack-unwinding-win64.cc" ]
|
|
|
|
}
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "x86") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:ia32) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-ia32.cc",
|
|
|
|
"test-disasm-ia32.cc",
|
|
|
|
"test-log-stack-tracer.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mips") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:mips) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-mips.cc",
|
|
|
|
"test-disasm-mips.cc",
|
|
|
|
"test-macro-assembler-mips.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mipsel") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:mipsel) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-mips.cc",
|
|
|
|
"test-disasm-mips.cc",
|
|
|
|
"test-macro-assembler-mips.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mips64") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:mips64) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-mips64.cc",
|
|
|
|
"test-disasm-mips64.cc",
|
|
|
|
"test-macro-assembler-mips64.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mips64el") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:mips64el) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-mips64.cc",
|
|
|
|
"test-disasm-mips64.cc",
|
|
|
|
"test-macro-assembler-mips64.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "x64") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:x64) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-x64.cc",
|
|
|
|
"test-disasm-x64.cc",
|
|
|
|
"test-log-stack-tracer.cc",
|
|
|
|
"test-macro-assembler-x64.cc",
|
|
|
|
]
|
Reland "V8 x64 backend doesn't emit ABI compliant stack frames"
This is a reland of 3cda21de77d098a612eadf44d504b188a599c5f0
Original change's description:
> V8 x64 backend doesn't emit ABI compliant stack frames
>
> On 64 bit Windows, the OS stack walking does not work because the V8 x64
> backend doesn't emit unwinding info and also because it doesn't emit ABI
> compliant stack frames. See
> https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
> for more details.
>
> This problem can be fixed by observing that V8 frames usually all have the same
> prolog and epilog:
>
> push rbp,
> mov rbp, rsp
> ...
> pop rbp
> ret N
>
> and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
> should walk through V8 frames. Furthermore, since V8 Code objects are all
> allocated in the same code-range for an Isolate, it is possible to register a
> single PDATA/XDATA entry to cover stack walking for all the code generated
> inside that code-range.
>
> This PR contains changes required to enable stack walking on Win64:
>
> EmbeddedFileWriter now adds assembler directives to the builtins
> snapshot source file (embedded.cc) to emit additional entries in the .pdata and
> in the .xdata section of the V8 executable. This takes care of stack walking
> for embedded builtins. (The case of non-embedded builtins is not supported).
> The x64 Assembler has been modified to collect the information required to emit
> this unwind info for builtins.
>
> Stack walking for jitted code is handled is Isolate.cpp, by registering
> dynamically PDATA/XDATA for the whole code-range address space every time a new
> Isolate is initialized, and by unregistering them when the Isolate is
> destroyed.
>
> Stack walking for WASM jitted code is handled is the same way in
> wasm::NativeModule (wasm/wasm-code-manager.cpp).
>
> It is important to note that Crashpad and Breakpad are already registering
> PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
> builtins). Since it is not possible to register multiple PDATA entries for the
> same address range, a new function is added to the V8 API:
> SetUnhandledExceptionCallback() can be used by an embedder to register its own
> unhandled exception handler for exceptions that arise in v8-generated code.
> V8 embedders should be modified accordingly (code for this is in a separate PR
> in the Chromium repository:
> https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
>
> All these changes are experimental, behind:
>
> the 'v8_win64_unwinding_info' build flag, and
> the '--win64-unwinding-info' runtime flag.
>
> Bug: v8:3598
> Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#60330}
Bug: v8:3598
Change-Id: If988baf7d3e4af165b919d6e54c1ad985f8e25e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1534618
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60581}
2019-04-01 21:43:23 +00:00
|
|
|
if (is_win) {
|
Unwind V8 frames correctly on Windows ARM64
On Windows ARM64, OS stack walking does not work because the V8 ARM64 backend
doesn't emit unwinding info and also because it doesn't emit ABI compliant
stack frames. This was fixed for Windows X64 (https://crrev.com/c/1469329) and
documented below:
https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0
This problem can be fixed similarly for Windows ARM64 by observing that V8
frames usually all have the same prolog which maintains a chain via frame
pointer (fp or x29 register).
stp fp, lr, [sp, ...]
One exception is JSEntry which stops fp pointer chain and needs to be handled
specially.
So it is possible to define XDATA with UNWIND_CODE which specify how Windows
should walk through V8 dynamic frames. The same as X64, since V8 Code objects
are all allocated in the same code-range for an Isolate, it is possible to
register at most 2 XDATA and a group of PDATA entries to cover stack walking
for all the code generated inside that code-range. This is more than 1
PDATA/XDATA because according to the Windows ARM64 exeption handling document,
1 PDATA can cover less than 1MB code range (see below doc).
https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling
This PR implements stackwalk for Windows ARM64 to be on par with X64, including
embedded builtins, jitted code and wasm jitted code, but not including register
handler for handling exception only, because there is no backward compatibility
to maintain for Windows ARM64 which was released since 1709 windows build.
Bug: chromium:893460
Change-Id: Ic74cbdad8af5cf342185030a4c53796f12ea5429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701133
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63002}
2019-07-27 06:36:52 +00:00
|
|
|
sources += [ "test-stack-unwinding-win64.cc" ]
|
Reland "V8 x64 backend doesn't emit ABI compliant stack frames"
This is a reland of 3cda21de77d098a612eadf44d504b188a599c5f0
Original change's description:
> V8 x64 backend doesn't emit ABI compliant stack frames
>
> On 64 bit Windows, the OS stack walking does not work because the V8 x64
> backend doesn't emit unwinding info and also because it doesn't emit ABI
> compliant stack frames. See
> https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
> for more details.
>
> This problem can be fixed by observing that V8 frames usually all have the same
> prolog and epilog:
>
> push rbp,
> mov rbp, rsp
> ...
> pop rbp
> ret N
>
> and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
> should walk through V8 frames. Furthermore, since V8 Code objects are all
> allocated in the same code-range for an Isolate, it is possible to register a
> single PDATA/XDATA entry to cover stack walking for all the code generated
> inside that code-range.
>
> This PR contains changes required to enable stack walking on Win64:
>
> EmbeddedFileWriter now adds assembler directives to the builtins
> snapshot source file (embedded.cc) to emit additional entries in the .pdata and
> in the .xdata section of the V8 executable. This takes care of stack walking
> for embedded builtins. (The case of non-embedded builtins is not supported).
> The x64 Assembler has been modified to collect the information required to emit
> this unwind info for builtins.
>
> Stack walking for jitted code is handled is Isolate.cpp, by registering
> dynamically PDATA/XDATA for the whole code-range address space every time a new
> Isolate is initialized, and by unregistering them when the Isolate is
> destroyed.
>
> Stack walking for WASM jitted code is handled is the same way in
> wasm::NativeModule (wasm/wasm-code-manager.cpp).
>
> It is important to note that Crashpad and Breakpad are already registering
> PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
> builtins). Since it is not possible to register multiple PDATA entries for the
> same address range, a new function is added to the V8 API:
> SetUnhandledExceptionCallback() can be used by an embedder to register its own
> unhandled exception handler for exceptions that arise in v8-generated code.
> V8 embedders should be modified accordingly (code for this is in a separate PR
> in the Chromium repository:
> https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
>
> All these changes are experimental, behind:
>
> the 'v8_win64_unwinding_info' build flag, and
> the '--win64-unwinding-info' runtime flag.
>
> Bug: v8:3598
> Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#60330}
Bug: v8:3598
Change-Id: If988baf7d3e4af165b919d6e54c1ad985f8e25e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1534618
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60581}
2019-04-01 21:43:23 +00:00
|
|
|
}
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:ppc) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-ppc.cc",
|
|
|
|
"test-disasm-ppc.cc",
|
|
|
|
]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
|
2016-09-21 11:44:10 +00:00
|
|
|
sources += [ ### gcmole(arch:s390) ###
|
2016-09-14 19:02:12 +00:00
|
|
|
"test-assembler-s390.cc",
|
|
|
|
"test-disasm-s390.cc",
|
|
|
|
]
|
2021-02-09 16:11:55 +00:00
|
|
|
} else if (v8_current_cpu == "riscv64") {
|
|
|
|
sources += [ ### gcmole(arch:riscv64) ###
|
|
|
|
"test-assembler-riscv64.cc",
|
|
|
|
"test-disasm-riscv64.cc",
|
|
|
|
"test-helper-riscv64.cc",
|
|
|
|
"test-macro-assembler-riscv64.cc",
|
|
|
|
"test-simple-riscv64.cc",
|
|
|
|
]
|
2021-08-11 11:54:59 +00:00
|
|
|
} else if (v8_current_cpu == "loong64") {
|
|
|
|
sources += [ ### gcmole(arch:loong64) ###
|
|
|
|
"test-assembler-loong64.cc",
|
|
|
|
"test-disasm-loong64.cc",
|
|
|
|
"test-macro-assembler-loong64.cc",
|
|
|
|
]
|
2016-06-01 14:14:28 +00:00
|
|
|
}
|
|
|
|
|
2020-04-17 20:46:18 +00:00
|
|
|
if (v8_use_perfetto) {
|
|
|
|
# Perfetto doesn't use TraceObject.
|
|
|
|
sources -= [ "test-trace-event.cc" ]
|
|
|
|
}
|
|
|
|
|
2016-06-14 10:07:22 +00:00
|
|
|
configs = [
|
2020-06-17 07:54:15 +00:00
|
|
|
"../..:cppgc_base_config",
|
2016-06-01 14:14:28 +00:00
|
|
|
"../..:external_config",
|
|
|
|
"../..:internal_config_base",
|
2020-03-04 11:35:45 +00:00
|
|
|
"../..:v8_tracing_config",
|
2020-08-20 20:20:38 +00:00
|
|
|
":cctest_sources_config",
|
2016-06-01 14:14:28 +00:00
|
|
|
]
|
|
|
|
|
2017-09-24 20:50:48 +00:00
|
|
|
public_deps = [
|
2019-02-15 15:10:20 +00:00
|
|
|
":cctest_headers",
|
2019-02-12 08:41:25 +00:00
|
|
|
"..:common_test_headers",
|
2019-04-09 11:16:15 +00:00
|
|
|
"../..:v8_for_testing",
|
2016-10-07 07:56:43 +00:00
|
|
|
"../..:v8_libbase",
|
2016-06-01 14:14:28 +00:00
|
|
|
"../..:v8_libplatform",
|
Reland "Add postmortem debugging helper library"
This is a reland of 517ab73fd7e3fdb70220b9699bca4c69a32e212e
Updates since original: now compressed pointers passed to the function
GetObjectProperties are required to be sign-extended. Previously, the
function allowed zero-extended values, but that led to ambiguity on
pointers like 0x88044919: is it compressed or is the heap range actually
centered on 0x100000000?
Original change's description:
> Add postmortem debugging helper library
>
> This change begins to implement the functionality described in
> https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit#
> for investigating V8 state in crash dumps.
>
> This change adds a new library, v8_debug_helper, for providing platform-
> agnostic assistance with postmortem debugging. This library can be used
> by extensions built for debuggers such as WinDbg or lldb. Its public API
> is described by debug-helper.h; currently the only method it exposes is
> GetObjectProperties, but we'd like to add more functionality over time.
> The API surface is restricted to plain C-style structs and pointers, so
> that it's easy to link from a debugger extension built with a different
> toolchain.
>
> This change also adds a new cctest file to exercise some basic
> interaction with the new library.
>
> The API function GetObjectProperties takes an object pointer (which
> could be compressed, or weak, or a SMI), and returns a string
> description of the object and a list of properties the object contains.
> For now, the list of properties is entirely based on Torque object
> definitions, but we expect to add custom properties in future updates so
> that it can be easier to make sense of complex data structures such as
> dictionaries.
>
> GetObjectProperties does several things that are intended to generate
> somewhat useful results even in cases where memory may be corrupt or
> unavailable:
> - The caller may optionally provide a type string which will be used if
> the memory for the object's Map is inaccessible.
> - All object pointers are compared against the list of known objects
> generated by mkgrokdump. The caller may optionally provide the
> pointers for the first pages of various heap spaces, to avoid spurious
> matches. If those pointers are not provided, then any matches are
> prefixed with "maybe" in the resulting description string, such as
> "maybe UndefinedValue (0x4288000341 <Oddball>)".
>
> Bug: v8:9376
>
> Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62882}
Bug: v8:9376
Change-Id: I866a1cc9d4c34bfe10c7b98462451fe69763cf3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1717090
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#63008}
2019-07-30 14:38:15 +00:00
|
|
|
"../../tools/debug_helper:v8_debug_helper",
|
2016-06-01 14:14:28 +00:00
|
|
|
"//build/win:default_exe_manifest",
|
|
|
|
]
|
|
|
|
|
2021-02-26 10:52:45 +00:00
|
|
|
if (v8_enable_webassembly) {
|
|
|
|
sources += [
|
|
|
|
"../common/wasm/flag-utils.h",
|
|
|
|
"../common/wasm/test-signatures.h",
|
|
|
|
"../common/wasm/wasm-macro-gen.h",
|
2021-03-08 13:47:44 +00:00
|
|
|
"compiler/test-multiple-return.cc",
|
|
|
|
|
|
|
|
# test-run-native-calls uses wasm's LinkageAllocator.
|
|
|
|
"compiler/test-run-native-calls.cc",
|
|
|
|
"test-api-wasm.cc",
|
|
|
|
"test-js-to-wasm.cc",
|
2021-03-03 11:16:53 +00:00
|
|
|
"wasm/test-backing-store.cc",
|
2021-02-26 10:52:45 +00:00
|
|
|
"wasm/test-c-wasm-entry.cc",
|
|
|
|
"wasm/test-compilation-cache.cc",
|
|
|
|
"wasm/test-gc.cc",
|
|
|
|
"wasm/test-grow-memory.cc",
|
|
|
|
"wasm/test-jump-table-assembler.cc",
|
2021-06-08 10:06:00 +00:00
|
|
|
"wasm/test-liftoff-for-fuzzing.cc",
|
2021-02-26 10:52:45 +00:00
|
|
|
"wasm/test-liftoff-inspection.cc",
|
|
|
|
"wasm/test-run-wasm-64.cc",
|
|
|
|
"wasm/test-run-wasm-asmjs.cc",
|
|
|
|
"wasm/test-run-wasm-atomics.cc",
|
|
|
|
"wasm/test-run-wasm-atomics64.cc",
|
|
|
|
"wasm/test-run-wasm-bulk-memory.cc",
|
|
|
|
"wasm/test-run-wasm-exceptions.cc",
|
|
|
|
"wasm/test-run-wasm-interpreter.cc",
|
|
|
|
"wasm/test-run-wasm-js.cc",
|
|
|
|
"wasm/test-run-wasm-memory64.cc",
|
|
|
|
"wasm/test-run-wasm-module.cc",
|
2021-03-18 21:41:50 +00:00
|
|
|
"wasm/test-run-wasm-relaxed-simd.cc",
|
2021-02-26 10:52:45 +00:00
|
|
|
"wasm/test-run-wasm-sign-extension.cc",
|
|
|
|
"wasm/test-run-wasm-simd-liftoff.cc",
|
|
|
|
"wasm/test-run-wasm-simd.cc",
|
|
|
|
"wasm/test-run-wasm-wrappers.cc",
|
|
|
|
"wasm/test-run-wasm.cc",
|
|
|
|
"wasm/test-streaming-compilation.cc",
|
|
|
|
"wasm/test-wasm-breakpoints.cc",
|
|
|
|
"wasm/test-wasm-codegen.cc",
|
|
|
|
"wasm/test-wasm-import-wrapper-cache.cc",
|
|
|
|
"wasm/test-wasm-metrics.cc",
|
|
|
|
"wasm/test-wasm-serialization.cc",
|
|
|
|
"wasm/test-wasm-shared-engine.cc",
|
|
|
|
"wasm/test-wasm-stack.cc",
|
|
|
|
"wasm/test-wasm-trap-position.cc",
|
|
|
|
"wasm/wasm-atomics-utils.h",
|
|
|
|
"wasm/wasm-run-utils.cc",
|
|
|
|
"wasm/wasm-run-utils.h",
|
2021-03-18 21:41:50 +00:00
|
|
|
"wasm/wasm-simd-utils.cc",
|
|
|
|
"wasm/wasm-simd-utils.h",
|
2021-02-26 10:52:45 +00:00
|
|
|
]
|
|
|
|
public_deps += [ "../..:wasm_test_common" ]
|
|
|
|
}
|
|
|
|
|
2016-10-13 12:44:15 +00:00
|
|
|
defines = []
|
2021-02-22 09:10:50 +00:00
|
|
|
deps = [
|
|
|
|
"../..:run_torque",
|
|
|
|
"../..:v8_shared_internal_headers",
|
|
|
|
]
|
2016-10-13 12:44:15 +00:00
|
|
|
|
2017-06-29 22:28:00 +00:00
|
|
|
if (v8_enable_i18n_support) {
|
|
|
|
defines += [ "V8_INTL_SUPPORT" ]
|
2018-06-19 18:03:56 +00:00
|
|
|
public_deps += [ "//third_party/icu" ]
|
2017-06-29 22:28:00 +00:00
|
|
|
} else {
|
|
|
|
sources -= [ "test-intl.cc" ]
|
|
|
|
}
|
|
|
|
|
2016-07-25 09:31:44 +00:00
|
|
|
cflags = []
|
|
|
|
if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
|
|
|
|
v8_current_cpu == "arm" || v8_current_cpu == "arm64" ||
|
2016-12-15 11:50:12 +00:00
|
|
|
v8_current_cpu == "s390" || v8_current_cpu == "s390x" ||
|
|
|
|
v8_current_cpu == "mips" || v8_current_cpu == "mips64" ||
|
2021-02-09 16:11:55 +00:00
|
|
|
v8_current_cpu == "mipsel" || v8_current_cpu == "mipsel64" ||
|
2021-08-11 11:54:59 +00:00
|
|
|
v8_current_cpu == "riscv64" || v8_current_cpu == "loong64") {
|
2016-07-25 09:31:44 +00:00
|
|
|
# Disable fmadd/fmsub so that expected results match generated code in
|
|
|
|
# RunFloat64MulAndFloat64Add1 and friends.
|
2018-10-23 23:30:20 +00:00
|
|
|
if (!is_win) {
|
|
|
|
cflags += [ "-ffp-contract=off" ]
|
|
|
|
}
|
2016-07-25 09:31:44 +00:00
|
|
|
}
|
|
|
|
|
2016-06-03 08:21:11 +00:00
|
|
|
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
|
2016-07-25 09:31:44 +00:00
|
|
|
cflags += [ "/wd4309" ]
|
|
|
|
|
|
|
|
# MSVS wants this for gay-{precision,shortest}.cc.
|
|
|
|
cflags += [ "/bigobj" ]
|
2020-02-11 22:45:54 +00:00
|
|
|
|
|
|
|
if (symbol_level == 2) {
|
|
|
|
sources += [ "test-v8windbg.cc" ]
|
|
|
|
deps += [ "../../tools/v8windbg:v8windbg_test" ]
|
|
|
|
}
|
2016-06-03 08:21:11 +00:00
|
|
|
}
|
2019-05-27 12:46:35 +00:00
|
|
|
|
|
|
|
if (v8_use_perfetto) {
|
2019-07-08 08:29:54 +00:00
|
|
|
deps += [
|
2020-04-17 20:46:18 +00:00
|
|
|
# TODO(skyostil): Migrate to protozero.
|
|
|
|
"//third_party/perfetto/protos/perfetto/trace:lite",
|
2019-07-08 08:29:54 +00:00
|
|
|
]
|
2019-05-27 12:46:35 +00:00
|
|
|
}
|
2016-06-01 14:14:28 +00:00
|
|
|
}
|
|
|
|
|
2016-06-27 11:55:33 +00:00
|
|
|
v8_executable("generate-bytecode-expectations") {
|
2019-02-15 15:10:20 +00:00
|
|
|
testonly = true
|
|
|
|
|
2016-06-27 11:55:33 +00:00
|
|
|
sources = [
|
|
|
|
"interpreter/bytecode-expectations-printer.cc",
|
|
|
|
"interpreter/bytecode-expectations-printer.h",
|
|
|
|
"interpreter/generate-bytecode-expectations.cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
configs = [
|
|
|
|
"../..:external_config",
|
|
|
|
"../..:internal_config_base",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
2019-02-15 15:10:20 +00:00
|
|
|
":cctest_headers",
|
2016-10-14 08:55:40 +00:00
|
|
|
"../..:v8",
|
|
|
|
"../..:v8_libbase",
|
2016-06-27 11:55:33 +00:00
|
|
|
"../..:v8_libplatform",
|
|
|
|
"//build/win:default_exe_manifest",
|
|
|
|
]
|
2019-07-22 06:45:11 +00:00
|
|
|
|
2020-02-11 22:45:54 +00:00
|
|
|
data = [ "interpreter/bytecode_expectations/" ]
|
2016-06-27 11:55:33 +00:00
|
|
|
}
|