2014-05-05 11:06:26 +00:00
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
2015-03-12 15:39:41 +00:00
import("//build/config/android/config.gni")
import("//build/config/arm.gni")
2016-06-07 13:44:01 +00:00
import("//build/config/dcheck_always_on.gni")
2017-05-12 01:35:09 +00:00
import("//build/config/host_byteorder.gni")
2015-03-12 15:39:41 +00:00
import("//build/config/mips.gni")
2015-09-07 15:22:42 +00:00
import("//build/config/sanitizers/sanitizers.gni")
2018-03-20 10:16:14 +00:00
import("//build_overrides/build.gni")
2015-03-12 15:39:41 +00:00
2015-11-05 17:28:57 +00:00
if (is_android) {
import("//build/config/android/rules.gni")
}
2019-05-15 10:26:01 +00:00
import("gni/snapshot_toolchain.gni")
2016-05-24 08:54:42 +00:00
import("gni/v8.gni")
2015-09-22 02:28:32 +00:00
2018-10-17 14:19:56 +00:00
# Specifies if the target build is a simulator build. Comparing target cpu
# with v8 target cpu to not affect simulator builds for making cross-compile
# snapshots.
2020-01-13 11:03:55 +00:00
target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) ||
2018-10-17 14:19:56 +00:00
(current_cpu != v8_current_cpu && v8_multi_arch_build)
2018-11-22 10:25:50 +00:00
# For faster Windows builds. See https://crbug.com/v8/8475.
emit_builtins_as_inline_asm = is_win && is_clang
2015-11-11 01:09:06 +00:00
declare_args() {
2016-08-02 15:35:24 +00:00
# Print to stdout on Android.
v8_android_log_stdout = false
2018-06-11 11:49:00 +00:00
# Dynamically set an additional dependency from v8/custom_deps.
v8_custom_deps = ""
2018-04-06 10:24:41 +00:00
# Turns on all V8 debug features. Enables running V8 in a pseudo debug mode
# within a release Chrome.
v8_enable_debugging_features = is_debug
2017-03-01 12:36:40 +00:00
# Sets -DV8_ENABLE_FUTURE.
v8_enable_future = false
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
# Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
2021-04-07 00:46:32 +00:00
v8_enable_system_instrumentation = true
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
# Sets the GUID for the ETW provider
v8_etw_guid = ""
2016-04-08 14:16:47 +00:00
# Sets -DVERIFY_HEAP.
2017-01-13 17:28:51 +00:00
v8_enable_verify_heap = ""
2016-04-08 14:16:47 +00:00
2017-01-05 15:01:30 +00:00
# Sets -DVERIFY_PREDICTABLE
v8_enable_verify_predictable = false
2016-04-08 14:16:47 +00:00
# Enable compiler warnings when using V8_DEPRECATED apis.
2018-07-26 09:10:09 +00:00
v8_deprecation_warnings = true
2016-04-08 14:16:47 +00:00
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
2018-07-25 04:49:16 +00:00
v8_imminent_deprecation_warnings = true
2016-04-08 14:16:47 +00:00
2016-06-30 11:24:37 +00:00
# Embeds the given script into the snapshot.
v8_embed_script = ""
2017-09-28 14:05:22 +00:00
# Allows the embedder to add a custom suffix to the version string.
v8_embedder_string = ""
2016-04-08 14:16:47 +00:00
# Sets -dENABLE_DISASSEMBLER.
2016-07-26 12:00:17 +00:00
v8_enable_disassembler = ""
2016-04-08 14:16:47 +00:00
2017-05-23 17:54:12 +00:00
# Sets the number of internal fields on promise objects.
v8_promise_internal_field_count = 0
2016-04-08 14:16:47 +00:00
# Sets -dENABLE_GDB_JIT_INTERFACE.
2016-07-15 14:40:51 +00:00
v8_enable_gdbjit = ""
2016-04-08 14:16:47 +00:00
2017-02-13 02:54:05 +00:00
# Sets -dENABLE_VTUNE_JIT_INTERFACE.
v8_enable_vtunejit = false
2019-12-14 08:46:38 +00:00
# Sets -dENABLE_VTUNE_TRACEMARK.
v8_enable_vtunetracemark = false
2016-04-08 14:16:47 +00:00
# Sets -dENABLE_HANDLE_ZAPPING.
v8_enable_handle_zapping = true
2016-06-07 13:44:01 +00:00
# Enable slow dchecks.
v8_enable_slow_dchecks = false
2017-08-24 13:14:44 +00:00
# Enable fast mksnapshot runs.
v8_enable_fast_mksnapshot = false
2019-05-15 17:14:05 +00:00
# Optimize code for Torque executable, even during a debug build.
v8_enable_fast_torque = ""
2019-08-03 22:09:54 +00:00
# Enable the registration of unwinding info for Windows x64 and ARM64.
2019-04-24 22:01:00 +00:00
v8_win64_unwinding_info = true
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
2018-12-13 19:30:56 +00:00
# Enable code comments for builtins in the snapshot (impacts performance).
2021-04-19 09:22:57 +00:00
# This also enables v8_code_comments.
2018-12-13 19:30:56 +00:00
v8_enable_snapshot_code_comments = false
2021-04-19 09:22:57 +00:00
# Allow runtime-enabled code comments (with --code-comments). Enabled by
# default in debug builds.
# Sets -dV8_CODE_COMMENTS
v8_code_comments = ""
2019-03-28 12:37:29 +00:00
# Enable native counters from the snapshot (impacts performance, sets
# -dV8_SNAPSHOT_NATIVE_CODE_COUNTERS).
# This option will generate extra code in the snapshot to increment counters,
# as per the --native-code-counters flag.
v8_enable_snapshot_native_code_counters = ""
2017-01-27 11:32:27 +00:00
# Enable code-generation-time checking of types in the CodeStubAssembler.
v8_enable_verify_csa = false
2018-06-05 10:45:41 +00:00
# Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
2019-07-31 18:21:15 +00:00
v8_enable_pointer_compression = ""
2021-03-05 00:55:44 +00:00
v8_enable_pointer_compression_shared_cage = ""
2020-03-02 10:51:59 +00:00
v8_enable_31bit_smis_on_64bit_arch = false
2018-06-05 10:45:41 +00:00
2016-04-08 14:16:47 +00:00
# Sets -dOBJECT_PRINT.
2017-01-13 17:28:51 +00:00
v8_enable_object_print = ""
2017-05-16 15:52:10 +00:00
# Sets -dV8_TRACE_MAPS.
2017-01-13 17:28:51 +00:00
v8_enable_trace_maps = ""
# Sets -dV8_ENABLE_CHECKS.
v8_enable_v8_checks = ""
2016-04-08 14:16:47 +00:00
2021-02-16 08:33:34 +00:00
# Sets -dV8_TRACE_UNOPTIMIZED.
2021-02-17 12:11:40 +00:00
v8_enable_trace_unoptimized = ""
2017-05-16 15:52:10 +00:00
v8_enable_trace_ignition = false
2021-02-17 12:11:40 +00:00
v8_enable_trace_baseline_exec = false
2017-04-11 15:32:32 +00:00
2017-10-23 11:23:45 +00:00
# Sets -dV8_TRACE_FEEDBACK_UPDATES.
v8_enable_trace_feedback_updates = false
2020-10-05 12:05:16 +00:00
# Sets -dV8_ATOMIC_OBJECT_FIELD_WRITES and turns all field write operations
# into relaxed atomic operations.
v8_enable_atomic_object_field_writes = ""
# Sets -dV8_ATOMIC_MARKING_STATE
v8_enable_atomic_marking_state = ""
# Controls the default values of v8_enable_atomic_object_field_writes and
# v8_enable_concurrent_marking_state. See the default setting code below.
2017-11-07 12:12:45 +00:00
v8_enable_concurrent_marking = true
2017-05-17 15:22:38 +00:00
[diagnostics] Support --turbo-profiling for builtins
Currently, if d8 is run with the --turbo-profiling flag, it prints info
about every TurboFan-compiled function. This info includes the number of
times that each basic block in the function was run. It also includes
text representations of the function's schedule and code, so that the
person reading the output can associate counters with blocks of code.
The data about each function is currently stored in a
BasicBlockProfiler::Data instance, which is attached to a list owned by
the singleton BasicBlockProfiler. Each Data contains an
std::vector<uint32_t> which represents how many times each block in the
function has executed. The generated code for each block uses a raw
pointer into the storage of that vector to implement incrementing the
counter.
With this change, if you compile with v8_enable_builtins_profiling and
then run with --turbo-profiling, d8 will print that same info about
builtins too.
In order to generate code that can survive being serialized to a
snapshot and reloaded, this change uses counters in the JS heap instead
of a std::vector outside the JS heap. The steps for instrumentation are
as follows:
1. Between scheduling and instruction selection, add code to increment
the counter for each block. The counters array doesn't yet exist at
this point, and allocation is disallowed, so at this point the code
refers to a special marker value.
2. During finalization of the code, allocate a BasicBlockProfilingData
object on the JS heap containing data equivalent to what is stored in
BasicBlockProfiler::Data. This includes a ByteArray that is big
enough to store the counters for each block.
3. Patch the reference in the BuiltinsConstantsTableBuilder so that
instead of referring to the marker object, it now refers to this
ByteArray. Also add the BasicBlockProfilingData object to a list that
is attached to the heap roots so it can be easily accessed for
printing.
Because these steps include modifying the BuiltinsConstantsTableBuilder,
this procedure is only applicable to builtins. Runtime-generated code
still uses raw pointers into std::vector instances. In order to keep
divergence between these code paths to a minimum, most work is done
referring to instances of BasicBlockProfiler::Data (the C++ class), and
functions are provided to copy back and forth between that type and
BasicBlockProfilingData (the JS heap object).
This change is intended only to make --turbo-profiling work consistently
on more kinds of functions, but with some further work, this data could
form the basis for:
- code coverage info for fuzzers, and/or
- hot-path info for profile-guided optimization.
Bug: v8:10470, v8:9119
Change-Id: Ib556a5bc3abe67cdaa2e3ee62702a2a08b11cb61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159738
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67944}
2020-05-21 15:51:40 +00:00
# Runs mksnapshot with --turbo-profiling. After building in this
2020-05-29 17:45:32 +00:00
# configuration, any subsequent run of d8 will output information about usage
# of basic blocks in builtins.
[diagnostics] Support --turbo-profiling for builtins
Currently, if d8 is run with the --turbo-profiling flag, it prints info
about every TurboFan-compiled function. This info includes the number of
times that each basic block in the function was run. It also includes
text representations of the function's schedule and code, so that the
person reading the output can associate counters with blocks of code.
The data about each function is currently stored in a
BasicBlockProfiler::Data instance, which is attached to a list owned by
the singleton BasicBlockProfiler. Each Data contains an
std::vector<uint32_t> which represents how many times each block in the
function has executed. The generated code for each block uses a raw
pointer into the storage of that vector to implement incrementing the
counter.
With this change, if you compile with v8_enable_builtins_profiling and
then run with --turbo-profiling, d8 will print that same info about
builtins too.
In order to generate code that can survive being serialized to a
snapshot and reloaded, this change uses counters in the JS heap instead
of a std::vector outside the JS heap. The steps for instrumentation are
as follows:
1. Between scheduling and instruction selection, add code to increment
the counter for each block. The counters array doesn't yet exist at
this point, and allocation is disallowed, so at this point the code
refers to a special marker value.
2. During finalization of the code, allocate a BasicBlockProfilingData
object on the JS heap containing data equivalent to what is stored in
BasicBlockProfiler::Data. This includes a ByteArray that is big
enough to store the counters for each block.
3. Patch the reference in the BuiltinsConstantsTableBuilder so that
instead of referring to the marker object, it now refers to this
ByteArray. Also add the BasicBlockProfilingData object to a list that
is attached to the heap roots so it can be easily accessed for
printing.
Because these steps include modifying the BuiltinsConstantsTableBuilder,
this procedure is only applicable to builtins. Runtime-generated code
still uses raw pointers into std::vector instances. In order to keep
divergence between these code paths to a minimum, most work is done
referring to instances of BasicBlockProfiler::Data (the C++ class), and
functions are provided to copy back and forth between that type and
BasicBlockProfilingData (the JS heap object).
This change is intended only to make --turbo-profiling work consistently
on more kinds of functions, but with some further work, this data could
form the basis for:
- code coverage info for fuzzers, and/or
- hot-path info for profile-guided optimization.
Bug: v8:10470, v8:9119
Change-Id: Ib556a5bc3abe67cdaa2e3ee62702a2a08b11cb61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159738
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67944}
2020-05-21 15:51:40 +00:00
v8_enable_builtins_profiling = false
2020-05-29 17:45:32 +00:00
# Runs mksnapshot with --turbo-profiling-verbose. After building in this
# configuration, any subsequent run of d8 will output information about usage
# of basic blocks in builtins, including the schedule and disassembly of all
# used builtins.
v8_enable_builtins_profiling_verbose = false
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
# Provides the given V8 log file as an input to mksnapshot, where it can be
# used for profile-guided optimization of builtins.
#
# To do profile-guided optimizations of builtins:
# 1. Build with v8_enable_builtins_profiling = true
# 2. Run your chosen workload with the --turbo-profiling-log-builtins flag.
# For Chrome, the invocation might look like this:
# chrome --no-sandbox --disable-extensions
# --js-flags="--turbo-profiling-log-builtins --logfile=path/to/v8.log"
# "http://localhost/test-suite"
# 3. Optionally repeat step 2 for additional workloads, and concatenate all of
# the resulting log files into a single file.
# 4. Build again with v8_builtins_profiling_log_file set to the file created
# in steps 2-3.
v8_builtins_profiling_log_file = ""
2018-01-17 13:30:12 +00:00
# Enables various testing features.
v8_enable_test_features = ""
2017-11-30 09:20:19 +00:00
2021-03-17 09:31:08 +00:00
# Enable short builtins call instruction sequences by un-embedding builtins.
# Sets -dV8_SHORT_BUILTIN_CALLS
v8_enable_short_builtin_calls = ""
2016-04-08 14:16:47 +00:00
# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
v8_postmortem_support = false
2016-05-02 08:10:32 +00:00
2019-01-09 14:38:22 +00:00
# Use Siphash as added protection against hash flooding attacks.
v8_use_siphash = false
2016-09-14 11:18:20 +00:00
# Switches off inlining in V8.
v8_no_inline = false
2016-11-15 14:39:59 +00:00
# Override OS page size when generating snapshot
v8_os_page_size = "0"
2016-05-02 08:10:32 +00:00
# Similar to vfp but on MIPS.
v8_can_use_fpu_instructions = true
# Similar to the ARM hard float ABI but on MIPS.
v8_use_mips_abi_hardfloat = true
2015-11-11 01:09:06 +00:00
2017-09-14 12:09:54 +00:00
# Controls the threshold for on-heap/off-heap Typed Arrays.
v8_typed_array_max_size_in_heap = 64
2020-09-11 08:11:42 +00:00
v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64") &&
(is_linux || is_chromeos || is_mac)) ||
(v8_current_cpu == "ppc64" && (is_linux || is_chromeos))
2017-06-02 11:52:40 +00:00
# Temporary flag to allow embedders to update their microtasks scopes
# while rolling in a new version of V8.
v8_check_microtasks_scopes_consistency = ""
2017-11-27 09:36:01 +00:00
2018-01-05 10:05:05 +00:00
# Enable mitigations for executing untrusted code.
2018-10-17 14:19:56 +00:00
# Disabled by default on ia32 due to conflicting requirements with embedded
# builtins. Enabled by default on Android since it doesn't support
# site-isolation in Chrome and on simulator builds which test code generation
# on these platforms.
v8_untrusted_code_mitigations =
2020-01-13 11:03:55 +00:00
v8_current_cpu != "x86" && (is_android || target_is_simulator)
2018-04-09 15:40:52 +00:00
# Enable minor mark compact.
v8_enable_minor_mc = true
2018-07-20 13:13:31 +00:00
# Check that each header can be included in isolation (requires also
# setting the "check_v8_header_includes" gclient variable to run a
# specific hook).
v8_check_header_includes = false
2019-03-14 13:43:30 +00:00
# Enable sharing read-only space across isolates.
2019-05-14 17:27:21 +00:00
# Sets -DV8_SHARED_RO_HEAP.
v8_enable_shared_ro_heap = ""
2019-07-24 05:03:35 +00:00
2019-08-20 15:36:41 +00:00
# Enable lazy source positions by default.
v8_enable_lazy_source_positions = true
2019-08-02 14:46:02 +00:00
2019-11-22 10:31:02 +00:00
# Enable third party HEAP library
v8_enable_third_party_heap = false
# Libaries used by third party heap
v8_third_party_heap_libs = []
# Source code used by third party heap
v8_third_party_heap_files = []
2019-07-31 22:28:27 +00:00
# Disable write barriers when GCs are non-incremental and
# heap has single generation.
v8_disable_write_barriers = false
2020-06-30 22:10:28 +00:00
# Ensure that write barriers are always used.
# Useful for debugging purposes.
v8_enable_unconditional_write_barriers = false
2019-07-31 22:28:27 +00:00
# Redirect allocation in young generation so that there will be
# only one single generation.
v8_enable_single_generation = ""
2019-08-06 12:53:11 +00:00
# Use token threaded dispatch for the regular expression interpreter.
# Use switch-based dispatch if this is false
v8_enable_regexp_interpreter_threaded_dispatch = true
2020-01-21 14:00:59 +00:00
# Enable additional targets necessary for verification of torque
# file generation
v8_verify_torque_generation_invariance = false
2020-02-07 20:22:04 +00:00
2021-03-10 19:24:38 +00:00
# Generate comments describing the Torque intermediate representation.
v8_annotate_torque_ir = false
2020-02-07 20:22:04 +00:00
# Disable all snapshot compression.
v8_enable_snapshot_compression = true
2020-02-12 11:45:31 +00:00
# Enable control-flow integrity features, such as pointer authentication for
# ARM64.
v8_control_flow_integrity = false
2020-04-15 13:37:22 +00:00
# Enable object names in cppgc for debug purposes.
cppgc_enable_object_names = false
2020-04-29 15:28:17 +00:00
2020-05-29 10:34:52 +00:00
# Enable heap reservation of size 4GB. Only possible for 64bit archs.
cppgc_enable_caged_heap = v8_current_cpu == "x64" || v8_current_cpu == "arm64"
2020-06-16 22:41:00 +00:00
# Enable young generation in cppgc.
cppgc_enable_young_generation = false
2020-07-23 09:29:59 +00:00
# Enable V8 zone compression experimental feature.
# Sets -DV8_COMPRESS_ZONES.
v8_enable_zone_compression = ""
2020-04-29 15:28:17 +00:00
# Enable V8 heap sandbox experimental feature.
# Sets -DV8_HEAP_SANDBOX.
v8_enable_heap_sandbox = ""
2020-05-06 11:41:26 +00:00
2020-07-21 16:54:22 +00:00
# Experimental feature for collecting per-class zone memory stats.
# Requires use_rtti = true
v8_enable_precise_zone_stats = false
2020-10-06 11:43:04 +00:00
2021-03-25 23:14:31 +00:00
# Experimental feature that uses SwissNameDictionary instead of NameDictionary
# as the backing store for all dictionary mode objects.
v8_enable_swiss_name_dictionary = false
2021-01-18 15:45:12 +00:00
# If enabled then macro definitions that are used in externally visible
# header files are placed in a separate header file v8-gn.h.
2021-02-15 13:26:12 +00:00
v8_generate_external_defines_header = false
2021-01-25 16:11:10 +00:00
2021-02-04 10:42:49 +00:00
# Experimental feature for tracking constness of properties in non-global
# dictionaries. Enabling this also always keeps prototypes in dict mode,
# meaning that they are not switched to fast mode.
# Sets -DV8_DICT_PROPERTY_CONST_TRACKING
v8_dict_property_const_tracking = false
2021-04-06 12:01:44 +00:00
# Enable map packing & unpacking (sets -dV8_MAP_PACKING).
v8_enable_map_packing = false
2021-04-19 12:38:45 +00:00
# Allow for JS promise hooks (instead of just C++).
v8_allow_javascript_in_promise_hooks = false
2018-09-12 11:55:04 +00:00
}
2016-07-26 12:00:17 +00:00
# Derived defaults.
2017-01-13 17:28:51 +00:00
if (v8_enable_verify_heap == "") {
2018-04-06 10:24:41 +00:00
v8_enable_verify_heap = v8_enable_debugging_features
2017-01-13 17:28:51 +00:00
}
if (v8_enable_object_print == "") {
2018-04-06 10:24:41 +00:00
v8_enable_object_print = v8_enable_debugging_features
2016-07-26 12:00:17 +00:00
}
if (v8_enable_disassembler == "") {
2018-04-06 10:24:41 +00:00
v8_enable_disassembler = v8_enable_debugging_features
2017-01-13 17:28:51 +00:00
}
if (v8_enable_trace_maps == "") {
2018-04-06 10:24:41 +00:00
v8_enable_trace_maps = v8_enable_debugging_features
2017-01-13 17:28:51 +00:00
}
2018-01-17 13:30:12 +00:00
if (v8_enable_test_features == "") {
2018-04-06 10:24:41 +00:00
v8_enable_test_features = v8_enable_debugging_features || dcheck_always_on
2017-11-30 09:20:19 +00:00
}
2017-01-13 17:28:51 +00:00
if (v8_enable_v8_checks == "") {
2018-04-06 10:24:41 +00:00
v8_enable_v8_checks = v8_enable_debugging_features
2016-07-26 12:00:17 +00:00
}
2021-04-19 09:22:57 +00:00
if (v8_enable_snapshot_code_comments) {
assert(v8_code_comments || v8_code_comments == "",
"v8_enable_snapshot_code_comments conflicts with v8_code_comments.")
v8_code_comments = true
} else if (v8_code_comments == "") {
v8_code_comments = v8_enable_debugging_features
}
2017-06-02 11:52:40 +00:00
if (v8_check_microtasks_scopes_consistency == "") {
2018-04-06 10:24:41 +00:00
v8_check_microtasks_scopes_consistency =
v8_enable_debugging_features || dcheck_always_on
2017-06-02 11:52:40 +00:00
}
2019-03-28 12:37:29 +00:00
if (v8_enable_snapshot_native_code_counters == "") {
v8_enable_snapshot_native_code_counters = v8_enable_debugging_features
}
2019-07-31 18:21:15 +00:00
if (v8_enable_pointer_compression == "") {
2019-11-24 23:19:26 +00:00
v8_enable_pointer_compression =
2021-04-14 14:09:35 +00:00
v8_current_cpu == "arm64" || v8_current_cpu == "x64"
2019-07-31 18:21:15 +00:00
}
2021-03-05 00:55:44 +00:00
if (v8_enable_pointer_compression_shared_cage == "") {
2021-04-05 19:15:33 +00:00
v8_enable_pointer_compression_shared_cage = false
2021-03-05 00:55:44 +00:00
}
2019-05-15 17:14:05 +00:00
if (v8_enable_fast_torque == "") {
v8_enable_fast_torque = v8_enable_fast_mksnapshot
}
2020-07-23 09:29:59 +00:00
if (v8_enable_zone_compression == "") {
v8_enable_zone_compression = false
}
2020-04-29 15:28:17 +00:00
if (v8_enable_heap_sandbox == "") {
v8_enable_heap_sandbox = false
}
2021-03-17 09:31:08 +00:00
if (v8_enable_short_builtin_calls == "") {
2021-03-18 08:45:43 +00:00
v8_enable_short_builtin_calls =
v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64")
2021-03-17 09:31:08 +00:00
}
2019-07-31 22:28:27 +00:00
if (v8_enable_single_generation == "") {
v8_enable_single_generation = v8_disable_write_barriers
}
2020-10-05 12:05:16 +00:00
if (v8_enable_atomic_object_field_writes == "") {
v8_enable_atomic_object_field_writes = v8_enable_concurrent_marking
}
if (v8_enable_atomic_marking_state == "") {
v8_enable_atomic_marking_state = v8_enable_concurrent_marking
}
assert(!v8_enable_concurrent_marking || v8_enable_atomic_object_field_writes,
"Concurrent marking requires atomic object field writes.")
assert(!v8_enable_concurrent_marking || v8_enable_atomic_marking_state,
"Concurrent marking requires atomic marking state.")
2021-02-16 08:33:34 +00:00
if (v8_enable_trace_unoptimized == "") {
v8_enable_trace_unoptimized =
2021-02-17 12:11:40 +00:00
v8_enable_trace_ignition || v8_enable_trace_baseline_exec
2021-02-16 08:33:34 +00:00
}
assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized,
"Ignition tracing requires unoptimized tracing to be enabled.")
2021-02-17 12:11:40 +00:00
assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized,
2021-02-16 08:33:34 +00:00
"Baseline tracing requires unoptimized tracing to be enabled.")
2019-07-31 22:28:27 +00:00
2019-10-23 11:45:16 +00:00
# Toggle pointer compression for correctness fuzzing when building the
# clang_x64_pointer_compression toolchain. We'll correctness-compare the
# default build with the clang_x64_pointer_compression build.
if (v8_multi_arch_build &&
rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) ==
"clang_x64_pointer_compression") {
v8_enable_pointer_compression = !v8_enable_pointer_compression
2021-03-05 00:55:44 +00:00
v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
2019-10-23 11:45:16 +00:00
}
2021-03-25 16:14:23 +00:00
if (v8_enable_short_builtin_calls &&
2021-04-10 02:09:41 +00:00
(!v8_enable_pointer_compression ||
v8_enable_pointer_compression_shared_cage || v8_control_flow_integrity)) {
# Disable short calls when pointer compression in a per-Isolate cage is not
# enabled. Or when CFI is enabled (until the CFI-related issues are fixed).
2021-03-18 08:45:43 +00:00
v8_enable_short_builtin_calls = false
}
2019-10-23 14:00:56 +00:00
if (v8_enable_shared_ro_heap == "") {
2020-10-08 07:42:50 +00:00
v8_enable_shared_ro_heap = !v8_enable_pointer_compression
2019-10-23 14:00:56 +00:00
}
2019-10-23 11:45:16 +00:00
2019-07-31 22:28:27 +00:00
assert(!v8_disable_write_barriers || v8_enable_single_generation,
"Disabling write barriers works only with single generation")
2018-11-15 09:00:41 +00:00
assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations,
"Untrusted code mitigations are unsupported on ia32")
2020-02-12 11:45:31 +00:00
assert(v8_current_cpu == "arm64" || !v8_control_flow_integrity,
"Control-flow integrity is only supported on arm64")
2020-07-31 12:52:57 +00:00
if (v8_enable_shared_ro_heap && v8_enable_pointer_compression) {
assert(
2020-09-11 08:11:42 +00:00
is_linux || is_chromeos || is_android,
2020-10-08 07:42:50 +00:00
"Sharing read-only heap with pointer compression is only supported on Linux or Android")
2020-07-31 12:52:57 +00:00
}
2019-05-09 13:43:46 +00:00
2021-04-06 12:01:44 +00:00
assert(!v8_enable_map_packing || !v8_enable_pointer_compression,
"Map packing does not support pointer compression")
assert(!v8_enable_map_packing || v8_current_cpu == "x64",
"Map packing is only supported on x64")
2021-04-05 19:42:59 +00:00
assert(
!v8_enable_pointer_compression_shared_cage || !v8_enable_shared_ro_heap,
"Sharing read-only heap is not yet supported when sharing a pointer compression cage")
2020-08-18 12:47:13 +00:00
assert(!v8_use_multi_snapshots || !v8_control_flow_integrity,
"Control-flow integrity does not support multisnapshots")
2020-04-29 15:28:17 +00:00
assert(!v8_enable_heap_sandbox || v8_enable_pointer_compression,
"V8 Heap Sandbox requires pointer compression")
2021-03-05 00:55:44 +00:00
assert(
!v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression,
"Can't share a pointer compression cage if pointers aren't compressed")
2020-06-30 22:10:28 +00:00
assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers,
"Write barriers can't be both enabled and disabled")
2020-05-29 10:34:52 +00:00
assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" ||
v8_current_cpu == "arm64",
"CppGC caged heap requires 64bit platforms")
2020-06-16 22:41:00 +00:00
assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap,
"Young generation in CppGC requires caged heap")
2020-06-30 22:10:28 +00:00
if (v8_enable_single_generation == true) {
assert(
v8_enable_unconditional_write_barriers || v8_disable_write_barriers,
"Requires unconditional write barriers or none (which disables incremental marking)")
}
2020-08-28 20:48:41 +00:00
assert(!v8_enable_conservative_stack_scanning || v8_enable_single_generation,
"Conservative stack scanning requires single generation")
2014-06-03 06:50:46 +00:00
v8_random_seed = "314159265"
2016-05-06 07:30:52 +00:00
v8_toolset_for_shell = "host"
2014-05-05 11:06:26 +00:00
###############################################################################
# Configurations
#
2019-02-11 16:11:08 +00:00
config("internal_config_base") {
2020-08-25 23:17:11 +00:00
# Only targets in this file and its subdirs can depend on this.
2020-08-18 18:17:48 +00:00
visibility = [ "./*" ]
2014-05-05 11:06:26 +00:00
2020-04-17 20:46:18 +00:00
configs = [ ":v8_tracing_config" ]
2018-04-16 09:24:22 +00:00
include_dirs = [
".",
2020-04-20 18:19:29 +00:00
"include",
2018-04-16 09:24:22 +00:00
"$target_gen_dir",
2021-01-18 15:45:12 +00:00
"$target_gen_dir/include",
2018-04-16 09:24:22 +00:00
]
2014-06-05 08:45:24 +00:00
}
2019-02-11 16:11:08 +00:00
config("internal_config") {
defines = []
2020-08-25 23:17:11 +00:00
2020-08-18 18:17:48 +00:00
# Only targets in this file and its subdirs can depend on this.
visibility = [ "./*" ]
2014-07-03 08:50:52 +00:00
2019-02-11 16:11:08 +00:00
configs = [
"//build/config/compiler:wexit_time_destructors",
":internal_config_base",
":v8_header_features",
2020-11-24 20:44:23 +00:00
":cppgc_header_features",
2018-04-16 09:24:22 +00:00
]
2019-02-11 16:11:08 +00:00
if (is_component_build) {
defines += [ "BUILDING_V8_SHARED" ]
}
2014-07-03 08:50:52 +00:00
}
2020-03-04 11:35:45 +00:00
# Should be applied to all targets that write trace events.
config("v8_tracing_config") {
if (v8_use_perfetto) {
include_dirs = [
"third_party/perfetto/include",
"$root_gen_dir/third_party/perfetto",
"$root_gen_dir/third_party/perfetto/build_config",
]
}
}
2016-02-29 11:02:52 +00:00
# This config should be applied to code using the libplatform.
config("libplatform_config") {
include_dirs = [ "include" ]
2016-10-10 08:51:48 +00:00
if (is_component_build) {
defines = [ "USING_V8_PLATFORM_SHARED" ]
}
2016-02-29 11:02:52 +00:00
}
2016-10-07 07:56:43 +00:00
# This config should be applied to code using the libbase.
config("libbase_config") {
if (is_component_build) {
defines = [ "USING_V8_BASE_SHARED" ]
}
libs = []
if (is_android && current_toolchain != host_toolchain) {
libs += [ "log" ]
}
2021-01-18 15:45:12 +00:00
include_dirs = [ "$target_gen_dir/include" ]
2016-10-07 07:56:43 +00:00
}
2020-11-24 02:11:37 +00:00
# Standalone cppgc cannot be built within chrome or with perfetto.
assert(!cppgc_is_standalone || !build_with_chromium)
assert(!cppgc_is_standalone || !v8_use_perfetto)
2020-04-01 22:11:38 +00:00
# This config should be applied to code using the cppgc_base.
config("cppgc_base_config") {
2020-04-15 13:37:22 +00:00
defines = []
2020-11-25 09:22:14 +00:00
if (cppgc_is_standalone) {
defines += [ "CPPGC_IS_STANDALONE" ]
2020-11-24 02:11:37 +00:00
}
2020-04-01 22:11:38 +00:00
}
2021-01-14 13:06:39 +00:00
# This config is only applied to v8_headers and is the basis for external_config
# but without setting the USING_V8_SHARED define, which means v8_headers can be
# used inside v8 itself.
config("headers_config") {
2017-09-08 10:24:58 +00:00
defines = []
2020-11-24 20:44:23 +00:00
configs = [
":v8_header_features",
":cppgc_header_features",
]
2017-03-31 08:24:34 +00:00
include_dirs = [
"include",
"$target_gen_dir/include",
]
2014-05-05 11:06:26 +00:00
}
2021-01-14 13:06:39 +00:00
# This config should only be applied to code using V8 and not any V8 code
# itself.
config("external_config") {
configs = [ ":headers_config" ]
defines = []
if (is_component_build) {
defines += [ "USING_V8_SHARED" ]
}
}
2015-10-21 00:37:28 +00:00
# This config should only be applied to code that needs to be explicitly
# aware of whether we are using startup data or not.
config("external_startup_data") {
if (v8_use_external_startup_data) {
defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
}
}
2021-01-18 15:45:12 +00:00
# List of defines that can appear in externally visible header files and that
# are controlled by args.gn.
external_v8_defines = [
"V8_ENABLE_CHECKS",
"V8_COMPRESS_POINTERS",
2021-03-05 00:55:44 +00:00
"V8_COMPRESS_POINTERS_IN_SHARED_CAGE",
2021-04-05 19:42:59 +00:00
"V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE",
2021-01-18 15:45:12 +00:00
"V8_31BIT_SMIS_ON_64BIT_ARCH",
"V8_COMPRESS_ZONES",
"V8_HEAP_SANDBOX",
"V8_DEPRECATION_WARNINGS",
"V8_IMMINENT_DEPRECATION_WARNINGS",
"V8_NO_ARGUMENTS_ADAPTOR",
"V8_USE_PERFETTO",
2021-04-06 12:01:44 +00:00
"V8_MAP_PACKING",
2021-01-18 15:45:12 +00:00
]
enabled_external_v8_defines = []
if (v8_enable_v8_checks) {
enabled_external_v8_defines += [ "V8_ENABLE_CHECKS" ]
}
if (v8_enable_pointer_compression) {
enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS" ]
2021-04-10 02:09:41 +00:00
if (v8_enable_pointer_compression_shared_cage) {
enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_SHARED_CAGE" ]
} else {
enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE" ]
}
2021-03-05 00:55:44 +00:00
}
2021-01-18 15:45:12 +00:00
if (v8_enable_pointer_compression || v8_enable_31bit_smis_on_64bit_arch) {
enabled_external_v8_defines += [ "V8_31BIT_SMIS_ON_64BIT_ARCH" ]
}
if (v8_enable_zone_compression) {
enabled_external_v8_defines += [ "V8_COMPRESS_ZONES" ]
}
if (v8_enable_heap_sandbox) {
enabled_external_v8_defines += [ "V8_HEAP_SANDBOX" ]
}
if (v8_deprecation_warnings) {
enabled_external_v8_defines += [ "V8_DEPRECATION_WARNINGS" ]
}
if (v8_imminent_deprecation_warnings) {
enabled_external_v8_defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
}
if (v8_use_perfetto) {
enabled_external_v8_defines += [ "V8_USE_PERFETTO" ]
}
2021-04-06 12:01:44 +00:00
if (v8_enable_map_packing) {
enabled_external_v8_defines += [ "V8_MAP_PACKING" ]
}
2021-01-18 15:45:12 +00:00
disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines
2019-02-11 16:11:08 +00:00
# Put defines that are used in public headers here; public headers are
# defined in "v8_headers" and are included by embedders of V8.
config("v8_header_features") {
visibility = [ ":*" ]
2021-01-18 15:45:12 +00:00
if (v8_generate_external_defines_header) {
2021-02-15 13:26:12 +00:00
defines = [ "V8_GN_HEADER" ]
} else {
defines = enabled_external_v8_defines
2021-01-11 11:51:52 +00:00
}
2019-02-11 16:11:08 +00:00
}
2021-01-18 15:45:12 +00:00
# List of defines that can appear in externally visible cppgc header files and
# that are controlled by args.gn.
external_cppgc_defines = [
"CPPGC_SUPPORTS_OBJECT_NAMES",
"CPPGC_CAGED_HEAP",
"CPPGC_YOUNG_GENERATION",
]
enabled_external_cppgc_defines = []
if (cppgc_enable_object_names) {
enabled_external_cppgc_defines += [ "CPPGC_SUPPORTS_OBJECT_NAMES" ]
}
if (cppgc_enable_caged_heap) {
enabled_external_cppgc_defines += [ "CPPGC_CAGED_HEAP" ]
}
if (cppgc_enable_young_generation) {
enabled_external_cppgc_defines += [ "CPPGC_YOUNG_GENERATION" ]
}
disabled_external_cppgc_defines =
external_cppgc_defines - enabled_external_cppgc_defines
2020-11-24 20:44:23 +00:00
config("cppgc_header_features") {
visibility = [ ":*" ]
2021-01-18 15:45:12 +00:00
if (v8_generate_external_defines_header) {
2021-02-15 13:26:12 +00:00
defines = [ "V8_GN_HEADER" ]
} else {
defines = enabled_external_cppgc_defines
2020-11-24 20:44:23 +00:00
}
}
2021-01-18 15:45:12 +00:00
enabled_external_defines =
enabled_external_v8_defines + enabled_external_cppgc_defines
disabled_external_defines =
disabled_external_v8_defines + disabled_external_cppgc_defines
2019-02-11 16:11:08 +00:00
# Put defines here that are only used in our internal files and NEVER in
# external headers that embedders (such as chromium and node) might include.
2014-05-06 15:01:24 +00:00
config("features") {
2020-08-18 18:17:48 +00:00
# Only targets in this file and its subdirs can depend on this.
visibility = [ "./*" ]
2014-05-06 15:01:24 +00:00
defines = []
2020-11-24 20:44:23 +00:00
configs = [
":v8_header_features",
":cppgc_header_features",
]
2019-02-11 16:11:08 +00:00
2017-09-28 14:05:22 +00:00
if (v8_embedder_string != "") {
defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ]
}
2016-04-08 14:16:47 +00:00
if (v8_enable_disassembler) {
2015-01-08 13:21:52 +00:00
defines += [ "ENABLE_DISASSEMBLER" ]
2014-05-06 15:01:24 +00:00
}
2017-05-23 17:54:12 +00:00
if (v8_promise_internal_field_count != 0) {
defines +=
[ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ]
}
2017-09-14 12:09:54 +00:00
defines +=
[ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ]
2019-12-17 09:25:28 +00:00
assert(
!v8_enable_raw_heap_snapshots,
"This flag is deprecated and is now available through the inspector interface as an argument to profiler's method `takeHeapSnapshot`. Consider using blink's flag `enable_additional_blink_object_names` to get better naming of internal objects.")
2017-03-01 12:36:40 +00:00
if (v8_enable_future) {
defines += [ "V8_ENABLE_FUTURE" ]
}
2018-10-15 13:10:51 +00:00
if (v8_enable_lite_mode) {
defines += [ "V8_LITE_MODE" ]
}
2016-04-08 14:16:47 +00:00
if (v8_enable_gdbjit) {
2015-01-08 13:21:52 +00:00
defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
2014-05-06 15:01:24 +00:00
}
2017-02-13 02:54:05 +00:00
if (v8_enable_vtunejit) {
defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ]
}
2019-12-14 08:46:38 +00:00
if (v8_enable_vtunetracemark) {
defines += [ "ENABLE_VTUNE_TRACEMARK" ]
}
2018-04-09 15:40:52 +00:00
if (v8_enable_minor_mc) {
defines += [ "ENABLE_MINOR_MC" ]
}
2017-01-13 17:28:51 +00:00
if (v8_enable_object_print) {
2015-01-08 13:21:52 +00:00
defines += [ "OBJECT_PRINT" ]
2014-05-06 15:01:24 +00:00
}
2016-04-08 14:16:47 +00:00
if (v8_enable_verify_heap) {
2015-01-08 13:21:52 +00:00
defines += [ "VERIFY_HEAP" ]
2014-05-06 15:01:24 +00:00
}
2017-01-05 15:01:30 +00:00
if (v8_enable_verify_predictable) {
defines += [ "VERIFY_PREDICTABLE" ]
}
2017-01-13 17:28:51 +00:00
if (v8_enable_trace_maps) {
2017-05-16 15:52:10 +00:00
defines += [ "V8_TRACE_MAPS" ]
}
2021-02-16 08:33:34 +00:00
if (v8_enable_trace_unoptimized) {
defines += [ "V8_TRACE_UNOPTIMIZED" ]
2017-01-13 17:28:51 +00:00
}
2017-10-23 11:23:45 +00:00
if (v8_enable_trace_feedback_updates) {
defines += [ "V8_TRACE_FEEDBACK_UPDATES" ]
}
2018-01-17 13:30:12 +00:00
if (v8_enable_test_features) {
defines += [ "V8_ENABLE_ALLOCATION_TIMEOUT" ]
2017-11-30 18:00:08 +00:00
defines += [ "V8_ENABLE_FORCE_SLOW_PATH" ]
2019-06-11 14:13:45 +00:00
defines += [ "V8_ENABLE_DOUBLE_CONST_STORE_CHECK" ]
2017-11-30 09:20:19 +00:00
}
2016-04-08 14:16:47 +00:00
if (v8_enable_i18n_support) {
2017-04-21 08:35:12 +00:00
defines += [ "V8_INTL_SUPPORT" ]
2014-05-06 15:01:24 +00:00
}
2016-04-08 14:16:47 +00:00
if (v8_enable_handle_zapping) {
2015-01-08 13:21:52 +00:00
defines += [ "ENABLE_HANDLE_ZAPPING" ]
2014-05-06 15:01:24 +00:00
}
2021-04-19 09:22:57 +00:00
if (v8_code_comments == true) {
defines += [ "V8_CODE_COMMENTS" ]
}
2019-10-15 06:51:14 +00:00
if (v8_enable_snapshot_native_code_counters) {
defines += [ "V8_SNAPSHOT_NATIVE_CODE_COUNTERS" ]
2017-03-14 12:31:03 +00:00
}
2019-07-24 05:03:35 +00:00
if (v8_enable_single_generation) {
defines += [ "V8_ENABLE_SINGLE_GENERATION" ]
}
2020-08-28 20:48:41 +00:00
if (v8_enable_conservative_stack_scanning) {
defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ]
}
2019-07-31 22:28:27 +00:00
if (v8_disable_write_barriers) {
defines += [ "V8_DISABLE_WRITE_BARRIERS" ]
}
2019-11-22 10:31:02 +00:00
if (v8_enable_third_party_heap) {
defines += [ "V8_ENABLE_THIRD_PARTY_HEAP" ]
}
2016-04-08 14:16:47 +00:00
if (v8_use_external_startup_data) {
2015-01-08 13:21:52 +00:00
defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
2014-06-23 13:52:17 +00:00
}
2020-10-05 12:05:16 +00:00
if (v8_enable_atomic_object_field_writes) {
defines += [ "V8_ATOMIC_OBJECT_FIELD_WRITES" ]
}
if (v8_enable_atomic_marking_state) {
defines += [ "V8_ATOMIC_MARKING_STATE" ]
2017-05-17 15:22:38 +00:00
}
2019-08-02 14:46:02 +00:00
if (v8_enable_lazy_source_positions) {
defines += [ "V8_ENABLE_LAZY_SOURCE_POSITIONS" ]
}
2017-06-02 11:52:40 +00:00
if (v8_check_microtasks_scopes_consistency) {
defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ]
}
2018-03-20 10:16:14 +00:00
if (v8_use_multi_snapshots) {
defines += [ "V8_MULTI_SNAPSHOTS" ]
}
2019-01-09 14:38:22 +00:00
if (v8_use_siphash) {
defines += [ "V8_USE_SIPHASH" ]
}
2019-03-14 13:43:30 +00:00
if (v8_enable_shared_ro_heap) {
defines += [ "V8_SHARED_RO_HEAP" ]
}
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 (v8_win64_unwinding_info) {
defines += [ "V8_WIN64_UNWINDING_INFO" ]
}
2019-08-06 12:53:11 +00:00
if (v8_enable_regexp_interpreter_threaded_dispatch) {
defines += [ "V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH" ]
}
2020-02-07 20:22:04 +00:00
if (v8_enable_snapshot_compression) {
defines += [ "V8_SNAPSHOT_COMPRESSION" ]
}
2020-02-12 11:45:31 +00:00
if (v8_control_flow_integrity) {
defines += [ "V8_ENABLE_CONTROL_FLOW_INTEGRITY" ]
}
2020-02-17 05:01:29 +00:00
if (v8_enable_wasm_gdb_remote_debugging) {
defines += [ "V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING" ]
}
2020-07-21 16:54:22 +00:00
if (v8_enable_precise_zone_stats) {
defines += [ "V8_ENABLE_PRECISE_ZONE_STATS" ]
}
2020-06-02 10:14:03 +00:00
if (v8_fuzzilli) {
defines += [ "V8_FUZZILLI" ]
}
2021-03-17 09:31:08 +00:00
if (v8_enable_short_builtin_calls) {
defines += [ "V8_SHORT_BUILTIN_CALLS" ]
}
2021-03-25 23:14:31 +00:00
if (v8_enable_swiss_name_dictionary) {
defines += [ "V8_ENABLE_SWISS_NAME_DICTIONARY" ]
2020-10-06 11:43:04 +00:00
}
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
if (v8_enable_system_instrumentation) {
defines += [ "V8_ENABLE_SYSTEM_INSTRUMENTATION" ]
}
if (v8_etw_guid != "") {
defines += [ "V8_ETW_GUID=\"$v8_etw_guid\"" ]
}
2021-02-23 12:43:57 +00:00
if (v8_enable_webassembly) {
2021-01-25 16:11:10 +00:00
defines += [ "V8_ENABLE_WEBASSEMBLY" ]
}
2021-02-04 10:42:49 +00:00
if (v8_dict_property_const_tracking) {
defines += [ "V8_DICT_PROPERTY_CONST_TRACKING" ]
}
2021-04-19 12:38:45 +00:00
if (v8_allow_javascript_in_promise_hooks) {
defines += [ "V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS" ]
}
2014-05-06 15:01:24 +00:00
}
2014-05-26 07:29:39 +00:00
config("toolchain") {
2020-08-18 18:17:48 +00:00
# Only targets in this file and its subdirs can depend on this.
visibility = [ "./*" ]
2014-05-26 07:29:39 +00:00
defines = []
cflags = []
2016-06-20 18:22:21 +00:00
ldflags = []
2014-05-26 07:29:39 +00:00
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "arm") {
2015-01-20 14:33:58 +00:00
defines += [ "V8_TARGET_ARCH_ARM" ]
2016-09-01 13:31:32 +00:00
if (arm_version >= 7) {
2016-05-02 08:10:32 +00:00
defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
}
if (arm_fpu == "vfpv3-d16") {
defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
} else if (arm_fpu == "vfpv3") {
2015-01-20 14:33:58 +00:00
defines += [
"CAN_USE_VFP3_INSTRUCTIONS",
"CAN_USE_VFP32DREGS",
2016-05-02 08:10:32 +00:00
]
} else if (arm_fpu == "neon") {
defines += [
"CAN_USE_VFP3_INSTRUCTIONS",
"CAN_USE_VFP32DREGS",
"CAN_USE_NEON",
2015-01-20 14:33:58 +00:00
]
}
2016-05-10 10:11:06 +00:00
2015-01-20 14:33:58 +00:00
# TODO(jochen): Add support for arm_test_noprobe.
2016-05-02 08:10:32 +00:00
if (current_cpu != "arm") {
# These defines ares used for the ARM simulator.
if (arm_float_abi == "hard") {
defines += [ "USE_EABI_HARDFLOAT=1" ]
} else if (arm_float_abi == "softfp") {
defines += [ "USE_EABI_HARDFLOAT=0" ]
}
}
2015-01-20 14:33:58 +00:00
}
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "arm64") {
2015-01-08 13:21:52 +00:00
defines += [ "V8_TARGET_ARCH_ARM64" ]
2020-02-12 11:45:31 +00:00
if (v8_control_flow_integrity) {
# TODO(v8:10026): Enable this in src/build.
if (current_cpu == "arm64") {
2020-03-17 14:54:12 +00:00
cflags += [ "-mbranch-protection=standard" ]
2020-11-17 11:58:44 +00:00
asmflags = [ "-mmark-bti-property" ]
2020-02-12 11:45:31 +00:00
}
}
2014-05-26 07:29:39 +00:00
}
2016-05-10 10:11:06 +00:00
2016-09-13 07:32:40 +00:00
# Mips64el/mipsel simulators.
2020-01-13 11:03:55 +00:00
if (target_is_simulator &&
2016-09-13 07:32:40 +00:00
(v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) {
defines += [ "_MIPS_TARGET_SIMULATOR" ]
}
2017-06-02 15:02:18 +00:00
if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") {
2015-03-17 23:13:00 +00:00
defines += [ "V8_TARGET_ARCH_MIPS" ]
2016-05-02 08:10:32 +00:00
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
}
if (v8_use_mips_abi_hardfloat) {
defines += [
"__mips_hard_float=1",
"CAN_USE_FPU_INSTRUCTIONS",
]
} else {
defines += [ "__mips_soft_float=1" ]
}
if (mips_arch_variant == "r6") {
defines += [
"_MIPS_ARCH_MIPS32R6",
"FPU_MODE_FP64",
]
2018-01-29 10:24:31 +00:00
if (mips_use_msa) {
defines += [ "_MIPS_MSA" ]
}
2016-05-02 08:10:32 +00:00
} else if (mips_arch_variant == "r2") {
defines += [ "_MIPS_ARCH_MIPS32R2" ]
if (mips_fpu_mode == "fp64") {
defines += [ "FPU_MODE_FP64" ]
} else if (mips_fpu_mode == "fpxx") {
defines += [ "FPU_MODE_FPXX" ]
} else if (mips_fpu_mode == "fp32") {
defines += [ "FPU_MODE_FP32" ]
}
} else if (mips_arch_variant == "r1") {
defines += [ "FPU_MODE_FP32" ]
}
2016-05-10 10:11:06 +00:00
2016-05-02 08:10:32 +00:00
# TODO(jochen): Add support for mips_arch_variant rx and loongson.
2015-03-17 23:13:00 +00:00
}
2016-05-10 10:11:06 +00:00
2017-06-02 15:02:18 +00:00
if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") {
2015-03-17 23:13:00 +00:00
defines += [ "V8_TARGET_ARCH_MIPS64" ]
2016-05-02 08:10:32 +00:00
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
}
2020-04-14 05:26:35 +00:00
if (mips_use_msa) {
defines += [ "_MIPS_MSA" ]
}
2017-06-02 15:02:18 +00:00
if (host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
} else if (host_byteorder == "big") {
defines += [ "V8_TARGET_ARCH_MIPS64_BE" ]
}
2016-05-02 08:10:32 +00:00
if (v8_use_mips_abi_hardfloat) {
defines += [
"__mips_hard_float=1",
"CAN_USE_FPU_INSTRUCTIONS",
]
} else {
defines += [ "__mips_soft_float=1" ]
}
if (mips_arch_variant == "r6") {
defines += [ "_MIPS_ARCH_MIPS64R6" ]
} else if (mips_arch_variant == "r2") {
defines += [ "_MIPS_ARCH_MIPS64R2" ]
}
2015-03-17 23:13:00 +00:00
}
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
2016-01-14 17:16:10 +00:00
defines += [ "V8_TARGET_ARCH_S390" ]
2020-03-10 18:19:31 +00:00
cflags += [ "-ffp-contract=off" ]
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "s390x") {
2016-06-09 14:19:36 +00:00
defines += [ "V8_TARGET_ARCH_S390X" ]
}
2017-05-12 01:35:09 +00:00
if (host_byteorder == "little") {
2016-06-09 14:19:36 +00:00
defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
2017-03-13 15:05:51 +00:00
} else {
cflags += [ "-march=z196" ]
}
}
if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
2020-02-21 14:37:03 +00:00
if (v8_current_cpu == "ppc") {
defines += [ "V8_TARGET_ARCH_PPC" ]
} else if (v8_current_cpu == "ppc64") {
2017-03-13 15:05:51 +00:00
defines += [ "V8_TARGET_ARCH_PPC64" ]
2020-12-07 15:25:25 +00:00
cflags += [ "-ffp-contract=off" ]
2017-03-13 15:05:51 +00:00
}
2017-05-12 01:35:09 +00:00
if (host_byteorder == "little") {
2017-03-13 15:05:51 +00:00
defines += [ "V8_TARGET_ARCH_PPC_LE" ]
2017-05-12 01:35:09 +00:00
} else if (host_byteorder == "big") {
2017-03-13 15:05:51 +00:00
defines += [ "V8_TARGET_ARCH_PPC_BE" ]
if (current_os == "aix") {
cflags += [
# Work around AIX ceil, trunc and round oddities.
"-mcpu=power5+",
"-mfprnd",
# Work around AIX assembler popcntb bug.
"-mno-popcntb",
]
}
2016-06-09 14:19:36 +00:00
}
2016-01-14 17:16:10 +00:00
}
2017-05-12 01:35:09 +00:00
2021-02-09 16:11:55 +00:00
# Under simulator build, compiler will not provide __riscv_xlen. Define here
if (v8_current_cpu == "riscv64") {
defines += [ "V8_TARGET_ARCH_RISCV64" ]
defines += [ "__riscv_xlen=64" ]
#FIXME: Temporarily use MIPS macro for the building.
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
}
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "x86") {
2015-01-08 13:21:52 +00:00
defines += [ "V8_TARGET_ARCH_IA32" ]
2016-06-20 18:22:21 +00:00
if (is_win) {
# Ensure no surprising artifacts from 80bit double math with x86.
cflags += [ "/arch:SSE2" ]
}
2014-05-26 07:29:39 +00:00
}
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "x64") {
2015-01-08 13:21:52 +00:00
defines += [ "V8_TARGET_ARCH_X64" ]
2016-06-20 18:22:21 +00:00
if (is_win) {
# Increase the initial stack size. The default is 1MB, this is 2MB. This
# applies only to executables and shared libraries produced by V8 since
# ldflags are not pushed to dependants.
ldflags += [ "/STACK:2097152" ]
}
2014-05-26 07:29:39 +00:00
}
2016-08-02 15:35:24 +00:00
if (is_android && v8_android_log_stdout) {
defines += [ "V8_ANDROID_LOG_STDOUT" ]
}
2016-04-29 12:24:58 +00:00
2019-09-19 11:26:15 +00:00
# V8_TARGET_OS_ defines. The target OS may differ from host OS e.g. in
# mksnapshot. We additionally set V8_HAVE_TARGET_OS to determine that a
# target OS has in fact been set; otherwise we internally assume that target
# OS == host OS (see v8config.h).
if (target_os == "android") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_ANDROID" ]
} else if (target_os == "fuchsia") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_FUCHSIA" ]
} else if (target_os == "ios") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_IOS" ]
} else if (target_os == "linux") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_LINUX" ]
} else if (target_os == "mac") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_MACOSX" ]
} else if (target_os == "win") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_WIN" ]
}
2016-06-20 18:22:21 +00:00
# TODO(jochen): Support v8_enable_prof on Windows.
2014-05-26 07:29:39 +00:00
# TODO(jochen): Add support for compiling with simulators.
2018-04-06 10:24:41 +00:00
if (v8_enable_debugging_features) {
2020-09-11 08:11:42 +00:00
if ((is_linux || is_chromeos) && v8_enable_backtrace) {
2016-07-04 07:52:08 +00:00
ldflags += [ "-rdynamic" ]
}
2017-01-13 17:28:51 +00:00
defines += [ "DEBUG" ]
2016-06-07 13:44:01 +00:00
if (v8_enable_slow_dchecks) {
2016-04-12 13:47:44 +00:00
defines += [ "ENABLE_SLOW_DCHECKS" ]
}
2016-06-07 13:44:01 +00:00
} else if (dcheck_always_on) {
defines += [ "DEBUG" ]
2014-05-26 07:29:39 +00:00
}
2016-09-14 11:18:20 +00:00
2017-01-27 11:32:27 +00:00
if (v8_enable_verify_csa) {
defines += [ "ENABLE_VERIFY_CSA" ]
}
2021-04-12 14:38:06 +00:00
if (v8_enable_runtime_call_stats) {
defines += [ "V8_RUNTIME_CALL_STATS" ]
}
2018-01-05 10:05:05 +00:00
if (!v8_untrusted_code_mitigations) {
defines += [ "DISABLE_UNTRUSTED_CODE_MITIGATIONS" ]
}
2016-09-14 11:18:20 +00:00
if (v8_no_inline) {
2019-01-29 04:53:40 +00:00
if (is_win) {
cflags += [ "/Ob0" ]
} else {
cflags += [
"-fno-inline-functions",
"-fno-inline",
]
}
2016-09-14 11:18:20 +00:00
}
2016-10-12 17:49:44 +00:00
if (is_clang) {
2019-04-12 02:07:59 +00:00
cflags += [ "-Wmissing-field-initializers" ]
2017-12-01 11:00:00 +00:00
if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") {
# We exclude MIPS because the IsMipsArchVariant macro causes trouble.
cflags += [ "-Wunreachable-code" ]
}
2017-04-11 09:05:09 +00:00
if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" ||
2021-02-09 16:11:55 +00:00
v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") {
2017-04-11 09:05:09 +00:00
cflags += [ "-Wshorten-64-to-32" ]
}
2016-10-12 17:49:44 +00:00
}
2017-03-17 15:18:18 +00:00
if (is_win) {
cflags += [
"/wd4245", # Conversion with signed/unsigned mismatch.
"/wd4267", # Conversion with possible loss of data.
"/wd4324", # Padding structure due to alignment.
"/wd4701", # Potentially uninitialized local variable.
"/wd4702", # Unreachable code.
"/wd4703", # Potentially uninitialized local pointer variable.
"/wd4709", # Comma operator within array index expr (bugged).
2017-03-20 21:48:26 +00:00
"/wd4714", # Function marked forceinline not inlined.
2018-04-20 13:08:41 +00:00
# MSVC assumes that control can get past an exhaustive switch and then
# warns if there's no return there (see https://crbug.com/v8/7658)
"/wd4715", # Not all control paths return a value.
2017-03-17 15:18:18 +00:00
"/wd4718", # Recursive call has no side-effect.
2018-05-18 10:03:21 +00:00
"/wd4723", # https://crbug.com/v8/7771
"/wd4724", # https://crbug.com/v8/7771
2017-03-17 15:18:18 +00:00
"/wd4800", # Forcing value to bool.
]
}
2017-05-04 12:59:38 +00:00
2020-01-14 05:55:25 +00:00
if (!is_clang && is_win) {
cflags += [ "/wd4506" ] # Benign "no definition for inline function"
}
2017-05-04 12:59:38 +00:00
if (!is_clang && !is_win) {
cflags += [
# Disable gcc warnings for optimizations based on the assumption that
# signed overflow does not occur. Generates false positives (see
# http://crbug.com/v8/6341).
"-Wno-strict-overflow",
2018-04-20 13:08:41 +00:00
# GCC assumes that control can get past an exhaustive switch and then
# warns if there's no return there (see https://crbug.com/v8/7658).
"-Wno-return-type",
2020-10-01 18:44:48 +00:00
# Disable gcc warnings for using enum constant in boolean context.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
"-Wno-int-in-bool-context",
2017-05-04 12:59:38 +00:00
]
}
2019-01-30 20:06:37 +00:00
# Chromium uses a hand-picked subset of UBSan coverage. We want everything.
if (is_ubsan) {
cflags += [ "-fsanitize=undefined" ]
}
2014-05-26 07:29:39 +00:00
}
2019-04-09 12:34:36 +00:00
# For code that is hot during mksnapshot. In fast-mksnapshot builds, we
# optimize some files even in debug builds to speed up mksnapshot times.
config("always_optimize") {
configs = [ ":internal_config" ]
# TODO(crbug.com/621335) Rework this so that we don't have the confusion
# between "optimize_speed" and "optimize_max".
if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) {
configs += [ "//build/config/compiler:optimize_speed" ]
} else {
configs += [ "//build/config/compiler:optimize_max" ]
}
}
2017-06-26 11:06:03 +00:00
# Configs for code coverage with gcov. Separate configs for cflags and ldflags
# to selectively influde cflags in non-test targets only.
2017-06-27 11:49:13 +00:00
config("v8_gcov_coverage_cflags") {
cflags = [
"-fprofile-arcs",
"-ftest-coverage",
]
2017-06-26 11:06:03 +00:00
}
2017-06-27 11:49:13 +00:00
config("v8_gcov_coverage_ldflags") {
ldflags = [ "-fprofile-arcs" ]
2017-06-26 11:06:03 +00:00
}
2014-05-05 11:06:26 +00:00
###############################################################################
# Actions
#
2018-11-22 10:25:50 +00:00
# Only for Windows clang builds. Converts the embedded.S file produced by
# mksnapshot into an embedded.cc file with corresponding inline assembly.
template("asm_to_inline_asm") {
name = target_name
if (name == "default") {
suffix = ""
} else {
suffix = "_$name"
}
action("asm_to_inline_asm_" + name) {
visibility = [ ":*" ] # Only targets in this file can depend on this.
assert(emit_builtins_as_inline_asm)
script = "tools/snapshot/asm_to_inline_asm.py"
2020-01-29 11:27:10 +00:00
deps = [ ":run_mksnapshot_" + name ]
sources = [ "$target_gen_dir/embedded${suffix}.S" ]
outputs = [ "$target_gen_dir/embedded${suffix}.cc" ]
2018-11-22 10:25:50 +00:00
args = invoker.args
args += [
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
]
}
}
2016-07-07 16:12:35 +00:00
if (is_android && enable_java_templates) {
2015-11-05 17:28:57 +00:00
android_assets("v8_external_startup_data_assets") {
if (v8_use_external_startup_data) {
2018-03-20 10:16:14 +00:00
# We don't support side-by-side snapshots on Android within Chromium.
assert(!v8_use_multi_snapshots)
2020-01-29 11:27:10 +00:00
deps = [ "//v8" ]
2016-06-22 18:39:13 +00:00
renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ]
if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel") {
renaming_destinations = [ "snapshot_blob_32.bin" ]
} else {
renaming_destinations = [ "snapshot_blob_64.bin" ]
}
2015-11-05 17:28:57 +00:00
disable_compression = true
}
}
}
2014-05-05 11:06:26 +00:00
action("postmortem-metadata") {
2015-05-05 21:16:12 +00:00
# Only targets in this file and the top-level visibility target can
# depend on this.
visibility = [
":*",
"//:gn_visibility",
]
2014-05-06 15:01:24 +00:00
2014-05-05 11:06:26 +00:00
script = "tools/gen-postmortem-metadata.py"
2016-03-31 11:12:10 +00:00
# NOSORT
2014-05-05 11:06:26 +00:00
sources = [
2020-09-25 14:11:33 +00:00
"$target_gen_dir/torque-generated/instance-types.h",
2018-09-12 10:35:23 +00:00
"src/objects/allocation-site.h",
2020-07-23 10:17:18 +00:00
"src/objects/allocation-site-inl.h",
2018-12-17 10:42:00 +00:00
"src/objects/cell.h",
2020-07-23 10:17:18 +00:00
"src/objects/cell-inl.h",
2017-11-06 18:01:59 +00:00
"src/objects/code.h",
2020-07-23 10:17:18 +00:00
"src/objects/code-inl.h",
2017-12-06 16:52:26 +00:00
"src/objects/data-handler.h",
"src/objects/data-handler-inl.h",
2019-09-30 23:40:47 +00:00
"src/objects/descriptor-array.h",
"src/objects/descriptor-array-inl.h",
2018-12-13 23:35:14 +00:00
"src/objects/feedback-cell.h",
"src/objects/feedback-cell-inl.h",
2017-12-01 11:33:03 +00:00
"src/objects/fixed-array.h",
2020-07-23 10:17:18 +00:00
"src/objects/fixed-array-inl.h",
2018-12-17 17:01:48 +00:00
"src/objects/heap-number.h",
2020-07-23 10:17:18 +00:00
"src/objects/heap-number-inl.h",
2018-10-24 01:44:19 +00:00
"src/objects/heap-object.h",
2020-07-23 10:17:18 +00:00
"src/objects/heap-object-inl.h",
2018-11-26 14:34:01 +00:00
"src/objects/instance-type.h",
2018-08-16 16:01:36 +00:00
"src/objects/js-array-buffer.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-array-buffer-inl.h",
"src/objects/js-array.h",
"src/objects/js-array-inl.h",
2020-09-15 13:33:15 +00:00
"src/objects/js-function-inl.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-function.cc",
"src/objects/js-function.h",
"src/objects/js-objects.cc",
2018-09-21 12:02:47 +00:00
"src/objects/js-objects.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-objects-inl.h",
2018-10-04 09:47:11 +00:00
"src/objects/js-promise.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-promise-inl.h",
2019-09-05 11:14:55 +00:00
"src/objects/js-regexp.cc",
2017-10-13 15:06:23 +00:00
"src/objects/js-regexp.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-regexp-inl.h",
2018-04-05 14:41:26 +00:00
"src/objects/js-regexp-string-iterator.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-regexp-string-iterator-inl.h",
2019-02-01 06:37:59 +00:00
"src/objects/map.cc",
2020-07-23 10:17:18 +00:00
"src/objects/map.h",
2017-05-17 11:31:18 +00:00
"src/objects/map-inl.h",
2018-09-04 18:51:38 +00:00
"src/objects/name.h",
"src/objects/name-inl.h",
2020-07-23 10:17:18 +00:00
"src/objects/objects.h",
"src/objects/objects-inl.h",
2018-12-17 19:42:33 +00:00
"src/objects/oddball.h",
2020-07-23 10:17:18 +00:00
"src/objects/oddball-inl.h",
2019-10-11 21:52:06 +00:00
"src/objects/primitive-heap-object.h",
"src/objects/primitive-heap-object-inl.h",
2018-07-28 03:09:39 +00:00
"src/objects/scope-info.h",
2021-01-19 18:20:26 +00:00
"src/objects/scope-info-inl.h",
2017-05-30 12:04:34 +00:00
"src/objects/script.h",
"src/objects/script-inl.h",
2020-07-13 06:55:29 +00:00
"src/objects/shared-function-info.cc",
2017-05-29 13:24:32 +00:00
"src/objects/shared-function-info.h",
"src/objects/shared-function-info-inl.h",
2019-01-31 09:46:40 +00:00
"src/objects/string.cc",
"src/objects/string-comparator.cc",
"src/objects/string-comparator.h",
2020-07-23 10:17:18 +00:00
"src/objects/string.h",
2017-06-12 11:08:30 +00:00
"src/objects/string-inl.h",
2018-12-13 23:35:14 +00:00
"src/objects/struct.h",
"src/objects/struct-inl.h",
2014-05-05 11:06:26 +00:00
]
2020-01-29 11:27:10 +00:00
outputs = [ "$target_gen_dir/debug-support.cc" ]
2014-05-05 11:06:26 +00:00
2015-01-08 13:21:52 +00:00
args = rebase_path(outputs, root_build_dir) +
rebase_path(sources, root_build_dir)
2019-10-11 21:52:06 +00:00
2020-01-29 11:27:10 +00:00
deps = [ ":run_torque" ]
2014-05-05 11:06:26 +00:00
}
2018-05-04 13:18:37 +00:00
torque_files = [
2020-05-28 07:58:37 +00:00
"src/builtins/aggregate-error.tq",
2020-11-19 07:01:31 +00:00
"src/builtins/array-at.tq",
2018-08-08 05:52:45 +00:00
"src/builtins/array-copywithin.tq",
2019-02-15 18:29:40 +00:00
"src/builtins/array-every.tq",
2019-01-08 14:49:43 +00:00
"src/builtins/array-filter.tq",
2019-02-27 13:26:01 +00:00
"src/builtins/array-find.tq",
"src/builtins/array-findindex.tq",
2018-06-12 19:53:44 +00:00
"src/builtins/array-foreach.tq",
2020-01-08 16:38:44 +00:00
"src/builtins/array-from.tq",
2019-10-22 15:23:14 +00:00
"src/builtins/array-isarray.tq",
2018-10-16 12:52:25 +00:00
"src/builtins/array-join.tq",
2018-08-28 09:14:58 +00:00
"src/builtins/array-lastindexof.tq",
2019-01-23 15:01:19 +00:00
"src/builtins/array-map.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/array-of.tq",
2019-02-25 14:41:50 +00:00
"src/builtins/array-reduce-right.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/array-reduce.tq",
2018-08-23 12:41:58 +00:00
"src/builtins/array-reverse.tq",
2019-03-08 10:40:11 +00:00
"src/builtins/array-shift.tq",
2018-10-19 16:00:14 +00:00
"src/builtins/array-slice.tq",
2019-02-15 18:29:40 +00:00
"src/builtins/array-some.tq",
2018-09-04 12:30:33 +00:00
"src/builtins/array-splice.tq",
2018-09-06 05:47:23 +00:00
"src/builtins/array-unshift.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/array.tq",
2020-09-08 14:15:52 +00:00
"src/builtins/arraybuffer.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/base.tq",
2019-05-15 13:02:51 +00:00
"src/builtins/boolean.tq",
2020-10-28 16:09:52 +00:00
"src/builtins/builtins-bigint.tq",
2019-11-11 14:13:20 +00:00
"src/builtins/builtins-string.tq",
"src/builtins/cast.tq",
2020-05-19 14:36:15 +00:00
"src/builtins/collections.tq",
2020-08-05 15:05:12 +00:00
"src/builtins/constructor.tq",
2020-05-19 14:36:15 +00:00
"src/builtins/conversion.tq",
2019-11-11 14:13:20 +00:00
"src/builtins/convert.tq",
2019-10-18 15:56:00 +00:00
"src/builtins/console.tq",
2018-05-23 14:13:07 +00:00
"src/builtins/data-view.tq",
2020-04-16 02:44:07 +00:00
"src/builtins/finalization-registry.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/frames.tq",
2019-11-11 14:13:20 +00:00
"src/builtins/frame-arguments.tq",
2020-05-15 14:07:46 +00:00
"src/builtins/function.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/growable-fixed-array.tq",
2020-05-11 07:21:34 +00:00
"src/builtins/ic-callable.tq",
2020-12-02 09:34:53 +00:00
"src/builtins/ic-dynamic-check-maps.tq",
2020-05-11 07:21:34 +00:00
"src/builtins/ic.tq",
2019-04-18 12:06:43 +00:00
"src/builtins/internal-coverage.tq",
2020-06-16 12:18:55 +00:00
"src/builtins/internal.tq",
2018-10-31 14:59:13 +00:00
"src/builtins/iterator.tq",
2019-04-26 01:28:38 +00:00
"src/builtins/math.tq",
2019-11-05 09:17:41 +00:00
"src/builtins/number.tq",
2019-03-18 18:10:18 +00:00
"src/builtins/object-fromentries.tq",
2019-06-05 16:56:31 +00:00
"src/builtins/object.tq",
2019-10-15 15:12:03 +00:00
"src/builtins/promise-abstract-operations.tq",
2020-01-21 15:15:35 +00:00
"src/builtins/promise-all.tq",
2020-01-16 15:40:05 +00:00
"src/builtins/promise-all-element-closure.tq",
2020-04-30 13:09:58 +00:00
"src/builtins/promise-any.tq",
2019-11-25 20:43:28 +00:00
"src/builtins/promise-constructor.tq",
2019-12-18 23:47:23 +00:00
"src/builtins/promise-finally.tq",
2020-01-23 16:50:05 +00:00
"src/builtins/promise-misc.tq",
2020-01-09 17:59:48 +00:00
"src/builtins/promise-race.tq",
2019-12-12 18:49:37 +00:00
"src/builtins/promise-reaction-job.tq",
2019-12-12 16:47:11 +00:00
"src/builtins/promise-resolve.tq",
2019-12-06 13:48:49 +00:00
"src/builtins/promise-then.tq",
2019-12-06 16:10:37 +00:00
"src/builtins/promise-jobs.tq",
2019-04-16 16:19:22 +00:00
"src/builtins/proxy-constructor.tq",
2019-07-18 16:05:35 +00:00
"src/builtins/proxy-delete-property.tq",
2019-04-24 17:29:13 +00:00
"src/builtins/proxy-get-property.tq",
2019-06-18 16:35:46 +00:00
"src/builtins/proxy-get-prototype-of.tq",
2019-05-14 18:38:43 +00:00
"src/builtins/proxy-has-property.tq",
2019-06-05 16:56:31 +00:00
"src/builtins/proxy-is-extensible.tq",
2019-06-12 20:55:29 +00:00
"src/builtins/proxy-prevent-extensions.tq",
2019-04-03 16:20:17 +00:00
"src/builtins/proxy-revocable.tq",
2019-03-18 18:10:18 +00:00
"src/builtins/proxy-revoke.tq",
2019-05-14 18:38:43 +00:00
"src/builtins/proxy-set-property.tq",
2019-06-27 06:12:16 +00:00
"src/builtins/proxy-set-prototype-of.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/proxy.tq",
2019-06-10 17:49:19 +00:00
"src/builtins/reflect.tq",
2019-09-17 16:26:41 +00:00
"src/builtins/regexp-exec.tq",
2019-09-25 19:59:04 +00:00
"src/builtins/regexp-match-all.tq",
2019-09-03 16:49:46 +00:00
"src/builtins/regexp-match.tq",
2019-03-18 15:14:13 +00:00
"src/builtins/regexp-replace.tq",
2019-09-10 15:33:18 +00:00
"src/builtins/regexp-search.tq",
2019-08-21 17:39:14 +00:00
"src/builtins/regexp-source.tq",
2019-09-12 19:20:43 +00:00
"src/builtins/regexp-split.tq",
2019-08-19 16:03:07 +00:00
"src/builtins/regexp-test.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/regexp.tq",
2020-11-19 07:01:31 +00:00
"src/builtins/string-at.tq",
2019-02-07 14:21:16 +00:00
"src/builtins/string-endswith.tq",
2019-03-14 13:26:28 +00:00
"src/builtins/string-html.tq",
[torque] Port String.prototype.includes/indexOf and StringIndexOf
- Removed no longer used StringBuiltinAssembler methods (DispatchOnStringEncodings, PointerToStringDataAtIndex)
- Removed no longer used Runtime functions (StringIncludes, StringIndexOf, StringIndexOfUnchecked).
- Overall builtin code size is reduced (652 bytes on Mac x64.release build), builtin size breakdown:
BEFORE
======
TFS Builtin, StringIndexOf, 1092
TFJ Builtin, StringPrototypeIncludes, 1784
TFJ Builtin, StringPrototypeIndexOf, 1536
Total = 4412
AFTER
=====
TFC Builtin, StringIndexOf, 2036 (+944)
TFJ Builtin, StringPrototypeIncludes, 1072 (-712)
TFJ Builtin, StringPrototypeIndexOf, 652 (-884)
Total = 3760 (-652)
Bug: v8:8996
Change-Id: I9a88c095e2097f7d570e58e744d6692dc524ddf4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660995
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72456}
2021-02-01 07:34:16 +00:00
"src/builtins/string-includes.tq",
"src/builtins/string-indexof.tq",
2019-05-03 17:26:24 +00:00
"src/builtins/string-iterator.tq",
2021-02-03 16:43:10 +00:00
"src/builtins/string-match-search.tq",
2019-08-28 17:57:45 +00:00
"src/builtins/string-pad.tq",
2019-03-18 12:26:35 +00:00
"src/builtins/string-repeat.tq",
2019-11-05 15:42:22 +00:00
"src/builtins/string-replaceall.tq",
2019-05-15 19:18:16 +00:00
"src/builtins/string-slice.tq",
2019-02-04 13:04:16 +00:00
"src/builtins/string-startswith.tq",
2019-10-22 12:01:10 +00:00
"src/builtins/string-substr.tq",
2020-11-05 20:29:59 +00:00
"src/builtins/string-substring.tq",
"src/builtins/string-trim.tq",
2019-10-22 15:22:34 +00:00
"src/builtins/symbol.tq",
2019-07-26 13:30:02 +00:00
"src/builtins/torque-internal.tq",
2020-11-19 07:01:31 +00:00
"src/builtins/typed-array-at.tq",
2019-01-18 14:51:18 +00:00
"src/builtins/typed-array-createtypedarray.tq",
2019-03-08 14:49:27 +00:00
"src/builtins/typed-array-every.tq",
2020-05-26 17:57:21 +00:00
"src/builtins/typed-array-entries.tq",
2019-03-05 14:24:43 +00:00
"src/builtins/typed-array-filter.tq",
2019-03-08 14:49:27 +00:00
"src/builtins/typed-array-find.tq",
"src/builtins/typed-array-findindex.tq",
2019-03-01 11:28:45 +00:00
"src/builtins/typed-array-foreach.tq",
2019-10-31 18:20:41 +00:00
"src/builtins/typed-array-from.tq",
2020-05-26 17:57:21 +00:00
"src/builtins/typed-array-keys.tq",
2019-11-04 12:09:09 +00:00
"src/builtins/typed-array-of.tq",
2019-03-01 11:28:45 +00:00
"src/builtins/typed-array-reduce.tq",
"src/builtins/typed-array-reduceright.tq",
2019-11-06 10:12:41 +00:00
"src/builtins/typed-array-set.tq",
2019-03-04 13:31:16 +00:00
"src/builtins/typed-array-slice.tq",
2019-03-08 14:49:27 +00:00
"src/builtins/typed-array-some.tq",
2019-11-13 21:44:07 +00:00
"src/builtins/typed-array-sort.tq",
2019-02-27 04:42:39 +00:00
"src/builtins/typed-array-subarray.tq",
2020-05-26 17:57:21 +00:00
"src/builtins/typed-array-values.tq",
2019-05-07 08:38:44 +00:00
"src/builtins/typed-array.tq",
2020-07-08 00:20:48 +00:00
"src/builtins/weak-ref.tq",
2019-11-11 14:13:20 +00:00
"src/ic/handler-configuration.tq",
"src/objects/allocation-site.tq",
"src/objects/api-callbacks.tq",
"src/objects/arguments.tq",
2020-10-28 16:09:52 +00:00
"src/objects/bigint.tq",
2019-11-11 14:13:20 +00:00
"src/objects/cell.tq",
"src/objects/code.tq",
"src/objects/contexts.tq",
"src/objects/data-handler.tq",
"src/objects/debug-objects.tq",
"src/objects/descriptor-array.tq",
"src/objects/embedder-data-array.tq",
"src/objects/feedback-cell.tq",
"src/objects/feedback-vector.tq",
"src/objects/fixed-array.tq",
"src/objects/foreign.tq",
"src/objects/free-space.tq",
"src/objects/heap-number.tq",
"src/objects/heap-object.tq",
"src/objects/js-array-buffer.tq",
"src/objects/js-array.tq",
"src/objects/js-collection-iterator.tq",
"src/objects/js-collection.tq",
2020-10-28 16:09:52 +00:00
"src/objects/js-function.tq",
2019-11-11 14:13:20 +00:00
"src/objects/js-generator.tq",
"src/objects/js-objects.tq",
"src/objects/js-promise.tq",
"src/objects/js-proxy.tq",
"src/objects/js-regexp-string-iterator.tq",
"src/objects/js-regexp.tq",
"src/objects/js-weak-refs.tq",
"src/objects/literal-objects.tq",
"src/objects/map.tq",
"src/objects/microtask.tq",
"src/objects/module.tq",
"src/objects/name.tq",
"src/objects/oddball.tq",
"src/objects/ordered-hash-table.tq",
"src/objects/primitive-heap-object.tq",
"src/objects/promise.tq",
"src/objects/property-array.tq",
"src/objects/property-cell.tq",
2020-01-13 23:53:24 +00:00
"src/objects/property-descriptor-object.tq",
2019-11-11 14:13:20 +00:00
"src/objects/prototype-info.tq",
"src/objects/regexp-match-info.tq",
2019-12-27 12:27:26 +00:00
"src/objects/scope-info.tq",
2019-11-11 14:13:20 +00:00
"src/objects/script.tq",
"src/objects/shared-function-info.tq",
"src/objects/source-text-module.tq",
"src/objects/stack-frame-info.tq",
"src/objects/string.tq",
"src/objects/struct.tq",
2021-03-22 16:06:13 +00:00
"src/objects/swiss-hash-table-helpers.tq",
2021-02-05 12:20:38 +00:00
"src/objects/swiss-name-dictionary.tq",
2019-11-11 14:13:20 +00:00
"src/objects/synthetic-module.tq",
"src/objects/template-objects.tq",
2020-10-28 16:09:52 +00:00
"src/objects/templates.tq",
"src/objects/torque-defined-classes.tq",
2018-05-13 10:10:44 +00:00
"test/torque/test-torque.tq",
2018-08-22 13:17:38 +00:00
"third_party/v8/builtins/array-sort.tq",
2018-05-04 13:18:37 +00:00
]
2020-10-28 16:09:52 +00:00
if (v8_enable_i18n_support) {
torque_files += [
"src/objects/intl-objects.tq",
"src/objects/js-break-iterator.tq",
"src/objects/js-collator.tq",
"src/objects/js-date-time-format.tq",
"src/objects/js-display-names.tq",
"src/objects/js-list-format.tq",
"src/objects/js-locale.tq",
"src/objects/js-number-format.tq",
"src/objects/js-plural-rules.tq",
"src/objects/js-relative-time-format.tq",
"src/objects/js-segment-iterator.tq",
"src/objects/js-segmenter.tq",
"src/objects/js-segments.tq",
]
2019-04-26 01:16:36 +00:00
}
2021-03-01 16:41:31 +00:00
if (v8_enable_webassembly) {
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
torque_files += [
"src/builtins/wasm.tq",
"src/debug/debug-wasm-objects.tq",
"src/wasm/wasm-objects.tq",
]
2021-03-01 16:41:31 +00:00
}
2020-01-21 14:00:59 +00:00
# Template for running torque
# When building with v8_verify_torque_generation_invariance=true we need
# to be able to run torque for both 32 and 64 bits in the same build
template("run_torque") {
if (target_name == "") {
suffix = ""
} else {
suffix = "_$target_name"
}
2018-04-16 09:24:22 +00:00
2020-01-21 14:00:59 +00:00
toolchain = invoker.toolchain
action("run_torque" + suffix) {
visibility = [
":*",
2020-09-11 08:11:42 +00:00
"test/cctest/:*",
2020-01-21 14:00:59 +00:00
"tools/debug_helper/:*",
"tools/gcmole/:*",
]
2020-01-29 11:27:10 +00:00
deps = [ ":torque($toolchain)" ]
2020-01-21 14:00:59 +00:00
script = "tools/run.py"
sources = torque_files
destination_folder = "$target_gen_dir/torque-generated$suffix"
2021-04-15 12:19:47 +00:00
outputs = [
"$destination_folder/bit-fields.h",
"$destination_folder/builtin-definitions.h",
"$destination_folder/class-debug-readers.cc",
"$destination_folder/class-debug-readers.h",
"$destination_folder/class-forward-declarations.h",
"$destination_folder/class-verifiers.cc",
"$destination_folder/class-verifiers.h",
"$destination_folder/csa-types.h",
"$destination_folder/debug-macros.cc",
"$destination_folder/debug-macros.h",
"$destination_folder/enum-verifiers.cc",
"$destination_folder/exported-macros-assembler.cc",
"$destination_folder/exported-macros-assembler.h",
"$destination_folder/factory.cc",
"$destination_folder/factory.inc",
"$destination_folder/field-offsets.h",
"$destination_folder/instance-types.h",
"$destination_folder/interface-descriptors.inc",
"$destination_folder/objects-body-descriptors-inl.inc",
"$destination_folder/objects-printer.cc",
2018-05-04 13:18:37 +00:00
]
2020-01-21 14:00:59 +00:00
foreach(file, torque_files) {
2020-10-28 16:09:52 +00:00
filetq = string_replace(file, ".tq", "-tq")
2020-01-21 14:00:59 +00:00
outputs += [
2021-04-15 12:19:47 +00:00
"$destination_folder/$filetq-csa.cc",
"$destination_folder/$filetq-csa.h",
"$destination_folder/$filetq-inl.inc",
"$destination_folder/$filetq.cc",
"$destination_folder/$filetq.inc",
2020-01-21 14:00:59 +00:00
]
}
args = [
"./" + rebase_path(
get_label_info(":torque($toolchain)", "root_out_dir") + "/torque",
root_build_dir),
"-o",
rebase_path("$destination_folder", root_build_dir),
"-v8-root",
rebase_path(".", root_build_dir),
]
2021-03-10 19:24:38 +00:00
if (v8_annotate_torque_ir) {
args += [ "-annotate-ir" ]
}
2020-01-21 14:00:59 +00:00
if (defined(invoker.args)) {
args += invoker.args
}
args += torque_files
2018-05-04 13:18:37 +00:00
}
2020-01-21 14:00:59 +00:00
}
2018-04-16 09:24:22 +00:00
2020-01-21 14:00:59 +00:00
# Default run_torque action
run_torque("") {
toolchain = v8_generator_toolchain
}
if (v8_verify_torque_generation_invariance) {
run_torque("x86") {
toolchain = "//build/toolchain/linux:clang_x86"
}
run_torque("x64") {
args = [ "-m32" ]
toolchain = "//build/toolchain/linux:clang_x64"
}
action("compare_torque_runs") {
deps = [
":run_torque_x64",
":run_torque_x86",
]
report_file = "$target_gen_dir/torque_comparison_results.txt"
script = "tools/compare_torque_output.py"
args = [
rebase_path("$target_gen_dir/torque-generated_x64", root_build_dir),
rebase_path("$target_gen_dir/torque-generated_x86", root_build_dir),
rebase_path(report_file, root_build_dir),
]
2020-01-29 11:27:10 +00:00
outputs = [ report_file ]
2020-01-21 14:00:59 +00:00
}
2018-05-04 13:18:37 +00:00
}
2019-04-10 09:30:39 +00:00
group("v8_maybe_icu") {
if (v8_enable_i18n_support) {
2020-01-29 11:27:10 +00:00
public_deps = [ "//third_party/icu" ]
2019-04-10 09:30:39 +00:00
}
}
2021-03-01 12:14:54 +00:00
v8_header_set("torque_runtime_support") {
visibility = [ ":*" ]
sources = [ "src/torque/runtime-support.h" ]
configs = [ ":internal_config" ]
}
2018-05-04 13:18:37 +00:00
v8_source_set("torque_generated_initializers") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
deps = [
2018-09-10 12:55:45 +00:00
":generate_bytecode_builtins_list",
2018-05-04 13:18:37 +00:00
":run_torque",
2021-03-03 14:36:17 +00:00
":v8_base_without_compiler",
2020-04-17 20:46:18 +00:00
":v8_tracing",
2018-05-04 13:18:37 +00:00
]
2021-03-01 12:14:54 +00:00
public_deps = [
":torque_runtime_support",
":v8_maybe_icu",
]
2018-07-09 17:04:28 +00:00
2019-05-27 19:25:38 +00:00
sources = [
2020-09-25 14:11:33 +00:00
"$target_gen_dir/torque-generated/csa-types.h",
"$target_gen_dir/torque-generated/enum-verifiers.cc",
"$target_gen_dir/torque-generated/exported-macros-assembler.cc",
"$target_gen_dir/torque-generated/exported-macros-assembler.h",
2019-05-27 19:25:38 +00:00
]
2019-06-05 14:40:29 +00:00
foreach(file, torque_files) {
2020-10-28 16:09:52 +00:00
filetq = string_replace(file, ".tq", "-tq")
2018-05-04 13:18:37 +00:00
sources += [
2020-10-28 16:09:52 +00:00
"$target_gen_dir/torque-generated/$filetq-csa.cc",
"$target_gen_dir/torque-generated/$filetq-csa.h",
2018-05-04 13:18:37 +00:00
]
}
2019-04-02 14:35:58 +00:00
configs = [ ":internal_config" ]
2018-04-16 09:24:22 +00:00
}
2019-04-09 12:24:52 +00:00
v8_source_set("torque_generated_definitions") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
deps = [
2019-04-09 23:35:46 +00:00
":generate_bytecode_builtins_list",
2019-04-09 12:24:52 +00:00
":run_torque",
2021-03-03 14:36:17 +00:00
":v8_internal_headers",
2021-03-09 12:07:18 +00:00
":v8_libbase",
2020-04-17 20:46:18 +00:00
":v8_tracing",
2019-04-09 12:24:52 +00:00
]
2020-10-27 10:47:38 +00:00
public_deps = [ ":v8_maybe_icu" ]
2019-04-09 12:24:52 +00:00
sources = [
2020-10-28 16:09:52 +00:00
"$target_gen_dir/torque-generated/class-forward-declarations.h",
2020-09-25 14:11:33 +00:00
"$target_gen_dir/torque-generated/class-verifiers.cc",
"$target_gen_dir/torque-generated/class-verifiers.h",
"$target_gen_dir/torque-generated/factory.cc",
"$target_gen_dir/torque-generated/objects-printer.cc",
2019-04-09 12:24:52 +00:00
]
2020-10-28 16:09:52 +00:00
foreach(file, torque_files) {
filetq = string_replace(file, ".tq", "-tq")
sources += [
"$target_gen_dir/torque-generated/$filetq-inl.inc",
"$target_gen_dir/torque-generated/$filetq.cc",
"$target_gen_dir/torque-generated/$filetq.inc",
]
}
2019-04-09 12:24:52 +00:00
configs = [ ":internal_config" ]
}
2018-09-10 12:55:45 +00:00
action("generate_bytecode_builtins_list") {
script = "tools/run.py"
2020-01-29 11:27:10 +00:00
outputs = [ "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h" ]
deps = [ ":bytecode_builtins_list_generator($v8_generator_toolchain)" ]
2018-09-10 12:55:45 +00:00
args = [
"./" + rebase_path(
2018-09-11 13:22:30 +00:00
get_label_info(
2018-09-12 11:55:04 +00:00
":bytecode_builtins_list_generator($v8_generator_toolchain)",
2018-09-11 13:22:30 +00:00
"root_out_dir") + "/bytecode_builtins_list_generator",
2018-09-10 12:55:45 +00:00
root_build_dir),
2018-12-03 17:42:15 +00:00
rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
root_build_dir),
2018-09-10 12:55:45 +00:00
]
}
2018-03-20 10:16:14 +00:00
# Template to generate different V8 snapshots based on different runtime flags.
# Can be invoked with run_mksnapshot(<name>). The target will resolve to
# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
2018-11-15 14:10:59 +00:00
# Otherwise files are suffixed, e.g. embedded_<name>.S and
2018-03-20 10:16:14 +00:00
# snapshot_blob_<name>.bin.
#
# The template exposes the variables:
# args: additional flags for mksnapshots
# embedded_suffix: a camel case suffix for method names in the embedded
# snapshot.
template("run_mksnapshot") {
name = target_name
if (name == "default") {
suffix = ""
} else {
suffix = "_$name"
}
action("run_mksnapshot_" + name) {
2020-09-09 13:03:13 +00:00
# Only targets in this file and running mkgrokdump can depend on this.
visibility = [
":*",
"tools/debug_helper:run_mkgrokdump",
]
2014-06-03 06:50:46 +00:00
2020-01-29 11:27:10 +00:00
deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
2014-06-03 06:50:46 +00:00
2017-11-20 08:12:49 +00:00
script = "tools/run.py"
2016-06-30 11:24:37 +00:00
2017-11-20 08:12:49 +00:00
sources = []
2014-06-03 06:50:46 +00:00
2018-03-13 14:04:27 +00:00
outputs = []
2018-03-09 09:29:10 +00:00
2018-03-26 07:34:41 +00:00
data = []
2017-11-20 08:12:49 +00:00
args = [
"./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
"root_out_dir") + "/mksnapshot",
root_build_dir),
2019-10-11 12:17:08 +00:00
"--turbo_instruction_scheduling",
2019-04-08 19:32:38 +00:00
# In cross builds, the snapshot may be generated for both the host and
# target toolchains. The same host binary is used to generate both, so
# mksnapshot needs to know which target OS to use at runtime. It's weird,
# but the target OS is really |current_os|.
2019-04-09 11:52:13 +00:00
"--target_os=$current_os",
2019-05-22 11:59:35 +00:00
"--target_arch=$current_cpu",
2019-10-22 09:30:25 +00:00
"--embedded_src",
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
2016-11-15 14:39:59 +00:00
]
[diagnostics] Support --turbo-profiling for builtins
Currently, if d8 is run with the --turbo-profiling flag, it prints info
about every TurboFan-compiled function. This info includes the number of
times that each basic block in the function was run. It also includes
text representations of the function's schedule and code, so that the
person reading the output can associate counters with blocks of code.
The data about each function is currently stored in a
BasicBlockProfiler::Data instance, which is attached to a list owned by
the singleton BasicBlockProfiler. Each Data contains an
std::vector<uint32_t> which represents how many times each block in the
function has executed. The generated code for each block uses a raw
pointer into the storage of that vector to implement incrementing the
counter.
With this change, if you compile with v8_enable_builtins_profiling and
then run with --turbo-profiling, d8 will print that same info about
builtins too.
In order to generate code that can survive being serialized to a
snapshot and reloaded, this change uses counters in the JS heap instead
of a std::vector outside the JS heap. The steps for instrumentation are
as follows:
1. Between scheduling and instruction selection, add code to increment
the counter for each block. The counters array doesn't yet exist at
this point, and allocation is disallowed, so at this point the code
refers to a special marker value.
2. During finalization of the code, allocate a BasicBlockProfilingData
object on the JS heap containing data equivalent to what is stored in
BasicBlockProfiler::Data. This includes a ByteArray that is big
enough to store the counters for each block.
3. Patch the reference in the BuiltinsConstantsTableBuilder so that
instead of referring to the marker object, it now refers to this
ByteArray. Also add the BasicBlockProfilingData object to a list that
is attached to the heap roots so it can be easily accessed for
printing.
Because these steps include modifying the BuiltinsConstantsTableBuilder,
this procedure is only applicable to builtins. Runtime-generated code
still uses raw pointers into std::vector instances. In order to keep
divergence between these code paths to a minimum, most work is done
referring to instances of BasicBlockProfiler::Data (the C++ class), and
functions are provided to copy back and forth between that type and
BasicBlockProfilingData (the JS heap object).
This change is intended only to make --turbo-profiling work consistently
on more kinds of functions, but with some further work, this data could
form the basis for:
- code coverage info for fuzzers, and/or
- hot-path info for profile-guided optimization.
Bug: v8:10470, v8:9119
Change-Id: Ib556a5bc3abe67cdaa2e3ee62702a2a08b11cb61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159738
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67944}
2020-05-21 15:51:40 +00:00
if (v8_enable_builtins_profiling) {
args += [ "--turbo-profiling" ]
}
2020-05-29 17:45:32 +00:00
if (v8_enable_builtins_profiling_verbose) {
args += [ "--turbo-profiling-verbose" ]
}
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
if (v8_builtins_profiling_log_file != "") {
2020-09-28 16:06:49 +00:00
sources += [ v8_builtins_profiling_log_file ]
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
args += [
"--turbo-profiling-log-file",
2020-09-28 16:06:49 +00:00
rebase_path(v8_builtins_profiling_log_file, root_build_dir),
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
]
}
[diagnostics] Support --turbo-profiling for builtins
Currently, if d8 is run with the --turbo-profiling flag, it prints info
about every TurboFan-compiled function. This info includes the number of
times that each basic block in the function was run. It also includes
text representations of the function's schedule and code, so that the
person reading the output can associate counters with blocks of code.
The data about each function is currently stored in a
BasicBlockProfiler::Data instance, which is attached to a list owned by
the singleton BasicBlockProfiler. Each Data contains an
std::vector<uint32_t> which represents how many times each block in the
function has executed. The generated code for each block uses a raw
pointer into the storage of that vector to implement incrementing the
counter.
With this change, if you compile with v8_enable_builtins_profiling and
then run with --turbo-profiling, d8 will print that same info about
builtins too.
In order to generate code that can survive being serialized to a
snapshot and reloaded, this change uses counters in the JS heap instead
of a std::vector outside the JS heap. The steps for instrumentation are
as follows:
1. Between scheduling and instruction selection, add code to increment
the counter for each block. The counters array doesn't yet exist at
this point, and allocation is disallowed, so at this point the code
refers to a special marker value.
2. During finalization of the code, allocate a BasicBlockProfilingData
object on the JS heap containing data equivalent to what is stored in
BasicBlockProfiler::Data. This includes a ByteArray that is big
enough to store the counters for each block.
3. Patch the reference in the BuiltinsConstantsTableBuilder so that
instead of referring to the marker object, it now refers to this
ByteArray. Also add the BasicBlockProfilingData object to a list that
is attached to the heap roots so it can be easily accessed for
printing.
Because these steps include modifying the BuiltinsConstantsTableBuilder,
this procedure is only applicable to builtins. Runtime-generated code
still uses raw pointers into std::vector instances. In order to keep
divergence between these code paths to a minimum, most work is done
referring to instances of BasicBlockProfiler::Data (the C++ class), and
functions are provided to copy back and forth between that type and
BasicBlockProfilingData (the JS heap object).
This change is intended only to make --turbo-profiling work consistently
on more kinds of functions, but with some further work, this data could
form the basis for:
- code coverage info for fuzzers, and/or
- hot-path info for profile-guided optimization.
Bug: v8:10470, v8:9119
Change-Id: Ib556a5bc3abe67cdaa2e3ee62702a2a08b11cb61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159738
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67944}
2020-05-21 15:51:40 +00:00
2020-01-13 11:03:55 +00:00
# This is needed to distinguish between generating code for the simulator
# and cross-compiling. The latter may need to run code on the host with the
# simulator but cannot use simulator-specific instructions.
if (target_is_simulator) {
args += [ "--target_is_simulator" ]
}
2018-03-20 10:16:14 +00:00
args += invoker.args
2019-10-22 09:30:25 +00:00
outputs += [ "$target_gen_dir/embedded${suffix}.S" ]
if (invoker.embedded_variant != "") {
2018-03-09 09:29:10 +00:00
args += [
2019-10-22 09:30:25 +00:00
"--embedded_variant",
invoker.embedded_variant,
2018-03-09 09:29:10 +00:00
]
}
2017-11-20 08:12:49 +00:00
if (v8_random_seed != "0") {
args += [
"--random-seed",
v8_random_seed,
]
}
2017-05-23 09:47:29 +00:00
2017-11-20 08:12:49 +00:00
if (v8_os_page_size != "0") {
args += [
"--v8_os_page_size",
v8_os_page_size,
]
}
2016-06-30 11:24:37 +00:00
2017-11-20 08:12:49 +00:00
if (v8_use_external_startup_data) {
2018-03-20 10:16:14 +00:00
outputs += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
2018-03-26 07:34:41 +00:00
data += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
2017-11-20 08:12:49 +00:00
args += [
"--startup_blob",
2018-03-20 10:16:14 +00:00
rebase_path("$root_out_dir/snapshot_blob${suffix}.bin", root_build_dir),
2017-11-20 08:12:49 +00:00
]
2018-03-13 14:04:27 +00:00
} else {
2018-03-20 10:16:14 +00:00
outputs += [ "$target_gen_dir/snapshot${suffix}.cc" ]
2018-03-13 14:04:27 +00:00
args += [
"--startup_src",
2018-03-20 10:16:14 +00:00
rebase_path("$target_gen_dir/snapshot${suffix}.cc", root_build_dir),
2018-03-13 14:04:27 +00:00
]
2017-11-20 08:12:49 +00:00
}
if (v8_embed_script != "") {
sources += [ v8_embed_script ]
args += [ rebase_path(v8_embed_script, root_build_dir) ]
}
2018-12-13 19:30:56 +00:00
if (v8_enable_snapshot_code_comments) {
args += [ "--code-comments" ]
}
2019-03-28 12:37:29 +00:00
if (v8_enable_snapshot_native_code_counters) {
args += [ "--native-code-counters" ]
} else {
# --native-code-counters is the default in debug mode so make sure we can
# unset it.
args += [ "--no-native-code-counters" ]
}
2017-11-20 08:12:49 +00:00
if (v8_enable_fast_mksnapshot) {
args += [
"--no-turbo-rewrite-far-jumps",
"--no-turbo-verify-allocation",
]
2018-06-28 09:23:06 +00:00
if (v8_enable_debugging_features && v8_enable_slow_dchecks) {
# mksnapshot only accepts this flag if ENABLE_SLOW_DCHECKS is defined.
args += [ "--no-enable-slow-asserts" ]
}
2017-11-20 08:12:49 +00:00
}
2019-11-19 15:30:19 +00:00
if (v8_enable_verify_heap) {
args += [ "--verify-heap" ]
}
2017-08-24 13:14:44 +00:00
}
2014-06-03 06:50:46 +00:00
}
2019-10-15 06:51:14 +00:00
run_mksnapshot("default") {
args = []
2019-10-22 09:30:25 +00:00
embedded_variant = "Default"
2019-10-15 06:51:14 +00:00
}
if (emit_builtins_as_inline_asm) {
asm_to_inline_asm("default") {
2018-03-20 10:16:14 +00:00
args = []
2019-10-15 06:51:14 +00:00
}
}
if (v8_use_multi_snapshots) {
run_mksnapshot("trusted") {
args = [ "--no-untrusted-code-mitigations" ]
2019-10-22 09:30:25 +00:00
embedded_variant = "Trusted"
2018-03-20 10:16:14 +00:00
}
2018-11-22 10:25:50 +00:00
if (emit_builtins_as_inline_asm) {
2019-10-15 06:51:14 +00:00
asm_to_inline_asm("trusted") {
2018-11-22 10:25:50 +00:00
args = []
}
}
2018-03-20 10:16:14 +00:00
}
2016-06-30 14:22:55 +00:00
action("v8_dump_build_config") {
script = "tools/testrunner/utils/dump_build_config.py"
2020-01-29 11:27:10 +00:00
outputs = [ "$root_out_dir/v8_build_config.json" ]
2017-06-28 11:31:15 +00:00
is_gcov_coverage = v8_code_coverage && !is_clang
2019-05-06 13:18:59 +00:00
is_full_debug = v8_enable_debugging_features && !v8_optimized_debug
2016-06-30 14:22:55 +00:00
args = [
rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
2017-10-25 09:48:59 +00:00
"current_cpu=\"$current_cpu\"",
2016-06-30 14:22:55 +00:00
"dcheck_always_on=$dcheck_always_on",
2018-07-25 11:20:08 +00:00
"is_android=$is_android",
2016-06-30 14:22:55 +00:00
"is_asan=$is_asan",
"is_cfi=$is_cfi",
2019-02-27 13:36:17 +00:00
"is_clang=$is_clang",
2016-06-30 14:22:55 +00:00
"is_component_build=$is_component_build",
2018-04-06 10:24:41 +00:00
"is_debug=$v8_enable_debugging_features",
2019-05-06 13:18:59 +00:00
"is_full_debug=$is_full_debug",
2017-06-28 11:31:15 +00:00
"is_gcov_coverage=$is_gcov_coverage",
2016-06-30 14:22:55 +00:00
"is_msan=$is_msan",
"is_tsan=$is_tsan",
2017-07-19 14:59:48 +00:00
"is_ubsan_vptr=$is_ubsan_vptr",
2016-06-30 14:22:55 +00:00
"target_cpu=\"$target_cpu\"",
2017-10-25 09:48:59 +00:00
"v8_current_cpu=\"$v8_current_cpu\"",
2020-10-05 12:05:16 +00:00
"v8_enable_atomic_marking_state=$v8_enable_atomic_marking_state",
"v8_enable_atomic_object_field_writes=" +
"$v8_enable_atomic_object_field_writes",
2020-09-28 17:49:52 +00:00
"v8_enable_concurrent_marking=$v8_enable_concurrent_marking",
2016-06-30 14:22:55 +00:00
"v8_enable_i18n_support=$v8_enable_i18n_support",
2017-10-19 07:14:09 +00:00
"v8_enable_verify_predictable=$v8_enable_verify_predictable",
2018-10-16 08:22:23 +00:00
"v8_enable_verify_csa=$v8_enable_verify_csa",
2018-10-19 13:34:53 +00:00
"v8_enable_lite_mode=$v8_enable_lite_mode",
2021-04-12 14:38:06 +00:00
"v8_enable_runtime_call_stats=$v8_enable_runtime_call_stats",
2018-12-19 16:21:38 +00:00
"v8_enable_pointer_compression=$v8_enable_pointer_compression",
2021-04-10 02:09:41 +00:00
"v8_enable_pointer_compression_shared_cage=" +
"$v8_enable_pointer_compression_shared_cage",
2021-04-14 14:09:35 +00:00
"v8_enable_third_party_heap=$v8_enable_third_party_heap",
2021-02-22 09:37:09 +00:00
"v8_enable_webassembly=$v8_enable_webassembly",
2021-02-12 13:45:47 +00:00
"v8_control_flow_integrity=$v8_control_flow_integrity",
2020-09-28 17:49:52 +00:00
"v8_target_cpu=\"$v8_target_cpu\"",
2016-07-01 05:26:58 +00:00
]
2018-01-29 10:24:31 +00:00
if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
args += [
"mips_arch_variant=\"$mips_arch_variant\"",
"mips_use_msa=$mips_use_msa",
]
}
2016-06-30 14:22:55 +00:00
}
2014-05-05 11:06:26 +00:00
###############################################################################
# Source Sets (aka static libraries)
#
2019-11-12 10:32:23 +00:00
v8_source_set("v8_snapshot") {
visibility = [ ":*" ] # Targets in this file can depend on this.
2014-06-03 06:50:46 +00:00
2019-11-12 16:21:23 +00:00
deps = []
2019-11-12 10:32:23 +00:00
public_deps = [
# This should be public so downstream targets can declare the snapshot
# output file as their inputs.
":run_mksnapshot_default",
]
2014-06-03 06:50:46 +00:00
2019-11-12 10:32:23 +00:00
# Do not publicize any header to remove build dependency.
public = []
2018-05-01 07:24:55 +00:00
2020-01-29 11:27:10 +00:00
sources = [ "src/init/setup-isolate-deserialize.cc" ]
2020-08-18 12:47:13 +00:00
if (v8_control_flow_integrity) {
sources += [ "src/deoptimizer/deoptimizer-cfi-builtins.cc" ]
}
2019-11-12 10:32:23 +00:00
if (emit_builtins_as_inline_asm) {
deps += [ ":asm_to_inline_asm_default" ]
sources += [ "$target_gen_dir/embedded.cc" ]
} else {
sources += [ "$target_gen_dir/embedded.S" ]
2017-11-20 08:12:49 +00:00
}
2014-06-03 06:50:46 +00:00
2019-11-12 10:32:23 +00:00
configs = [ ":internal_config" ]
2014-06-23 13:52:17 +00:00
2019-11-12 10:32:23 +00:00
if (v8_use_external_startup_data) {
2019-11-12 16:21:23 +00:00
deps += [ ":v8_base" ]
2019-11-12 10:32:23 +00:00
sources += [ "src/snapshot/snapshot-external.cc" ]
2014-06-23 13:52:17 +00:00
2018-03-20 10:16:14 +00:00
if (v8_use_multi_snapshots) {
public_deps += [ ":run_mksnapshot_trusted" ]
2019-11-12 10:32:23 +00:00
if (emit_builtins_as_inline_asm) {
2018-11-22 10:25:50 +00:00
deps += [ ":asm_to_inline_asm_trusted" ]
sources += [ "$target_gen_dir/embedded_trusted.cc" ]
2019-11-12 10:32:23 +00:00
} else {
2018-11-15 14:10:59 +00:00
sources += [ "$target_gen_dir/embedded_trusted.S" ]
2018-03-20 10:16:14 +00:00
}
2018-03-09 09:29:10 +00:00
}
2019-11-12 10:32:23 +00:00
} else {
2019-11-12 16:21:23 +00:00
# Also top-level visibility targets can depend on this.
visibility += [ "//:gn_visibility" ]
2020-10-27 10:47:38 +00:00
public_deps += [ ":v8_maybe_icu" ]
2019-11-12 16:21:23 +00:00
2019-11-12 10:32:23 +00:00
sources += [ "$target_gen_dir/snapshot.cc" ]
2014-06-23 13:52:17 +00:00
}
}
2017-09-06 10:48:08 +00:00
v8_source_set("v8_initializers") {
2017-04-07 13:31:29 +00:00
visibility = [
":*",
"test/cctest:*",
]
2017-03-16 11:32:01 +00:00
2021-03-03 14:36:17 +00:00
allow_circular_includes_from = [ ":torque_generated_initializers" ]
2020-05-05 17:13:11 +00:00
deps = [
":torque_generated_initializers",
2021-02-22 09:10:50 +00:00
":v8_base_without_compiler",
":v8_shared_internal_headers",
2020-05-05 17:13:11 +00:00
":v8_tracing",
]
2019-02-13 10:54:08 +00:00
2017-03-16 11:32:01 +00:00
sources = [
### gcmole(all) ###
"src/builtins/builtins-array-gen.cc",
2018-01-28 17:02:11 +00:00
"src/builtins/builtins-array-gen.h",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-async-function-gen.cc",
"src/builtins/builtins-async-gen.cc",
2017-03-21 11:17:41 +00:00
"src/builtins/builtins-async-gen.h",
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
"src/builtins/builtins-async-generator-gen.cc",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-async-iterator-gen.cc",
2018-12-07 19:50:26 +00:00
"src/builtins/builtins-bigint-gen.cc",
2019-06-06 09:38:51 +00:00
"src/builtins/builtins-bigint-gen.h",
2017-04-07 13:31:29 +00:00
"src/builtins/builtins-call-gen.cc",
2017-06-08 18:31:59 +00:00
"src/builtins/builtins-call-gen.h",
2017-05-23 09:06:51 +00:00
"src/builtins/builtins-collections-gen.cc",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-constructor-gen.cc",
2017-03-21 11:17:41 +00:00
"src/builtins/builtins-constructor-gen.h",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-constructor.h",
"src/builtins/builtins-conversion-gen.cc",
2018-06-06 12:30:08 +00:00
"src/builtins/builtins-data-view-gen.h",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-date-gen.cc",
2017-05-23 00:03:49 +00:00
"src/builtins/builtins-debug-gen.cc",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-generator-gen.cc",
"src/builtins/builtins-global-gen.cc",
"src/builtins/builtins-handler-gen.cc",
"src/builtins/builtins-ic-gen.cc",
"src/builtins/builtins-internal-gen.cc",
2017-04-07 13:31:29 +00:00
"src/builtins/builtins-interpreter-gen.cc",
2017-05-05 15:59:08 +00:00
"src/builtins/builtins-intl-gen.cc",
2017-05-23 09:06:51 +00:00
"src/builtins/builtins-iterator-gen.cc",
"src/builtins/builtins-iterator-gen.h",
2018-06-07 15:21:27 +00:00
"src/builtins/builtins-lazy-gen.cc",
"src/builtins/builtins-lazy-gen.h",
2018-11-09 09:28:42 +00:00
"src/builtins/builtins-microtask-queue-gen.cc",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-number-gen.cc",
"src/builtins/builtins-object-gen.cc",
"src/builtins/builtins-promise-gen.cc",
2017-03-21 11:17:41 +00:00
"src/builtins/builtins-promise-gen.h",
2017-07-10 11:42:33 +00:00
"src/builtins/builtins-proxy-gen.cc",
2017-08-16 12:33:07 +00:00
"src/builtins/builtins-proxy-gen.h",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-regexp-gen.cc",
"src/builtins/builtins-regexp-gen.h",
"src/builtins/builtins-sharedarraybuffer-gen.cc",
"src/builtins/builtins-string-gen.cc",
2017-05-15 19:42:35 +00:00
"src/builtins/builtins-string-gen.h",
2018-04-18 07:07:10 +00:00
"src/builtins/builtins-typed-array-gen.cc",
"src/builtins/builtins-typed-array-gen.h",
2017-03-16 11:32:01 +00:00
"src/builtins/builtins-utils-gen.h",
2018-02-05 16:10:42 +00:00
"src/builtins/growable-fixed-array-gen.cc",
"src/builtins/growable-fixed-array-gen.h",
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
"src/builtins/profile-data-reader.cc",
"src/builtins/profile-data-reader.h",
2017-04-07 13:31:29 +00:00
"src/builtins/setup-builtins-internal.cc",
2020-08-06 10:06:53 +00:00
"src/builtins/torque-csa-header-includes.h",
2019-05-21 09:30:15 +00:00
"src/codegen/code-stub-assembler.cc",
"src/codegen/code-stub-assembler.h",
2017-09-06 10:48:08 +00:00
"src/heap/setup-heap-internal.cc",
2017-03-21 11:17:41 +00:00
"src/ic/accessor-assembler.cc",
"src/ic/accessor-assembler.h",
2017-03-22 17:37:08 +00:00
"src/ic/binary-op-assembler.cc",
"src/ic/binary-op-assembler.h",
2017-03-21 11:17:41 +00:00
"src/ic/keyed-store-generic.cc",
"src/ic/keyed-store-generic.h",
2020-05-25 12:29:44 +00:00
"src/ic/unary-op-assembler.cc",
"src/ic/unary-op-assembler.h",
2017-03-21 12:33:32 +00:00
"src/interpreter/interpreter-assembler.cc",
"src/interpreter/interpreter-assembler.h",
2017-03-20 16:56:06 +00:00
"src/interpreter/interpreter-generator.cc",
"src/interpreter/interpreter-generator.h",
2017-03-21 12:33:32 +00:00
"src/interpreter/interpreter-intrinsics-generator.cc",
"src/interpreter/interpreter-intrinsics-generator.h",
2017-03-16 11:32:01 +00:00
]
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
if (v8_enable_webassembly) {
sources += [
"src/builtins/builtins-wasm-gen.cc",
"src/builtins/builtins-wasm-gen.h",
]
}
2017-03-21 11:17:41 +00:00
if (v8_current_cpu == "x86") {
sources += [
### gcmole(arch:ia32) ###
"src/builtins/ia32/builtins-ia32.cc",
]
} else if (v8_current_cpu == "x64") {
sources += [
### gcmole(arch:x64) ###
"src/builtins/x64/builtins-x64.cc",
]
} else if (v8_current_cpu == "arm") {
sources += [
### gcmole(arch:arm) ###
"src/builtins/arm/builtins-arm.cc",
]
} else if (v8_current_cpu == "arm64") {
sources += [
### gcmole(arch:arm64) ###
"src/builtins/arm64/builtins-arm64.cc",
]
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
sources += [
### gcmole(arch:mipsel) ###
"src/builtins/mips/builtins-mips.cc",
]
} else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
sources += [
### gcmole(arch:mips64el) ###
"src/builtins/mips64/builtins-mips64.cc",
]
2020-02-21 14:37:03 +00:00
} else if (v8_current_cpu == "ppc") {
2017-03-21 11:17:41 +00:00
sources += [
### gcmole(arch:ppc) ###
"src/builtins/ppc/builtins-ppc.cc",
]
2020-02-21 14:37:03 +00:00
} else if (v8_current_cpu == "ppc64") {
sources += [
### gcmole(arch:ppc64) ###
"src/builtins/ppc/builtins-ppc.cc",
]
2017-03-21 11:17:41 +00:00
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [
### gcmole(arch:s390) ###
"src/builtins/s390/builtins-s390.cc",
]
2021-02-09 16:11:55 +00:00
} else if (v8_current_cpu == "riscv64") {
sources += [
### gcmole(arch:riscv64) ###
"src/builtins/riscv64/builtins-riscv64.cc",
]
2017-03-21 11:17:41 +00:00
}
2017-05-05 15:59:08 +00:00
if (!v8_enable_i18n_support) {
sources -= [ "src/builtins/builtins-intl-gen.cc" ]
}
2019-04-02 14:35:58 +00:00
configs = [ ":internal_config" ]
2017-03-16 11:32:01 +00:00
}
2017-09-06 10:48:08 +00:00
v8_source_set("v8_init") {
2017-04-07 13:31:29 +00:00
visibility = [ ":*" ] # Only targets in this file can depend on this.
2020-05-05 17:13:11 +00:00
deps = [
2021-02-22 09:10:50 +00:00
":v8_base_without_compiler",
2020-05-05 17:13:11 +00:00
":v8_initializers",
":v8_tracing",
]
2017-04-07 13:31:29 +00:00
sources = [
### gcmole(all) ###
2019-05-16 10:26:57 +00:00
"src/init/setup-isolate-full.cc",
2017-04-07 13:31:29 +00:00
]
2019-04-10 09:30:39 +00:00
2020-10-27 10:47:38 +00:00
public_deps = [ ":v8_maybe_icu" ]
2017-04-07 13:31:29 +00:00
configs = [ ":internal_config" ]
}
2017-01-12 20:51:37 +00:00
# This is split out to be a non-code containing target that the Chromium browser
# DLL can depend upon to get only a version string.
2017-02-09 13:28:10 +00:00
v8_header_set("v8_version") {
2017-01-12 20:51:37 +00:00
configs = [ ":internal_config" ]
sources = [
2017-04-27 15:14:41 +00:00
"include/v8-value-serializer-version.h",
2017-01-12 20:51:37 +00:00
"include/v8-version-string.h",
"include/v8-version.h",
]
}
2021-01-18 15:45:12 +00:00
v8_header_set("v8_config_headers") {
configs = [ ":internal_config" ]
2021-02-22 13:40:54 +00:00
sources = [
"include/v8-platform.h",
"include/v8config.h",
]
2021-01-18 15:45:12 +00:00
deps = []
if (v8_generate_external_defines_header) {
sources += [ "$target_gen_dir/include/v8-gn.h" ]
deps += [ ":gen_v8_gn" ]
}
}
2017-05-02 08:49:38 +00:00
# This is split out to be a non-code containing target that the Chromium browser
# can depend upon to get basic v8 types.
v8_header_set("v8_headers") {
configs = [ ":internal_config" ]
2021-01-14 13:06:39 +00:00
public_configs = [ ":headers_config" ]
2017-05-02 08:49:38 +00:00
sources = [
2020-07-07 09:59:51 +00:00
"include/v8-cppgc.h",
2020-02-21 14:46:07 +00:00
"include/v8-fast-api-calls.h",
2018-09-07 09:03:35 +00:00
"include/v8-internal.h",
2021-02-23 21:32:25 +00:00
"include/v8-profiler.h",
"include/v8-util.h",
2017-05-02 08:49:38 +00:00
"include/v8.h",
]
2019-01-29 15:24:47 +00:00
sources += [
# The following headers cannot be platform-specific. The include validation
# of `gn gen $dir --check` requires all header files to be available on all
# platforms.
"include/v8-wasm-trap-handler-posix.h",
"include/v8-wasm-trap-handler-win.h",
]
2018-10-30 09:35:14 +00:00
2021-01-18 15:45:12 +00:00
public_deps = [ ":v8_config_headers" ]
2021-03-01 22:19:03 +00:00
deps = [
":cppgc_headers",
":v8_version",
]
2017-05-02 08:49:38 +00:00
}
2021-01-18 15:45:12 +00:00
if (v8_generate_external_defines_header) {
action("gen_v8_gn") {
visibility = [ ":*" ]
script = "tools/gen-v8-gn.py"
outputs = [ "$target_gen_dir/include/v8-gn.h" ]
args = [
"-o",
rebase_path("$target_gen_dir/include/v8-gn.h", root_build_dir),
]
foreach(define, enabled_external_defines) {
args += [
"-p",
define,
]
}
foreach(define, disabled_external_defines) {
args += [
"-n",
define,
]
}
}
}
2021-02-22 09:10:50 +00:00
# This is split out to share basic headers with Torque and everything else:(
2019-02-25 10:32:56 +00:00
v8_header_set("v8_shared_internal_headers") {
2021-02-22 09:10:50 +00:00
visibility = [
":*",
"test/cctest:*",
"test/unittests:*",
"tools/debug_helper/:*",
]
2019-02-25 10:32:56 +00:00
configs = [ ":internal_config" ]
2021-03-01 21:38:14 +00:00
sources = [
"src/common/globals.h",
"src/wasm/wasm-constants.h",
"src/wasm/wasm-limits.h",
]
2019-02-25 10:32:56 +00:00
2021-02-22 09:10:50 +00:00
deps = [
":v8_headers",
":v8_libbase",
]
2019-02-25 10:32:56 +00:00
}
2021-03-01 19:02:11 +00:00
v8_header_set("v8_flags") {
visibility = [ ":*" ]
configs = [ ":internal_config" ]
sources = [
"src/flags/flag-definitions.h",
"src/flags/flags.h",
]
deps = [ ":v8_shared_internal_headers" ]
}
2021-03-01 12:14:54 +00:00
v8_header_set("v8_internal_headers") {
2019-04-09 12:34:36 +00:00
configs = [ ":internal_config" ]
2017-06-13 14:21:07 +00:00
2014-05-05 11:06:26 +00:00
sources = [
2016-09-21 11:44:10 +00:00
### gcmole(all) ###
2018-09-10 12:55:45 +00:00
"$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
2021-03-01 12:14:54 +00:00
"//base/trace_event/common/trace_event_common.h",
2020-05-12 11:09:49 +00:00
"include/cppgc/common.h",
2017-03-31 08:24:34 +00:00
"include/v8-inspector-protocol.h",
"include/v8-inspector.h",
2020-07-28 11:11:06 +00:00
"include/v8-metrics.h",
2020-10-20 09:40:34 +00:00
"include/v8-unwinder-state.h",
2018-10-26 11:04:26 +00:00
"include/v8-wasm-trap-handler-posix.h",
2019-05-17 12:13:44 +00:00
"src/api/api-arguments-inl.h",
"src/api/api-arguments.h",
2021-01-28 14:10:47 +00:00
"src/api/api-inl.h",
"src/api/api-macros.h",
2019-05-17 12:13:44 +00:00
"src/api/api-natives.h",
"src/api/api.h",
2016-11-28 11:40:22 +00:00
"src/ast/ast-function-literal-id-reindexer.h",
2017-07-12 13:06:09 +00:00
"src/ast/ast-source-ranges.h",
2016-07-25 08:25:49 +00:00
"src/ast/ast-traversal-visitor.h",
2015-11-26 16:22:34 +00:00
"src/ast/ast-value-factory.h",
"src/ast/ast.h",
"src/ast/modules.h",
"src/ast/prettyprinter.h",
"src/ast/scopes.h",
2018-12-03 14:34:35 +00:00
"src/ast/source-range-ast-visitor.h",
2015-11-26 16:22:34 +00:00
"src/ast/variables.h",
2021-02-22 17:22:43 +00:00
"src/baseline/baseline-assembler-inl.h",
"src/baseline/baseline-assembler.h",
2021-02-12 08:41:14 +00:00
"src/baseline/baseline-compiler.h",
2021-04-13 12:52:09 +00:00
"src/baseline/baseline-osr-inl.h",
2021-02-12 08:41:14 +00:00
"src/baseline/baseline.h",
2021-03-09 11:18:52 +00:00
"src/baseline/bytecode-offset-iterator.h",
2019-05-22 07:55:37 +00:00
"src/builtins/accessors.h",
2016-12-28 11:43:16 +00:00
"src/builtins/builtins-constructor.h",
2017-03-29 09:56:08 +00:00
"src/builtins/builtins-definitions.h",
2017-03-20 10:55:37 +00:00
"src/builtins/builtins-descriptors.h",
2018-12-13 09:46:59 +00:00
"src/builtins/builtins-promise.h",
2018-08-02 14:10:40 +00:00
"src/builtins/builtins-utils-inl.h",
2016-07-18 13:12:05 +00:00
"src/builtins/builtins-utils.h",
2016-07-14 06:26:03 +00:00
"src/builtins/builtins.h",
2018-02-21 14:16:10 +00:00
"src/builtins/constants-table-builder.h",
Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.
A few implementation details worth mentioning, which aren't covered in
the design doc:
- BasicBlockProfilerData currently contains an array of RPO numbers.
However, this array is always just [0, 1, 2, 3, ...], so this change
removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
ensures that the removal is valid.
- RPO numbers, while useful for printing data that matches with the
stringified schedule, are not useful for matching profiling data with
blocks that haven't been scheduled yet. This change adds a new array
of block IDs in BasicBlockProfilerData, so that block counters can be
used for PGO.
- Basic block counters need to be written to a file so that they can be
provided to a subsequent run of mksnapshot, but the design doc doesn't
specify the transfer format or what file is used. In this change, I
propose using the existing v8.log file for that purpose. Block count
records look like this:
block,TestLessThanHandler,37,29405
This line indicates that block ID 37 in TestLessThanHandler was run
29405 times. If multiple lines refer to the same block, the reader
adds them all together. I like this format because it's easy to use:
- V8 already has robust logic for creating the log file, naming it to
avoid conflicts in multi-process situations, etc.
- Line order doesn't matter, and interleaved writes from various
logging sources are fine, given that V8 writes each line atomically.
- Combining multiple sources of profiling data is as simple as
concatenating their v8.log files together.
- It is a good idea to avoid making any changes based on profiling data
if the function being compiled doesn't match the one that was
profiled, since it is common to use profiling data downloaded from a
central lab which is updated only periodically. To check whether a
function matches, I propose using a hash of the Graph state right
before scheduling. This might be stricter than necessary, as some
changes to the function might be small enough that the profile data is
still relevant, but I'd rather err on the side of not making incorrect
changes. This hash is also written to the v8.log file, in a line that
looks like this:
builtin_hash,LdaZeroHandler,3387822046
Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-16 16:37:08 +00:00
"src/builtins/profile-data-reader.h",
2021-03-03 23:20:31 +00:00
"src/codegen/aligned-slot-allocator.h",
2019-05-21 09:30:15 +00:00
"src/codegen/assembler-arch.h",
"src/codegen/assembler-inl.h",
"src/codegen/assembler.h",
"src/codegen/bailout-reason.h",
2019-05-23 07:56:17 +00:00
"src/codegen/callable.h",
2019-05-21 09:30:15 +00:00
"src/codegen/code-comments.h",
"src/codegen/code-desc.h",
"src/codegen/code-factory.h",
"src/codegen/code-reference.h",
"src/codegen/compilation-cache.h",
"src/codegen/compiler.h",
"src/codegen/constant-pool.h",
"src/codegen/constants-arch.h",
"src/codegen/cpu-features.h",
2020-04-21 14:03:50 +00:00
"src/codegen/external-reference-encoder.h",
2019-05-24 13:51:59 +00:00
"src/codegen/external-reference-table.h",
"src/codegen/external-reference.h",
2019-05-21 09:30:15 +00:00
"src/codegen/flush-instruction-cache.h",
"src/codegen/handler-table.h",
Reland "[codegen] Add static interface descriptors"
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
Bug: v8:11420
Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74010}
2021-04-16 14:52:06 +00:00
"src/codegen/interface-descriptors-inl.h",
2019-05-21 09:30:15 +00:00
"src/codegen/interface-descriptors.h",
"src/codegen/label.h",
"src/codegen/machine-type.h",
"src/codegen/macro-assembler-inl.h",
"src/codegen/macro-assembler.h",
"src/codegen/optimized-compilation-info.h",
2019-07-08 16:52:18 +00:00
"src/codegen/pending-optimization-table.h",
2019-05-21 09:30:15 +00:00
"src/codegen/register-arch.h",
"src/codegen/register-configuration.h",
"src/codegen/register.h",
"src/codegen/reglist.h",
"src/codegen/reloc-info.h",
"src/codegen/safepoint-table.h",
"src/codegen/signature.h",
"src/codegen/source-position-table.h",
"src/codegen/source-position.h",
"src/codegen/string-constants.h",
2019-07-16 21:46:08 +00:00
"src/codegen/tick-counter.h",
2019-09-12 14:05:12 +00:00
"src/codegen/tnode.h",
2019-05-21 09:30:15 +00:00
"src/codegen/turbo-assembler.h",
"src/codegen/unoptimized-compilation-info.h",
2019-05-24 13:51:59 +00:00
"src/common/assert-scope.h",
"src/common/checks.h",
2020-04-29 15:28:17 +00:00
"src/common/external-pointer-inl.h",
"src/common/external-pointer.h",
2019-09-11 15:44:10 +00:00
"src/common/message-template.h",
2019-05-24 13:51:59 +00:00
"src/common/ptr-compr-inl.h",
"src/common/ptr-compr.h",
2016-12-12 15:35:41 +00:00
"src/compiler-dispatcher/compiler-dispatcher.h",
2016-07-20 12:53:33 +00:00
"src/compiler-dispatcher/optimizing-compile-dispatcher.h",
2021-03-01 12:14:54 +00:00
"src/compiler/all-nodes.h",
"src/compiler/allocation-builder-inl.h",
"src/compiler/allocation-builder.h",
"src/compiler/backend/code-generator-impl.h",
"src/compiler/backend/code-generator.h",
"src/compiler/backend/frame-elider.h",
"src/compiler/backend/gap-resolver.h",
"src/compiler/backend/instruction-codes.h",
"src/compiler/backend/instruction-scheduler.h",
"src/compiler/backend/instruction-selector-impl.h",
"src/compiler/backend/instruction-selector.h",
"src/compiler/backend/instruction.h",
"src/compiler/backend/jump-threading.h",
"src/compiler/backend/mid-tier-register-allocator.h",
"src/compiler/backend/move-optimizer.h",
"src/compiler/backend/register-allocation.h",
"src/compiler/backend/register-allocator-verifier.h",
"src/compiler/backend/register-allocator.h",
"src/compiler/backend/spill-placer.h",
"src/compiler/backend/unwinding-info-writer.h",
"src/compiler/basic-block-instrumentor.h",
"src/compiler/branch-elimination.h",
"src/compiler/bytecode-analysis.h",
"src/compiler/bytecode-graph-builder.h",
"src/compiler/bytecode-liveness-map.h",
"src/compiler/checkpoint-elimination.h",
"src/compiler/code-assembler.h",
"src/compiler/common-node-cache.h",
"src/compiler/common-operator-reducer.h",
"src/compiler/common-operator.h",
"src/compiler/compilation-dependencies.h",
"src/compiler/compiler-source-position-table.h",
"src/compiler/constant-folding-reducer.h",
"src/compiler/control-equivalence.h",
"src/compiler/control-flow-optimizer.h",
"src/compiler/csa-load-elimination.h",
"src/compiler/dead-code-elimination.h",
"src/compiler/decompression-optimizer.h",
"src/compiler/diamond.h",
"src/compiler/effect-control-linearizer.h",
"src/compiler/escape-analysis-reducer.h",
"src/compiler/escape-analysis.h",
"src/compiler/feedback-source.h",
"src/compiler/frame-states.h",
"src/compiler/frame.h",
"src/compiler/functional-list.h",
"src/compiler/globals.h",
"src/compiler/graph-assembler.h",
"src/compiler/graph-reducer.h",
"src/compiler/graph-trimmer.h",
"src/compiler/graph-visualizer.h",
"src/compiler/graph-zone-traits.h",
"src/compiler/graph.h",
"src/compiler/js-call-reducer.h",
"src/compiler/js-context-specialization.h",
"src/compiler/js-create-lowering.h",
"src/compiler/js-generic-lowering.h",
"src/compiler/js-graph.h",
"src/compiler/js-heap-broker.h",
"src/compiler/js-heap-copy-reducer.h",
"src/compiler/js-inlining-heuristic.h",
"src/compiler/js-inlining.h",
"src/compiler/js-intrinsic-lowering.h",
"src/compiler/js-native-context-specialization.h",
"src/compiler/js-operator.h",
"src/compiler/js-type-hint-lowering.h",
"src/compiler/js-typed-lowering.h",
"src/compiler/linkage.h",
"src/compiler/load-elimination.h",
"src/compiler/loop-analysis.h",
"src/compiler/loop-peeling.h",
"src/compiler/loop-unrolling.h",
"src/compiler/loop-variable-optimizer.h",
"src/compiler/machine-graph-verifier.h",
"src/compiler/machine-graph.h",
"src/compiler/machine-operator-reducer.h",
"src/compiler/machine-operator.h",
"src/compiler/map-inference.h",
"src/compiler/memory-lowering.h",
"src/compiler/memory-optimizer.h",
"src/compiler/node-aux-data.h",
"src/compiler/node-cache.h",
"src/compiler/node-marker.h",
"src/compiler/node-matchers.h",
"src/compiler/node-observer.h",
"src/compiler/node-origin-table.h",
"src/compiler/node-properties.h",
"src/compiler/node.h",
"src/compiler/opcodes.h",
"src/compiler/operation-typer.h",
"src/compiler/operator-properties.h",
"src/compiler/operator.h",
"src/compiler/osr.h",
"src/compiler/per-isolate-compiler-cache.h",
"src/compiler/persistent-map.h",
"src/compiler/pipeline-statistics.h",
"src/compiler/pipeline.h",
"src/compiler/property-access-builder.h",
"src/compiler/raw-machine-assembler.h",
"src/compiler/redundancy-elimination.h",
"src/compiler/refs-map.h",
"src/compiler/representation-change.h",
"src/compiler/schedule.h",
"src/compiler/scheduled-machine-lowering.h",
"src/compiler/scheduler.h",
"src/compiler/select-lowering.h",
"src/compiler/serializer-for-background-compilation.h",
"src/compiler/serializer-hints.h",
"src/compiler/simplified-lowering.h",
"src/compiler/simplified-operator-reducer.h",
"src/compiler/simplified-operator.h",
"src/compiler/state-values-utils.h",
"src/compiler/store-store-elimination.h",
"src/compiler/type-cache.h",
"src/compiler/type-narrowing-reducer.h",
"src/compiler/typed-optimization.h",
"src/compiler/typer.h",
"src/compiler/types.h",
"src/compiler/value-numbering-reducer.h",
"src/compiler/verifier.h",
"src/compiler/write-barrier-kind.h",
"src/compiler/zone-stats.h",
2019-05-15 12:52:58 +00:00
"src/date/date.h",
"src/date/dateparser-inl.h",
"src/date/dateparser.h",
2017-02-09 19:00:49 +00:00
"src/debug/debug-coverage.h",
2015-08-04 12:08:56 +00:00
"src/debug/debug-evaluate.h",
"src/debug/debug-frames.h",
2016-10-18 15:14:56 +00:00
"src/debug/debug-interface.h",
2018-10-31 16:16:39 +00:00
"src/debug/debug-property-iterator.h",
2017-07-27 03:58:01 +00:00
"src/debug/debug-scope-iterator.h",
2015-08-04 12:08:56 +00:00
"src/debug/debug-scopes.h",
2017-07-27 03:58:01 +00:00
"src/debug/debug-stack-trace-iterator.h",
2017-09-08 10:51:50 +00:00
"src/debug/debug-type-profile.h",
2015-07-31 11:07:50 +00:00
"src/debug/debug.h",
2016-12-05 13:32:05 +00:00
"src/debug/interface-types.h",
2015-07-31 11:07:50 +00:00
"src/debug/liveedit.h",
2019-05-20 13:01:00 +00:00
"src/deoptimizer/deoptimize-reason.h",
2021-01-20 14:48:01 +00:00
"src/deoptimizer/deoptimized-frame-info.h",
2019-05-20 13:01:00 +00:00
"src/deoptimizer/deoptimizer.h",
2021-01-20 14:48:01 +00:00
"src/deoptimizer/frame-description.h",
"src/deoptimizer/materialized-object-store.h",
"src/deoptimizer/translated-state.h",
"src/deoptimizer/translation-array.h",
2021-01-25 06:37:40 +00:00
"src/deoptimizer/translation-opcode.h",
2019-05-20 09:15:06 +00:00
"src/diagnostics/basic-block-profiler.h",
2019-05-21 09:30:15 +00:00
"src/diagnostics/code-tracer.h",
2019-05-24 13:51:59 +00:00
"src/diagnostics/compilation-statistics.h",
2019-05-20 09:15:06 +00:00
"src/diagnostics/disasm.h",
"src/diagnostics/disassembler.h",
"src/diagnostics/eh-frame.h",
"src/diagnostics/gdb-jit.h",
"src/diagnostics/perf-jit.h",
2020-10-20 09:40:34 +00:00
"src/diagnostics/unwinder.h",
2019-05-22 07:55:37 +00:00
"src/execution/arguments-inl.h",
"src/execution/arguments.h",
"src/execution/execution.h",
2020-09-29 13:40:21 +00:00
"src/execution/external-pointer-table.h",
2019-05-22 07:55:37 +00:00
"src/execution/frame-constants.h",
"src/execution/frames-inl.h",
"src/execution/frames.h",
"src/execution/futex-emulation.h",
2019-06-13 05:14:01 +00:00
"src/execution/interrupts-scope.h",
2019-05-22 07:55:37 +00:00
"src/execution/isolate-data.h",
"src/execution/isolate-inl.h",
2019-06-24 09:49:45 +00:00
"src/execution/isolate-utils.h",
2019-05-22 07:55:37 +00:00
"src/execution/isolate.h",
2020-08-13 12:12:17 +00:00
"src/execution/local-isolate-inl.h",
"src/execution/local-isolate.h",
2019-05-22 07:55:37 +00:00
"src/execution/messages.h",
"src/execution/microtask-queue.h",
2020-02-12 11:45:31 +00:00
"src/execution/pointer-authentication.h",
2019-08-29 12:11:14 +00:00
"src/execution/protectors-inl.h",
"src/execution/protectors.h",
2019-05-22 07:55:37 +00:00
"src/execution/runtime-profiler.h",
2020-12-17 16:02:56 +00:00
"src/execution/shared-mutex-guard-if-off-thread.h",
2019-05-22 07:55:37 +00:00
"src/execution/simulator-base.h",
"src/execution/simulator.h",
2019-06-13 05:14:01 +00:00
"src/execution/stack-guard.h",
2019-05-22 07:55:37 +00:00
"src/execution/thread-id.h",
"src/execution/thread-local-top.h",
2019-05-24 13:51:59 +00:00
"src/execution/v8threads.h",
2019-05-22 07:55:37 +00:00
"src/execution/vm-state-inl.h",
"src/execution/vm-state.h",
2019-07-16 21:39:36 +00:00
"src/extensions/cputracemark-extension.h",
2014-05-05 11:06:26 +00:00
"src/extensions/externalize-string-extension.h",
"src/extensions/gc-extension.h",
2016-04-27 11:10:41 +00:00
"src/extensions/ignition-statistics-extension.h",
2014-05-05 11:06:26 +00:00
"src/extensions/statistics-extension.h",
"src/extensions/trigger-failure-extension.h",
2019-05-22 12:44:24 +00:00
"src/handles/global-handles.h",
"src/handles/handles-inl.h",
"src/handles/handles.h",
2020-03-25 10:09:07 +00:00
"src/handles/local-handles-inl.h",
"src/handles/local-handles.h",
2019-05-22 12:44:24 +00:00
"src/handles/maybe-handles-inl.h",
"src/handles/maybe-handles.h",
2020-04-06 06:23:44 +00:00
"src/handles/persistent-handles.h",
2020-07-17 12:20:04 +00:00
"src/heap/allocation-observer.h",
2020-06-03 09:59:25 +00:00
"src/heap/allocation-stats.h",
2020-01-23 21:44:40 +00:00
"src/heap/array-buffer-sweeper.h",
2017-08-30 11:09:09 +00:00
"src/heap/barrier.h",
2020-06-18 14:13:11 +00:00
"src/heap/base-space.h",
2019-07-11 13:56:41 +00:00
"src/heap/basic-memory-chunk.h",
2020-05-14 16:26:48 +00:00
"src/heap/code-object-registry.h",
2016-06-30 13:21:03 +00:00
"src/heap/code-stats.h",
2020-10-13 10:22:19 +00:00
"src/heap/collection-barrier.h",
2019-05-02 15:35:51 +00:00
"src/heap/combined-heap.h",
2020-04-15 10:49:38 +00:00
"src/heap/concurrent-allocator-inl.h",
"src/heap/concurrent-allocator.h",
2017-03-06 15:19:36 +00:00
"src/heap/concurrent-marking.h",
2020-06-17 07:54:15 +00:00
"src/heap/cppgc-js/cpp-heap.h",
2020-10-16 15:05:08 +00:00
"src/heap/cppgc-js/cpp-snapshot.h",
2020-07-10 14:50:36 +00:00
"src/heap/cppgc-js/unified-heap-marking-state.h",
2020-10-21 12:06:27 +00:00
"src/heap/cppgc-js/unified-heap-marking-verifier.h",
2020-07-10 14:50:36 +00:00
"src/heap/cppgc-js/unified-heap-marking-visitor.h",
2016-12-20 09:35:05 +00:00
"src/heap/embedder-tracing.h",
[offthread] Add OffThreadFactory
Introduce OffThreadFactory with initial string construction support.
The OffThreadFactory shares with Factory a new CRTP base class, called
FactoryBase. Methods in FactoryBase return a FactoryHandle<Factory, T>
alias, which is Handle<T> for normal Factory and a new OffThreadHandle<T>
for OffThreadFactory. OffThreadHandle<T> behaves like Handle<T>, except
it stores the object in-line rather than needing external storage.
Any shared factory methods are moved into FactoryBase, which uses CRTP
to call the sub-class's AllocateRaw method (plus a few more customization
points which need Isolate access on the main thread).
Methods that used to take an Isolate or Factory, and are needed off the
main thread, are now expected to be templated on the factory type and
to use the appropriate handle.
Once an OffThreadFactory has finished being used (e.g. off-thread
compilation completed) its pages are "Published" into the main-thread
Heap. To deal with string internalization without creating a bunch of
ThinStrings, this is done in two stages:
1. 'FinishOffThread': The off-thread pages are walked to
collect all slots pointing to "internalized" strings. After this is
called it is invalid to allocate any more objects with the factory.
2. 'Publish': On the main thread, we transform these slots into
<Handle to holder, offset> pairs, then for each saved slot
re-internalize its string and update the slot to point to the
internalized string.
Bug: chromium:1011762
Change-Id: I008a694da3c357de34362bd86fe7e1f46b535d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992434
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65787}
2020-01-15 11:47:41 +00:00
"src/heap/factory-base.h",
2018-04-09 19:11:22 +00:00
"src/heap/factory-inl.h",
"src/heap/factory.h",
2020-02-24 19:47:48 +00:00
"src/heap/finalization-registry-cleanup-task.h",
2020-06-12 12:21:33 +00:00
"src/heap/free-list-inl.h",
"src/heap/free-list.h",
2014-08-20 10:33:03 +00:00
"src/heap/gc-idle-time-handler.h",
2014-08-05 08:18:22 +00:00
"src/heap/gc-tracer.h",
2018-06-07 12:00:16 +00:00
"src/heap/heap-controller.h",
2014-08-05 08:18:22 +00:00
"src/heap/heap-inl.h",
2018-07-24 20:13:40 +00:00
"src/heap/heap-write-barrier-inl.h",
"src/heap/heap-write-barrier.h",
2014-08-05 08:18:22 +00:00
"src/heap/heap.h",
2016-09-15 13:14:33 +00:00
"src/heap/incremental-marking-inl.h",
2015-09-08 15:54:24 +00:00
"src/heap/incremental-marking-job.h",
2014-08-05 08:18:22 +00:00
"src/heap/incremental-marking.h",
2020-09-11 18:39:53 +00:00
"src/heap/index-generator.h",
2017-08-02 17:27:11 +00:00
"src/heap/invalidated-slots-inl.h",
"src/heap/invalidated-slots.h",
2020-04-28 16:38:57 +00:00
"src/heap/large-spaces.h",
2020-04-28 14:26:55 +00:00
"src/heap/list.h",
2018-07-27 07:38:53 +00:00
"src/heap/local-allocator-inl.h",
2017-07-17 11:33:28 +00:00
"src/heap/local-allocator.h",
2020-08-13 12:12:17 +00:00
"src/heap/local-factory.h",
2020-07-10 08:58:37 +00:00
"src/heap/local-heap-inl.h",
2020-03-11 13:35:39 +00:00
"src/heap/local-heap.h",
2014-08-05 08:18:22 +00:00
"src/heap/mark-compact-inl.h",
"src/heap/mark-compact.h",
2020-07-03 07:26:57 +00:00
"src/heap/marking-barrier.h",
2019-10-29 16:20:49 +00:00
"src/heap/marking-visitor-inl.h",
"src/heap/marking-visitor.h",
2020-08-10 14:38:05 +00:00
"src/heap/marking-worklist-inl.h",
2019-12-03 13:58:10 +00:00
"src/heap/marking-worklist.h",
2016-07-12 15:08:55 +00:00
"src/heap/marking.h",
2020-05-15 19:14:08 +00:00
"src/heap/memory-allocator.h",
2020-05-04 12:24:44 +00:00
"src/heap/memory-chunk-inl.h",
2020-07-09 19:54:28 +00:00
"src/heap/memory-chunk-layout.h",
2020-05-04 12:24:44 +00:00
"src/heap/memory-chunk.h",
2020-01-09 11:35:10 +00:00
"src/heap/memory-measurement-inl.h",
2019-09-11 16:37:40 +00:00
"src/heap/memory-measurement.h",
2015-07-07 11:37:44 +00:00
"src/heap/memory-reducer.h",
2020-05-15 13:59:51 +00:00
"src/heap/new-spaces-inl.h",
"src/heap/new-spaces.h",
2015-09-02 16:43:21 +00:00
"src/heap/object-stats.h",
2014-08-07 12:21:01 +00:00
"src/heap/objects-visiting-inl.h",
"src/heap/objects-visiting.h",
2020-05-14 16:26:48 +00:00
"src/heap/paged-spaces-inl.h",
"src/heap/paged-spaces.h",
2020-09-30 15:41:56 +00:00
"src/heap/parallel-work-item.h",
2020-11-17 10:16:09 +00:00
"src/heap/parked-scope.h",
2019-06-06 13:10:02 +00:00
"src/heap/read-only-heap-inl.h",
2019-02-28 16:07:25 +00:00
"src/heap/read-only-heap.h",
2020-05-01 10:32:20 +00:00
"src/heap/read-only-spaces.h",
2020-06-03 13:45:32 +00:00
"src/heap/remembered-set-inl.h",
2016-02-16 12:34:30 +00:00
"src/heap/remembered-set.h",
2020-03-16 15:34:18 +00:00
"src/heap/safepoint.h",
2016-03-31 07:30:16 +00:00
"src/heap/scavenge-job.h",
2015-09-14 11:44:20 +00:00
"src/heap/scavenger-inl.h",
"src/heap/scavenger.h",
2016-02-08 08:51:02 +00:00
"src/heap/slot-set.h",
2014-08-05 08:18:22 +00:00
"src/heap/spaces-inl.h",
"src/heap/spaces.h",
2017-12-06 17:35:07 +00:00
"src/heap/stress-marking-observer.h",
2017-12-07 11:51:50 +00:00
"src/heap/stress-scavenge-observer.h",
2017-11-27 17:29:51 +00:00
"src/heap/sweeper.h",
2020-10-01 12:07:28 +00:00
"src/heap/weak-object-worklists.h",
2017-06-23 10:44:53 +00:00
"src/heap/worklist.h",
2014-08-22 14:36:54 +00:00
"src/ic/call-optimization.h",
2016-10-14 12:37:09 +00:00
"src/ic/handler-configuration-inl.h",
2016-09-15 13:14:33 +00:00
"src/ic/handler-configuration.h",
2014-08-22 11:43:39 +00:00
"src/ic/ic-inl.h",
2016-12-07 16:58:24 +00:00
"src/ic/ic-stats.h",
2014-08-22 11:43:39 +00:00
"src/ic/ic.h",
"src/ic/stub-cache.h",
2019-05-16 10:26:57 +00:00
"src/init/bootstrapper.h",
2019-05-24 13:51:59 +00:00
"src/init/heap-symbols.h",
2019-05-16 10:26:57 +00:00
"src/init/icu_util.h",
"src/init/isolate-allocator.h",
"src/init/setup-isolate.h",
"src/init/startup-data-util.h",
2019-05-24 13:51:59 +00:00
"src/init/v8.h",
2017-06-19 13:13:04 +00:00
"src/interpreter/block-coverage-builder.h",
2015-08-18 13:46:43 +00:00
"src/interpreter/bytecode-array-builder.h",
2015-09-10 16:21:34 +00:00
"src/interpreter/bytecode-array-iterator.h",
2016-12-05 13:03:07 +00:00
"src/interpreter/bytecode-array-random-iterator.h",
2017-06-27 08:44:35 +00:00
"src/interpreter/bytecode-array-writer.h",
2016-07-15 12:03:04 +00:00
"src/interpreter/bytecode-decoder.h",
"src/interpreter/bytecode-flags.h",
2015-08-18 13:46:43 +00:00
"src/interpreter/bytecode-generator.h",
2017-05-15 16:31:05 +00:00
"src/interpreter/bytecode-jump-table.h",
2016-06-03 14:52:59 +00:00
"src/interpreter/bytecode-label.h",
2017-06-27 08:44:35 +00:00
"src/interpreter/bytecode-node.h",
2016-09-22 16:34:16 +00:00
"src/interpreter/bytecode-operands.h",
2016-01-14 13:43:14 +00:00
"src/interpreter/bytecode-register-allocator.h",
2016-05-27 15:57:35 +00:00
"src/interpreter/bytecode-register-optimizer.h",
2016-07-15 12:03:04 +00:00
"src/interpreter/bytecode-register.h",
2017-04-11 13:37:25 +00:00
"src/interpreter/bytecode-source-info.h",
2015-10-01 17:22:58 +00:00
"src/interpreter/bytecode-traits.h",
2016-03-31 07:30:16 +00:00
"src/interpreter/bytecodes.h",
2016-01-05 19:08:11 +00:00
"src/interpreter/constant-array-builder.h",
2015-10-01 15:04:09 +00:00
"src/interpreter/control-flow-builders.h",
2016-01-20 10:46:18 +00:00
"src/interpreter/handler-table-builder.h",
2017-03-20 16:56:06 +00:00
"src/interpreter/interpreter-generator.h",
2016-03-22 11:35:09 +00:00
"src/interpreter/interpreter-intrinsics.h",
2016-03-31 07:30:16 +00:00
"src/interpreter/interpreter.h",
2019-05-20 09:58:03 +00:00
"src/json/json-parser.h",
"src/json/json-stringifier.h",
2021-03-01 18:39:30 +00:00
"src/libsampler/sampler.h",
2019-05-21 09:30:15 +00:00
"src/logging/code-events.h",
2019-05-20 09:15:06 +00:00
"src/logging/counters-definitions.h",
"src/logging/counters.h",
2020-08-13 12:12:17 +00:00
"src/logging/local-logger.h",
2019-05-20 09:15:06 +00:00
"src/logging/log-inl.h",
"src/logging/log-utils.h",
"src/logging/log.h",
2020-07-28 11:11:06 +00:00
"src/logging/metrics.h",
2021-04-12 14:38:06 +00:00
"src/logging/runtime-call-stats.h",
2020-06-03 09:43:01 +00:00
"src/logging/tracing-flags.h",
2019-05-15 18:28:45 +00:00
"src/numbers/bignum-dtoa.h",
"src/numbers/bignum.h",
"src/numbers/cached-powers.h",
"src/numbers/conversions-inl.h",
"src/numbers/conversions.h",
"src/numbers/diy-fp.h",
"src/numbers/double.h",
"src/numbers/dtoa.h",
"src/numbers/fast-dtoa.h",
"src/numbers/fixed-dtoa.h",
2019-05-24 13:51:59 +00:00
"src/numbers/hash-seed-inl.h",
2019-05-15 18:28:45 +00:00
"src/numbers/math-random.h",
"src/numbers/strtod.h",
2020-10-28 16:09:52 +00:00
"src/objects/all-objects-inl.h",
2019-02-12 08:41:25 +00:00
"src/objects/allocation-site-inl.h",
2019-05-24 13:51:59 +00:00
"src/objects/allocation-site-scopes-inl.h",
"src/objects/allocation-site-scopes.h",
2019-02-12 08:41:25 +00:00
"src/objects/allocation-site.h",
2018-04-30 13:27:37 +00:00
"src/objects/api-callbacks-inl.h",
"src/objects/api-callbacks.h",
2017-06-09 13:33:49 +00:00
"src/objects/arguments-inl.h",
"src/objects/arguments.h",
2019-09-09 10:19:34 +00:00
"src/objects/backing-store.h",
2020-10-28 16:09:52 +00:00
"src/objects/bigint-inl.h",
2017-09-11 13:16:27 +00:00
"src/objects/bigint.h",
2018-12-17 10:42:00 +00:00
"src/objects/cell-inl.h",
"src/objects/cell.h",
2017-10-13 13:24:26 +00:00
"src/objects/code-inl.h",
2020-08-05 11:48:03 +00:00
"src/objects/code-kind.h",
2017-10-13 13:24:26 +00:00
"src/objects/code.h",
2020-11-03 11:39:39 +00:00
"src/objects/compilation-cache-table-inl.h",
"src/objects/compilation-cache-table.h",
2019-03-06 17:45:15 +00:00
"src/objects/compressed-slots-inl.h",
"src/objects/compressed-slots.h",
2019-05-23 08:51:46 +00:00
"src/objects/contexts-inl.h",
"src/objects/contexts.h",
2020-10-28 16:09:52 +00:00
"src/objects/data-handler-inl.h",
2019-02-12 08:41:25 +00:00
"src/objects/data-handler.h",
2017-05-23 12:17:09 +00:00
"src/objects/debug-objects-inl.h",
"src/objects/debug-objects.h",
2018-12-07 11:37:56 +00:00
"src/objects/descriptor-array-inl.h",
2017-03-24 11:38:53 +00:00
"src/objects/descriptor-array.h",
2018-11-30 13:09:34 +00:00
"src/objects/dictionary-inl.h",
2017-04-04 08:14:14 +00:00
"src/objects/dictionary.h",
2019-05-20 08:54:18 +00:00
"src/objects/elements-inl.h",
"src/objects/elements-kind.h",
"src/objects/elements.h",
2018-11-19 14:40:05 +00:00
"src/objects/embedder-data-array-inl.h",
"src/objects/embedder-data-array.h",
2018-11-21 11:30:49 +00:00
"src/objects/embedder-data-slot-inl.h",
"src/objects/embedder-data-slot.h",
2018-12-13 23:35:14 +00:00
"src/objects/feedback-cell-inl.h",
"src/objects/feedback-cell.h",
2019-05-23 08:51:46 +00:00
"src/objects/feedback-vector-inl.h",
"src/objects/feedback-vector.h",
2019-05-20 08:54:18 +00:00
"src/objects/field-index-inl.h",
"src/objects/field-index.h",
"src/objects/field-type.h",
2017-12-01 11:33:03 +00:00
"src/objects/fixed-array-inl.h",
"src/objects/fixed-array.h",
2020-10-28 16:09:52 +00:00
"src/objects/foreign-inl.h",
"src/objects/foreign.h",
"src/objects/free-space-inl.h",
"src/objects/free-space.h",
2019-05-23 08:51:46 +00:00
"src/objects/function-kind.h",
2017-06-20 18:22:40 +00:00
"src/objects/hash-table-inl.h",
2017-04-06 08:32:57 +00:00
"src/objects/hash-table.h",
2018-12-17 17:01:48 +00:00
"src/objects/heap-number-inl.h",
"src/objects/heap-number.h",
2018-10-24 01:44:19 +00:00
"src/objects/heap-object-inl.h",
"src/objects/heap-object.h",
2018-11-26 14:34:01 +00:00
"src/objects/instance-type-inl.h",
"src/objects/instance-type.h",
2019-10-10 13:51:37 +00:00
"src/objects/internal-index.h",
2018-08-16 16:01:36 +00:00
"src/objects/js-array-buffer-inl.h",
"src/objects/js-array-buffer.h",
2017-10-13 15:06:23 +00:00
"src/objects/js-array-inl.h",
"src/objects/js-array.h",
2017-12-01 11:40:51 +00:00
"src/objects/js-collection-inl.h",
2019-03-26 15:40:58 +00:00
"src/objects/js-collection-iterator.h",
2017-12-01 11:40:51 +00:00
"src/objects/js-collection.h",
2020-09-15 13:33:15 +00:00
"src/objects/js-function-inl.h",
2020-07-23 10:17:18 +00:00
"src/objects/js-function.h",
2018-07-20 06:54:47 +00:00
"src/objects/js-generator-inl.h",
"src/objects/js-generator.h",
2018-09-21 12:02:47 +00:00
"src/objects/js-objects-inl.h",
"src/objects/js-objects.h",
2018-02-26 12:40:05 +00:00
"src/objects/js-promise-inl.h",
"src/objects/js-promise.h",
2018-07-17 08:42:36 +00:00
"src/objects/js-proxy-inl.h",
"src/objects/js-proxy.h",
2017-10-13 15:06:23 +00:00
"src/objects/js-regexp-inl.h",
2018-04-05 14:41:26 +00:00
"src/objects/js-regexp-string-iterator-inl.h",
"src/objects/js-regexp-string-iterator.h",
2017-10-13 15:06:23 +00:00
"src/objects/js-regexp.h",
2018-10-09 12:08:23 +00:00
"src/objects/js-weak-refs-inl.h",
"src/objects/js-weak-refs.h",
2019-05-23 08:51:46 +00:00
"src/objects/keys.h",
2017-11-16 16:45:46 +00:00
"src/objects/literal-objects-inl.h",
2017-01-27 15:29:47 +00:00
"src/objects/literal-objects.h",
2019-05-20 08:54:18 +00:00
"src/objects/lookup-cache-inl.h",
"src/objects/lookup-cache.h",
"src/objects/lookup-inl.h",
"src/objects/lookup.h",
2018-04-26 14:37:05 +00:00
"src/objects/managed.h",
2017-05-17 11:31:18 +00:00
"src/objects/map-inl.h",
2019-05-20 08:54:18 +00:00
"src/objects/map-updater.h",
2017-05-17 11:31:18 +00:00
"src/objects/map.h",
2018-03-05 13:18:51 +00:00
"src/objects/maybe-object-inl.h",
"src/objects/maybe-object.h",
2018-02-27 08:58:10 +00:00
"src/objects/microtask-inl.h",
"src/objects/microtask.h",
2017-08-22 18:49:56 +00:00
"src/objects/module-inl.h",
"src/objects/module.h",
2017-06-12 11:08:30 +00:00
"src/objects/name-inl.h",
"src/objects/name.h",
2019-04-29 13:55:11 +00:00
"src/objects/object-list-macros.h",
2016-12-20 14:08:21 +00:00
"src/objects/object-macros-undef.h",
"src/objects/object-macros.h",
2019-05-24 13:51:59 +00:00
"src/objects/objects-body-descriptors-inl.h",
"src/objects/objects-body-descriptors.h",
2019-05-23 08:51:46 +00:00
"src/objects/objects-inl.h",
"src/objects/objects.h",
2018-12-17 19:42:33 +00:00
"src/objects/oddball-inl.h",
"src/objects/oddball.h",
2018-05-05 20:22:10 +00:00
"src/objects/ordered-hash-table-inl.h",
"src/objects/ordered-hash-table.h",
2019-09-27 12:20:02 +00:00
"src/objects/osr-optimized-code-cache-inl.h",
"src/objects/osr-optimized-code-cache.h",
2019-10-11 21:52:06 +00:00
"src/objects/primitive-heap-object-inl.h",
"src/objects/primitive-heap-object.h",
2018-02-26 12:40:05 +00:00
"src/objects/promise-inl.h",
"src/objects/promise.h",
2018-09-25 12:05:23 +00:00
"src/objects/property-array-inl.h",
"src/objects/property-array.h",
2018-11-30 13:09:34 +00:00
"src/objects/property-cell-inl.h",
"src/objects/property-cell.h",
2017-09-25 08:21:07 +00:00
"src/objects/property-descriptor-object-inl.h",
"src/objects/property-descriptor-object.h",
2019-05-20 08:54:18 +00:00
"src/objects/property-descriptor.h",
"src/objects/property-details.h",
"src/objects/property.h",
2018-07-10 11:45:14 +00:00
"src/objects/prototype-info-inl.h",
"src/objects/prototype-info.h",
2019-05-20 08:54:18 +00:00
"src/objects/prototype.h",
2017-01-20 13:01:55 +00:00
"src/objects/regexp-match-info.h",
2021-01-19 18:20:26 +00:00
"src/objects/scope-info-inl.h",
2016-12-20 14:08:21 +00:00
"src/objects/scope-info.h",
2017-05-30 12:04:34 +00:00
"src/objects/script-inl.h",
"src/objects/script.h",
2017-05-29 13:24:32 +00:00
"src/objects/shared-function-info-inl.h",
"src/objects/shared-function-info.h",
2018-11-01 04:35:22 +00:00
"src/objects/slots-atomic-inl.h",
2018-10-23 23:02:20 +00:00
"src/objects/slots-inl.h",
"src/objects/slots.h",
2019-06-19 17:07:58 +00:00
"src/objects/source-text-module.h",
2018-10-02 09:28:26 +00:00
"src/objects/stack-frame-info-inl.h",
"src/objects/stack-frame-info.h",
2019-01-31 09:46:40 +00:00
"src/objects/string-comparator.h",
2017-06-12 11:08:30 +00:00
"src/objects/string-inl.h",
[runtime] Move string table off-heap
Changes the isolate's string table into an off-heap structure. This
allows the string table to be resized without allocating on the V8 heap,
and potentially triggering a GC. This allows existing strings to be
inserted into the string table without requiring allocation.
This has two important benefits:
1) It allows the deserializer to insert strings directly into the
string table, rather than having to defer string insertion until
deserialization completes.
2) It simplifies the concurrent string table lookup to allow resizing
the table inside the write lock, therefore eliminating the race
where two concurrent lookups could both resize the table.
The off-heap string table has the following properties:
1) The general hashmap behaviour matches the HashTable, i.e. open
addressing, power-of-two sized, quadratic probing. This could, of
course, now be changed.
2) The empty and deleted sentinels are changed to Smi 0 and 1,
respectively, to make those comparisons a bit cheaper and not
require roots access.
3) When the HashTable is resized, the old elements array is kept
alive in a linked list of previous arrays, so that concurrent
lookups don't lose the data they're accessing. This linked list
is cleared by the GC, as then we know that all threads are in
a safepoint.
4) The GC treats the hash table entries as weak roots, and only walks
them for non-live reference clearing and for evacuation.
5) Since there is no longer a FixedArray to serialize for the startup
snapshot, there is now a custom serialization of the string table,
and the string table root is considered unserializable during weak
root iteration. As a bonus, the custom serialization is more
efficient, as it skips non-string entries.
As a drive-by, rename LookupStringExists_NoAllocate to
TryStringToIndexOrLookupExisting, to make it clearer that it returns
a non-string for the case when the string is an array index. As another
drive-by, extract StringSet into a separate header.
Bug: v8:10729
Change-Id: I9c990fb2d74d1fe222920408670974a70e969bca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339104
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69270}
2020-08-06 10:59:55 +00:00
"src/objects/string-set-inl.h",
"src/objects/string-set.h",
2018-11-30 13:09:34 +00:00
"src/objects/string-table-inl.h",
2017-04-06 08:32:57 +00:00
"src/objects/string-table.h",
2017-06-12 11:08:30 +00:00
"src/objects/string.h",
2018-12-13 23:35:14 +00:00
"src/objects/struct-inl.h",
"src/objects/struct.h",
2021-02-12 19:27:27 +00:00
"src/objects/swiss-hash-table-helpers.h",
2021-02-05 12:20:38 +00:00
"src/objects/swiss-name-dictionary-inl.h",
"src/objects/swiss-name-dictionary.h",
2020-10-28 16:09:52 +00:00
"src/objects/synthetic-module-inl.h",
2019-06-27 21:11:44 +00:00
"src/objects/synthetic-module.h",
2019-06-14 13:27:05 +00:00
"src/objects/tagged-field-inl.h",
"src/objects/tagged-field.h",
2019-05-09 13:47:33 +00:00
"src/objects/tagged-impl-inl.h",
"src/objects/tagged-impl.h",
2020-01-29 17:05:52 +00:00
"src/objects/tagged-index.h",
2019-05-23 16:57:22 +00:00
"src/objects/tagged-value-inl.h",
"src/objects/tagged-value.h",
[Runtime] Ensure template objects are retained if bytecode is flushed.
Template objects should be cached after they are first created and reused on
subsiquent calls to tag functions. Currently these cached objects are stored
on the feedback vector, which has appropriate lifetime, however with bytecode
flushing the feedback vector could be cleared when the bytecode is flushed,
causing the template object to be dropped.
In order to retain the cached template objects in the face of bytecode flushing,
this CL adds a weakmap for each native context that is (weakly) keyed by
shared function info, and holds a linked list of cached template objects
associated with that shared function info, indexed by feedback vector slot id.
Misses will check this weakmap, and if no entry is found, a new template object
is created and added into this weakmap alongside the feedback vector.
BUG=v8:8799,v8:8799,v8:8395
Change-Id: Ia95d5cfc394ce58dc9fe6a1e49780f05299acc17
Reviewed-on: https://chromium-review.googlesource.com/c/1477746
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59818}
2019-02-22 15:10:57 +00:00
"src/objects/template-objects-inl.h",
2017-09-22 09:57:29 +00:00
"src/objects/template-objects.h",
2018-04-27 08:31:07 +00:00
"src/objects/templates-inl.h",
"src/objects/templates.h",
2020-10-28 16:09:52 +00:00
"src/objects/torque-defined-classes-inl.h",
"src/objects/torque-defined-classes.h",
2019-05-20 08:54:18 +00:00
"src/objects/transitions-inl.h",
"src/objects/transitions.h",
2019-05-24 13:51:59 +00:00
"src/objects/type-hints.h",
"src/objects/value-serializer.h",
"src/objects/visitors.h",
2018-12-17 09:28:27 +00:00
"src/parsing/expression-scope.h",
2015-11-26 16:22:34 +00:00
"src/parsing/func-name-inferrer.h",
2020-11-12 19:08:51 +00:00
"src/parsing/import-assertions.h",
2019-05-06 14:42:10 +00:00
"src/parsing/literal-buffer.h",
2016-08-22 11:33:30 +00:00
"src/parsing/parse-info.h",
2016-01-14 11:36:14 +00:00
"src/parsing/parser-base.h",
2015-11-26 16:22:34 +00:00
"src/parsing/parser.h",
2016-11-30 13:21:11 +00:00
"src/parsing/parsing.h",
2019-05-24 13:51:59 +00:00
"src/parsing/pending-compilation-error-handler.h",
2019-01-07 14:09:18 +00:00
"src/parsing/preparse-data-impl.h",
"src/parsing/preparse-data.h",
2018-08-22 10:08:35 +00:00
"src/parsing/preparser-logger.h",
2015-11-26 16:22:34 +00:00
"src/parsing/preparser.h",
"src/parsing/rewriter.h",
"src/parsing/scanner-character-streams.h",
"src/parsing/scanner.h",
"src/parsing/token.h",
2015-09-28 19:34:08 +00:00
"src/profiler/allocation-tracker.h",
"src/profiler/circular-queue-inl.h",
"src/profiler/circular-queue.h",
"src/profiler/cpu-profiler-inl.h",
"src/profiler/cpu-profiler.h",
2021-03-01 12:14:54 +00:00
"src/profiler/heap-profiler.h",
"src/profiler/heap-snapshot-generator-inl.h",
"src/profiler/heap-snapshot-generator.h",
"src/profiler/profile-generator-inl.h",
"src/profiler/profile-generator.h",
"src/profiler/profiler-listener.h",
"src/profiler/profiler-stats.h",
"src/profiler/sampling-heap-profiler.h",
"src/profiler/strings-storage.h",
"src/profiler/symbolizer.h",
"src/profiler/tick-sample.h",
"src/profiler/tracing-cpu-profiler.h",
2021-03-19 19:18:18 +00:00
"src/profiler/weak-code-registry.h",
2021-03-01 12:14:54 +00:00
"src/regexp/experimental/experimental-bytecode.h",
"src/regexp/experimental/experimental-compiler.h",
"src/regexp/experimental/experimental-interpreter.h",
"src/regexp/experimental/experimental.h",
"src/regexp/property-sequences.h",
"src/regexp/regexp-ast.h",
"src/regexp/regexp-bytecode-generator-inl.h",
"src/regexp/regexp-bytecode-generator.h",
"src/regexp/regexp-bytecode-peephole.h",
"src/regexp/regexp-bytecodes.h",
"src/regexp/regexp-compiler.h",
"src/regexp/regexp-dotprinter.h",
"src/regexp/regexp-error.h",
"src/regexp/regexp-interpreter.h",
"src/regexp/regexp-macro-assembler-arch.h",
"src/regexp/regexp-macro-assembler-tracer.h",
"src/regexp/regexp-macro-assembler.h",
"src/regexp/regexp-nodes.h",
"src/regexp/regexp-parser.h",
"src/regexp/regexp-stack.h",
"src/regexp/regexp-utils.h",
"src/regexp/regexp.h",
"src/regexp/special-case.h",
"src/roots/roots-inl.h",
"src/roots/roots.h",
"src/runtime/runtime-utils.h",
"src/runtime/runtime.h",
"src/sanitizer/asan.h",
"src/sanitizer/lsan-page-allocator.h",
"src/sanitizer/msan.h",
"src/sanitizer/tsan.h",
"src/snapshot/code-serializer.h",
"src/snapshot/context-deserializer.h",
"src/snapshot/context-serializer.h",
"src/snapshot/deserializer.h",
"src/snapshot/embedded/embedded-data.h",
2021-03-01 18:30:26 +00:00
"src/snapshot/embedded/embedded-file-writer-interface.h",
2021-03-01 12:14:54 +00:00
"src/snapshot/object-deserializer.h",
"src/snapshot/read-only-deserializer.h",
"src/snapshot/read-only-serializer.h",
"src/snapshot/references.h",
"src/snapshot/roots-serializer.h",
"src/snapshot/serializer-deserializer.h",
"src/snapshot/serializer.h",
"src/snapshot/snapshot-compression.h",
"src/snapshot/snapshot-data.h",
"src/snapshot/snapshot-source-sink.h",
"src/snapshot/snapshot-utils.h",
"src/snapshot/snapshot.h",
"src/snapshot/startup-deserializer.h",
"src/snapshot/startup-serializer.h",
"src/strings/char-predicates-inl.h",
"src/strings/char-predicates.h",
"src/strings/string-builder-inl.h",
"src/strings/string-case.h",
"src/strings/string-hasher-inl.h",
"src/strings/string-hasher.h",
"src/strings/string-search.h",
"src/strings/string-stream.h",
"src/strings/unicode-decoder.h",
"src/strings/unicode-inl.h",
"src/strings/unicode.h",
"src/strings/uri.h",
"src/tasks/cancelable-task.h",
"src/tasks/operations-barrier.h",
"src/tasks/task-utils.h",
"src/third_party/siphash/halfsiphash.h",
"src/third_party/utf8-decoder/utf8-decoder.h",
"src/tracing/trace-event.h",
"src/tracing/traced-value.h",
"src/tracing/tracing-category-observer.h",
"src/trap-handler/trap-handler-internal.h",
"src/trap-handler/trap-handler.h",
"src/utils/address-map.h",
"src/utils/allocation.h",
"src/utils/bit-vector.h",
"src/utils/boxed-float.h",
"src/utils/detachable-vector.h",
"src/utils/identity-map.h",
"src/utils/locked-queue-inl.h",
"src/utils/locked-queue.h",
"src/utils/memcopy.h",
"src/utils/ostreams.h",
"src/utils/pointer-with-payload.h",
"src/utils/scoped-list.h",
"src/utils/utils-inl.h",
"src/utils/utils.h",
"src/utils/vector.h",
"src/utils/version.h",
"src/zone/accounting-allocator.h",
"src/zone/compressed-zone-ptr.h",
"src/zone/type-stats.h",
"src/zone/zone-allocator.h",
"src/zone/zone-chunk-list.h",
"src/zone/zone-compression.h",
"src/zone/zone-containers.h",
"src/zone/zone-handle-set.h",
"src/zone/zone-hashmap.h",
"src/zone/zone-list-inl.h",
"src/zone/zone-list.h",
"src/zone/zone-segment.h",
"src/zone/zone-type-traits.h",
"src/zone/zone-utils.h",
"src/zone/zone.h",
]
2021-03-02 16:31:12 +00:00
if (v8_use_perfetto) {
sources -= [ "//base/trace_event/common/trace_event_common.h" ]
}
2021-03-01 12:14:54 +00:00
if (v8_enable_webassembly) {
sources += [
"src/asmjs/asm-js.h",
"src/asmjs/asm-parser.h",
"src/asmjs/asm-scanner.h",
"src/asmjs/asm-types.h",
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
"src/compiler/int64-lowering.h",
"src/compiler/wasm-compiler.h",
2021-03-01 16:41:31 +00:00
"src/debug/debug-wasm-objects-inl.h",
"src/debug/debug-wasm-objects.h",
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
"src/wasm/baseline/liftoff-assembler-defs.h",
"src/wasm/baseline/liftoff-assembler.h",
"src/wasm/baseline/liftoff-compiler.h",
"src/wasm/baseline/liftoff-register.h",
"src/wasm/code-space-access.h",
"src/wasm/compilation-environment.h",
"src/wasm/decoder.h",
"src/wasm/function-body-decoder-impl.h",
"src/wasm/function-body-decoder.h",
"src/wasm/function-compiler.h",
"src/wasm/graph-builder-interface.h",
"src/wasm/jump-table-assembler.h",
"src/wasm/leb-helper.h",
"src/wasm/local-decl-encoder.h",
"src/wasm/memory-tracing.h",
"src/wasm/module-compiler.h",
"src/wasm/module-decoder.h",
"src/wasm/module-instantiate.h",
"src/wasm/object-access.h",
"src/wasm/signature-map.h",
"src/wasm/simd-shuffle.h",
"src/wasm/streaming-decoder.h",
"src/wasm/struct-types.h",
"src/wasm/value-type.h",
"src/wasm/wasm-arguments.h",
"src/wasm/wasm-code-manager.h",
"src/wasm/wasm-engine.h",
"src/wasm/wasm-external-refs.h",
"src/wasm/wasm-feature-flags.h",
"src/wasm/wasm-features.h",
"src/wasm/wasm-import-wrapper-cache.h",
2021-03-05 11:40:31 +00:00
"src/wasm/wasm-js.h",
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
"src/wasm/wasm-linkage.h",
"src/wasm/wasm-module-builder.h",
"src/wasm/wasm-module-sourcemap.h",
"src/wasm/wasm-module.h",
"src/wasm/wasm-objects-inl.h",
"src/wasm/wasm-objects.h",
"src/wasm/wasm-opcodes.h",
"src/wasm/wasm-result.h",
"src/wasm/wasm-serialization.h",
"src/wasm/wasm-subtyping.h",
"src/wasm/wasm-tier.h",
"src/wasm/wasm-value.h",
2021-03-01 12:14:54 +00:00
]
}
if (v8_enable_i18n_support) {
sources += [
"src/objects/intl-objects.h",
"src/objects/js-break-iterator-inl.h",
"src/objects/js-break-iterator.h",
"src/objects/js-collator-inl.h",
"src/objects/js-collator.h",
"src/objects/js-date-time-format-inl.h",
"src/objects/js-date-time-format.h",
"src/objects/js-display-names-inl.h",
"src/objects/js-display-names.h",
"src/objects/js-list-format-inl.h",
"src/objects/js-list-format.h",
"src/objects/js-locale-inl.h",
"src/objects/js-locale.h",
"src/objects/js-number-format-inl.h",
"src/objects/js-number-format.h",
"src/objects/js-plural-rules-inl.h",
"src/objects/js-plural-rules.h",
"src/objects/js-relative-time-format-inl.h",
"src/objects/js-relative-time-format.h",
"src/objects/js-segment-iterator-inl.h",
"src/objects/js-segment-iterator.h",
"src/objects/js-segmenter-inl.h",
"src/objects/js-segmenter.h",
"src/objects/js-segments-inl.h",
"src/objects/js-segments.h",
]
}
if (!v8_control_flow_integrity) {
sources += [ "src/execution/pointer-authentication-dummy.h" ]
}
if (v8_enable_conservative_stack_scanning) {
sources += [
"src/heap/conservative-stack-visitor.h",
"src/heap/object-start-bitmap.h",
]
}
if (v8_enable_wasm_gdb_remote_debugging) {
sources += [
"src/debug/wasm/gdb-server/gdb-remote-util.h",
"src/debug/wasm/gdb-server/gdb-server-thread.h",
"src/debug/wasm/gdb-server/gdb-server.h",
"src/debug/wasm/gdb-server/packet.h",
"src/debug/wasm/gdb-server/session.h",
"src/debug/wasm/gdb-server/target.h",
"src/debug/wasm/gdb-server/transport.h",
"src/debug/wasm/gdb-server/wasm-module-debug.h",
]
}
if (v8_current_cpu == "x86") {
sources += [ ### gcmole(arch:ia32) ###
"src/baseline/ia32/baseline-assembler-ia32-inl.h",
"src/baseline/ia32/baseline-compiler-ia32-inl.h",
"src/codegen/ia32/assembler-ia32-inl.h",
"src/codegen/ia32/assembler-ia32.h",
"src/codegen/ia32/constants-ia32.h",
"src/codegen/ia32/macro-assembler-ia32.h",
"src/codegen/ia32/register-ia32.h",
"src/codegen/ia32/sse-instr.h",
2021-03-25 16:29:25 +00:00
"src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h",
2021-03-01 12:14:54 +00:00
"src/compiler/backend/ia32/instruction-codes-ia32.h",
"src/execution/ia32/frame-constants-ia32.h",
"src/regexp/ia32/regexp-macro-assembler-ia32.h",
"src/wasm/baseline/ia32/liftoff-assembler-ia32.h",
]
} else if (v8_current_cpu == "x64") {
sources += [ ### gcmole(arch:x64) ###
"src/baseline/x64/baseline-assembler-x64-inl.h",
"src/baseline/x64/baseline-compiler-x64-inl.h",
2021-03-25 16:29:25 +00:00
"src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h",
2021-03-01 12:14:54 +00:00
"src/codegen/x64/assembler-x64-inl.h",
"src/codegen/x64/assembler-x64.h",
"src/codegen/x64/constants-x64.h",
"src/codegen/x64/fma-instr.h",
"src/codegen/x64/macro-assembler-x64.h",
"src/codegen/x64/register-x64.h",
"src/codegen/x64/sse-instr.h",
"src/compiler/backend/x64/instruction-codes-x64.h",
"src/compiler/backend/x64/unwinding-info-writer-x64.h",
"src/execution/x64/frame-constants-x64.h",
"src/regexp/x64/regexp-macro-assembler-x64.h",
"src/third_party/valgrind/valgrind.h",
"src/wasm/baseline/x64/liftoff-assembler-x64.h",
]
# iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
# based on Darwin and thus POSIX-compliant to a similar degree.
if (is_linux || is_chromeos || is_mac || is_ios || target_os == "freebsd") {
sources += [ "src/trap-handler/handler-inside-posix.h" ]
}
if (is_win) {
sources += [
"src/diagnostics/unwinding-info-win64.h",
"src/trap-handler/handler-inside-win.h",
]
}
} else if (v8_current_cpu == "arm") {
sources += [ ### gcmole(arch:arm) ###
"src/baseline/arm/baseline-assembler-arm-inl.h",
"src/baseline/arm/baseline-compiler-arm-inl.h",
"src/codegen/arm/assembler-arm-inl.h",
"src/codegen/arm/assembler-arm.h",
"src/codegen/arm/constants-arm.h",
"src/codegen/arm/macro-assembler-arm.h",
"src/codegen/arm/register-arm.h",
"src/compiler/backend/arm/instruction-codes-arm.h",
"src/compiler/backend/arm/unwinding-info-writer-arm.h",
"src/execution/arm/frame-constants-arm.h",
"src/execution/arm/simulator-arm.h",
"src/regexp/arm/regexp-macro-assembler-arm.h",
"src/wasm/baseline/arm/liftoff-assembler-arm.h",
]
} else if (v8_current_cpu == "arm64") {
sources += [ ### gcmole(arch:arm64) ###
"src/baseline/arm64/baseline-assembler-arm64-inl.h",
"src/baseline/arm64/baseline-compiler-arm64-inl.h",
"src/codegen/arm64/assembler-arm64-inl.h",
"src/codegen/arm64/assembler-arm64.h",
"src/codegen/arm64/constants-arm64.h",
"src/codegen/arm64/decoder-arm64-inl.h",
"src/codegen/arm64/decoder-arm64.h",
"src/codegen/arm64/instructions-arm64.h",
"src/codegen/arm64/macro-assembler-arm64-inl.h",
"src/codegen/arm64/macro-assembler-arm64.h",
"src/codegen/arm64/register-arm64.h",
"src/codegen/arm64/utils-arm64.h",
"src/compiler/backend/arm64/instruction-codes-arm64.h",
"src/compiler/backend/arm64/unwinding-info-writer-arm64.h",
"src/diagnostics/arm64/disasm-arm64.h",
"src/execution/arm64/frame-constants-arm64.h",
"src/execution/arm64/simulator-arm64.h",
"src/regexp/arm64/regexp-macro-assembler-arm64.h",
"src/wasm/baseline/arm64/liftoff-assembler-arm64.h",
]
if (v8_control_flow_integrity) {
sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ]
}
if (current_cpu == "arm64" && is_mac) {
sources += [ "src/trap-handler/handler-inside-posix.h" ]
}
if (is_win) {
sources += [ "src/diagnostics/unwinding-info-win64.h" ]
}
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
sources += [ ### gcmole(arch:mipsel) ###
"src/baseline/mips/baseline-assembler-mips-inl.h",
"src/baseline/mips/baseline-compiler-mips-inl.h",
"src/codegen/mips/assembler-mips-inl.h",
"src/codegen/mips/assembler-mips.h",
"src/codegen/mips/constants-mips.h",
"src/codegen/mips/macro-assembler-mips.h",
"src/codegen/mips/register-mips.h",
"src/compiler/backend/mips/instruction-codes-mips.h",
"src/execution/mips/frame-constants-mips.h",
"src/execution/mips/simulator-mips.h",
"src/regexp/mips/regexp-macro-assembler-mips.h",
"src/wasm/baseline/mips/liftoff-assembler-mips.h",
]
} else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
sources += [ ### gcmole(arch:mips64el) ###
"src/baseline/mips64/baseline-assembler-mips64-inl.h",
"src/baseline/mips64/baseline-compiler-mips64-inl.h",
"src/codegen/mips64/assembler-mips64-inl.h",
"src/codegen/mips64/assembler-mips64.h",
"src/codegen/mips64/constants-mips64.h",
"src/codegen/mips64/macro-assembler-mips64.h",
"src/codegen/mips64/register-mips64.h",
"src/compiler/backend/mips64/instruction-codes-mips64.h",
"src/execution/mips64/frame-constants-mips64.h",
"src/execution/mips64/simulator-mips64.h",
"src/regexp/mips64/regexp-macro-assembler-mips64.h",
"src/wasm/baseline/mips64/liftoff-assembler-mips64.h",
]
} else if (v8_current_cpu == "ppc") {
sources += [ ### gcmole(arch:ppc) ###
"src/baseline/ppc/baseline-assembler-ppc-inl.h",
"src/baseline/ppc/baseline-compiler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc.h",
"src/codegen/ppc/constants-ppc.h",
"src/codegen/ppc/macro-assembler-ppc.h",
"src/codegen/ppc/register-ppc.h",
"src/compiler/backend/ppc/instruction-codes-ppc.h",
"src/compiler/backend/ppc/unwinding-info-writer-ppc.h",
"src/execution/ppc/frame-constants-ppc.h",
"src/execution/ppc/simulator-ppc.h",
"src/regexp/ppc/regexp-macro-assembler-ppc.h",
"src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
]
} else if (v8_current_cpu == "ppc64") {
sources += [ ### gcmole(arch:ppc64) ###
"src/baseline/ppc/baseline-assembler-ppc-inl.h",
"src/baseline/ppc/baseline-compiler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc.h",
"src/codegen/ppc/constants-ppc.h",
"src/codegen/ppc/macro-assembler-ppc.h",
"src/codegen/ppc/register-ppc.h",
"src/compiler/backend/ppc/instruction-codes-ppc.h",
"src/compiler/backend/ppc/unwinding-info-writer-ppc.h",
"src/execution/ppc/frame-constants-ppc.h",
"src/execution/ppc/simulator-ppc.h",
"src/regexp/ppc/regexp-macro-assembler-ppc.h",
"src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
]
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [ ### gcmole(arch:s390) ###
"src/baseline/s390/baseline-assembler-s390-inl.h",
"src/baseline/s390/baseline-compiler-s390-inl.h",
"src/codegen/s390/assembler-s390-inl.h",
"src/codegen/s390/assembler-s390.h",
"src/codegen/s390/constants-s390.h",
"src/codegen/s390/macro-assembler-s390.h",
"src/codegen/s390/register-s390.h",
"src/compiler/backend/s390/instruction-codes-s390.h",
"src/compiler/backend/s390/unwinding-info-writer-s390.h",
"src/execution/s390/frame-constants-s390.h",
"src/execution/s390/simulator-s390.h",
"src/regexp/s390/regexp-macro-assembler-s390.h",
"src/wasm/baseline/s390/liftoff-assembler-s390.h",
]
} else if (v8_current_cpu == "riscv64") {
sources += [ ### gcmole(arch:riscv64) ###
"src/codegen/riscv64/assembler-riscv64-inl.h",
"src/codegen/riscv64/assembler-riscv64.h",
"src/codegen/riscv64/constants-riscv64.h",
"src/codegen/riscv64/macro-assembler-riscv64.h",
"src/codegen/riscv64/register-riscv64.h",
"src/compiler/backend/riscv64/instruction-codes-riscv64.h",
"src/execution/riscv64/frame-constants-riscv64.h",
"src/execution/riscv64/simulator-riscv64.h",
"src/regexp/riscv64/regexp-macro-assembler-riscv64.h",
"src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h",
]
}
public_deps = [
":torque_runtime_support",
2021-03-01 19:02:11 +00:00
":v8_flags",
2021-03-01 12:14:54 +00:00
":v8_headers",
":v8_maybe_icu",
":v8_shared_internal_headers",
]
deps = [
2021-03-01 22:33:51 +00:00
":cppgc_headers",
2021-03-01 12:14:54 +00:00
":generate_bytecode_builtins_list",
":run_torque",
":v8_libbase",
]
}
v8_compiler_sources = [
### gcmole(all) ###
"src/compiler/access-builder.cc",
"src/compiler/access-info.cc",
"src/compiler/add-type-assertions-reducer.cc",
"src/compiler/all-nodes.cc",
"src/compiler/backend/code-generator.cc",
"src/compiler/backend/frame-elider.cc",
"src/compiler/backend/gap-resolver.cc",
"src/compiler/backend/instruction-scheduler.cc",
"src/compiler/backend/instruction-selector.cc",
"src/compiler/backend/instruction.cc",
"src/compiler/backend/jump-threading.cc",
"src/compiler/backend/mid-tier-register-allocator.cc",
"src/compiler/backend/move-optimizer.cc",
"src/compiler/backend/register-allocator-verifier.cc",
"src/compiler/backend/register-allocator.cc",
"src/compiler/backend/spill-placer.cc",
"src/compiler/basic-block-instrumentor.cc",
"src/compiler/branch-elimination.cc",
"src/compiler/bytecode-analysis.cc",
"src/compiler/bytecode-graph-builder.cc",
"src/compiler/bytecode-liveness-map.cc",
"src/compiler/c-linkage.cc",
"src/compiler/checkpoint-elimination.cc",
"src/compiler/code-assembler.cc",
"src/compiler/common-node-cache.cc",
"src/compiler/common-operator-reducer.cc",
"src/compiler/common-operator.cc",
"src/compiler/compilation-dependencies.cc",
"src/compiler/compiler-source-position-table.cc",
"src/compiler/constant-folding-reducer.cc",
"src/compiler/control-equivalence.cc",
"src/compiler/control-flow-optimizer.cc",
"src/compiler/csa-load-elimination.cc",
"src/compiler/dead-code-elimination.cc",
"src/compiler/decompression-optimizer.cc",
"src/compiler/effect-control-linearizer.cc",
"src/compiler/escape-analysis-reducer.cc",
"src/compiler/escape-analysis.cc",
"src/compiler/feedback-source.cc",
"src/compiler/frame-states.cc",
"src/compiler/frame.cc",
"src/compiler/graph-assembler.cc",
"src/compiler/graph-reducer.cc",
"src/compiler/graph-trimmer.cc",
"src/compiler/graph-visualizer.cc",
"src/compiler/graph.cc",
"src/compiler/js-call-reducer.cc",
"src/compiler/js-context-specialization.cc",
"src/compiler/js-create-lowering.cc",
"src/compiler/js-generic-lowering.cc",
"src/compiler/js-graph.cc",
"src/compiler/js-heap-broker.cc",
"src/compiler/js-heap-copy-reducer.cc",
"src/compiler/js-inlining-heuristic.cc",
"src/compiler/js-inlining.cc",
"src/compiler/js-intrinsic-lowering.cc",
"src/compiler/js-native-context-specialization.cc",
"src/compiler/js-operator.cc",
"src/compiler/js-type-hint-lowering.cc",
"src/compiler/js-typed-lowering.cc",
"src/compiler/linkage.cc",
"src/compiler/load-elimination.cc",
"src/compiler/loop-analysis.cc",
"src/compiler/loop-peeling.cc",
"src/compiler/loop-unrolling.cc",
"src/compiler/loop-variable-optimizer.cc",
"src/compiler/machine-graph-verifier.cc",
"src/compiler/machine-graph.cc",
"src/compiler/machine-operator-reducer.cc",
"src/compiler/machine-operator.cc",
"src/compiler/map-inference.cc",
"src/compiler/memory-lowering.cc",
"src/compiler/memory-optimizer.cc",
"src/compiler/node-marker.cc",
"src/compiler/node-matchers.cc",
"src/compiler/node-observer.cc",
"src/compiler/node-origin-table.cc",
"src/compiler/node-properties.cc",
"src/compiler/node.cc",
"src/compiler/opcodes.cc",
"src/compiler/operation-typer.cc",
"src/compiler/operator-properties.cc",
"src/compiler/operator.cc",
"src/compiler/osr.cc",
"src/compiler/pipeline-statistics.cc",
"src/compiler/pipeline.cc",
"src/compiler/property-access-builder.cc",
"src/compiler/raw-machine-assembler.cc",
"src/compiler/redundancy-elimination.cc",
"src/compiler/refs-map.cc",
"src/compiler/representation-change.cc",
"src/compiler/schedule.cc",
"src/compiler/scheduled-machine-lowering.cc",
"src/compiler/scheduler.cc",
"src/compiler/select-lowering.cc",
"src/compiler/serializer-for-background-compilation.cc",
"src/compiler/simplified-lowering.cc",
"src/compiler/simplified-operator-reducer.cc",
"src/compiler/simplified-operator.cc",
"src/compiler/state-values-utils.cc",
"src/compiler/store-store-elimination.cc",
"src/compiler/type-cache.cc",
"src/compiler/type-narrowing-reducer.cc",
"src/compiler/typed-optimization.cc",
"src/compiler/typer.cc",
"src/compiler/types.cc",
"src/compiler/value-numbering-reducer.cc",
"src/compiler/verifier.cc",
"src/compiler/zone-stats.cc",
]
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
if (v8_enable_webassembly) {
v8_compiler_sources += [
"src/compiler/int64-lowering.cc",
"src/compiler/wasm-compiler.cc",
]
}
2021-03-01 12:14:54 +00:00
# The src/compiler files with optimizations.
v8_source_set("v8_compiler_opt") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = v8_compiler_sources
public_deps = [
":generate_bytecode_builtins_list",
":run_torque",
":v8_maybe_icu",
":v8_tracing",
]
deps = [
":v8_base_without_compiler",
":v8_internal_headers",
":v8_libbase",
":v8_shared_internal_headers",
]
if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) {
# The :no_optimize config is added to v8_add_configs in v8.gni.
remove_configs = [ "//build/config/compiler:no_optimize" ]
configs = [ ":always_optimize" ]
} else {
# Without this else branch, gn fails to generate build files for non-debug
# builds (because we try to remove a config that is not present).
# So we include it, even if this config is not used outside of debug builds.
configs = [ ":internal_config" ]
}
}
# The src/compiler files with default optimization behavior.
v8_source_set("v8_compiler") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = v8_compiler_sources
public_deps = [
":generate_bytecode_builtins_list",
":run_torque",
":v8_internal_headers",
":v8_maybe_icu",
":v8_tracing",
]
deps = [
":v8_base_without_compiler",
":v8_libbase",
":v8_shared_internal_headers",
]
configs = [ ":internal_config" ]
}
group("v8_compiler_for_mksnapshot") {
if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) {
deps = [ ":v8_compiler_opt" ]
} else {
deps = [ ":v8_compiler" ]
}
}
# Any target using trace events must directly or indirectly depend on
# v8_tracing.
group("v8_tracing") {
if (v8_use_perfetto) {
if (build_with_chromium) {
public_deps = [ "//third_party/perfetto:libperfetto" ]
} else {
public_deps = [ ":v8_libperfetto" ]
}
}
}
v8_source_set("v8_base_without_compiler") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
# Split static libraries on windows into two.
split_count = 2
sources = [
### gcmole(all) ###
"src/api/api-arguments.cc",
"src/api/api-natives.cc",
"src/api/api.cc",
"src/ast/ast-function-literal-id-reindexer.cc",
"src/ast/ast-value-factory.cc",
"src/ast/ast.cc",
"src/ast/modules.cc",
"src/ast/prettyprinter.cc",
"src/ast/scopes.cc",
"src/ast/source-range-ast-visitor.cc",
"src/ast/variables.cc",
"src/baseline/baseline-compiler.cc",
"src/baseline/baseline.cc",
2021-03-09 11:18:52 +00:00
"src/baseline/bytecode-offset-iterator.cc",
2021-03-01 12:14:54 +00:00
"src/builtins/accessors.cc",
"src/builtins/builtins-api.cc",
"src/builtins/builtins-array.cc",
"src/builtins/builtins-arraybuffer.cc",
"src/builtins/builtins-async-module.cc",
"src/builtins/builtins-bigint.cc",
"src/builtins/builtins-callsite.cc",
"src/builtins/builtins-collections.cc",
"src/builtins/builtins-console.cc",
"src/builtins/builtins-dataview.cc",
"src/builtins/builtins-date.cc",
"src/builtins/builtins-error.cc",
"src/builtins/builtins-function.cc",
"src/builtins/builtins-global.cc",
"src/builtins/builtins-internal.cc",
"src/builtins/builtins-intl.cc",
"src/builtins/builtins-json.cc",
"src/builtins/builtins-number.cc",
"src/builtins/builtins-object.cc",
"src/builtins/builtins-reflect.cc",
"src/builtins/builtins-regexp.cc",
"src/builtins/builtins-sharedarraybuffer.cc",
"src/builtins/builtins-string.cc",
"src/builtins/builtins-symbol.cc",
"src/builtins/builtins-trace.cc",
"src/builtins/builtins-typed-array.cc",
"src/builtins/builtins-weak-refs.cc",
"src/builtins/builtins.cc",
"src/builtins/constants-table-builder.cc",
2021-03-03 23:20:31 +00:00
"src/codegen/aligned-slot-allocator.cc",
2021-03-01 12:14:54 +00:00
"src/codegen/assembler.cc",
"src/codegen/bailout-reason.cc",
"src/codegen/code-comments.cc",
"src/codegen/code-desc.cc",
"src/codegen/code-factory.cc",
"src/codegen/code-reference.cc",
"src/codegen/compilation-cache.cc",
"src/codegen/compiler.cc",
"src/codegen/constant-pool.cc",
"src/codegen/external-reference-encoder.cc",
"src/codegen/external-reference-table.cc",
"src/codegen/external-reference.cc",
"src/codegen/flush-instruction-cache.cc",
"src/codegen/handler-table.cc",
"src/codegen/interface-descriptors.cc",
"src/codegen/machine-type.cc",
"src/codegen/optimized-compilation-info.cc",
"src/codegen/pending-optimization-table.cc",
"src/codegen/register-configuration.cc",
"src/codegen/reloc-info.cc",
"src/codegen/safepoint-table.cc",
"src/codegen/source-position-table.cc",
"src/codegen/source-position.cc",
"src/codegen/string-constants.cc",
"src/codegen/tick-counter.cc",
"src/codegen/tnode.cc",
"src/codegen/turbo-assembler.cc",
"src/codegen/unoptimized-compilation-info.cc",
"src/common/assert-scope.cc",
"src/compiler-dispatcher/compiler-dispatcher.cc",
"src/compiler-dispatcher/optimizing-compile-dispatcher.cc",
"src/date/date.cc",
"src/date/dateparser.cc",
"src/debug/debug-coverage.cc",
"src/debug/debug-evaluate.cc",
"src/debug/debug-frames.cc",
"src/debug/debug-interface.cc",
"src/debug/debug-property-iterator.cc",
"src/debug/debug-scope-iterator.cc",
"src/debug/debug-scopes.cc",
"src/debug/debug-stack-trace-iterator.cc",
"src/debug/debug-type-profile.cc",
"src/debug/debug.cc",
"src/debug/liveedit.cc",
"src/deoptimizer/deoptimize-reason.cc",
"src/deoptimizer/deoptimized-frame-info.cc",
"src/deoptimizer/deoptimizer.cc",
"src/deoptimizer/materialized-object-store.cc",
"src/deoptimizer/translated-state.cc",
"src/deoptimizer/translation-array.cc",
"src/diagnostics/basic-block-profiler.cc",
"src/diagnostics/compilation-statistics.cc",
"src/diagnostics/disassembler.cc",
"src/diagnostics/eh-frame.cc",
"src/diagnostics/gdb-jit.cc",
"src/diagnostics/objects-debug.cc",
"src/diagnostics/objects-printer.cc",
"src/diagnostics/perf-jit.cc",
"src/diagnostics/unwinder.cc",
"src/execution/arguments.cc",
"src/execution/execution.cc",
"src/execution/external-pointer-table.cc",
"src/execution/frames.cc",
"src/execution/futex-emulation.cc",
"src/execution/interrupts-scope.cc",
"src/execution/isolate.cc",
"src/execution/local-isolate.cc",
"src/execution/messages.cc",
"src/execution/microtask-queue.cc",
"src/execution/protectors.cc",
"src/execution/runtime-profiler.cc",
"src/execution/simulator-base.cc",
"src/execution/stack-guard.cc",
"src/execution/thread-id.cc",
"src/execution/thread-local-top.cc",
"src/execution/v8threads.cc",
"src/extensions/cputracemark-extension.cc",
"src/extensions/externalize-string-extension.cc",
"src/extensions/gc-extension.cc",
"src/extensions/ignition-statistics-extension.cc",
"src/extensions/statistics-extension.cc",
"src/extensions/trigger-failure-extension.cc",
"src/flags/flags.cc",
"src/handles/global-handles.cc",
"src/handles/handles.cc",
"src/handles/local-handles.cc",
"src/handles/persistent-handles.cc",
"src/heap/allocation-observer.cc",
"src/heap/array-buffer-sweeper.cc",
"src/heap/base-space.cc",
"src/heap/basic-memory-chunk.cc",
"src/heap/code-object-registry.cc",
"src/heap/code-stats.cc",
"src/heap/collection-barrier.cc",
"src/heap/combined-heap.cc",
"src/heap/concurrent-allocator.cc",
"src/heap/concurrent-marking.cc",
"src/heap/cppgc-js/cpp-heap.cc",
"src/heap/cppgc-js/cpp-snapshot.cc",
"src/heap/cppgc-js/unified-heap-marking-verifier.cc",
"src/heap/cppgc-js/unified-heap-marking-visitor.cc",
"src/heap/embedder-tracing.cc",
"src/heap/factory-base.cc",
"src/heap/factory.cc",
"src/heap/finalization-registry-cleanup-task.cc",
"src/heap/free-list.cc",
"src/heap/gc-idle-time-handler.cc",
"src/heap/gc-tracer.cc",
"src/heap/heap-controller.cc",
"src/heap/heap-write-barrier.cc",
"src/heap/heap.cc",
"src/heap/incremental-marking-job.cc",
"src/heap/incremental-marking.cc",
"src/heap/index-generator.cc",
"src/heap/invalidated-slots.cc",
"src/heap/large-spaces.cc",
"src/heap/local-factory.cc",
"src/heap/local-heap.cc",
"src/heap/mark-compact.cc",
"src/heap/marking-barrier.cc",
"src/heap/marking-worklist.cc",
"src/heap/marking.cc",
"src/heap/memory-allocator.cc",
"src/heap/memory-chunk-layout.cc",
"src/heap/memory-chunk.cc",
"src/heap/memory-measurement.cc",
"src/heap/memory-reducer.cc",
"src/heap/new-spaces.cc",
"src/heap/object-stats.cc",
"src/heap/objects-visiting.cc",
"src/heap/paged-spaces.cc",
"src/heap/read-only-heap.cc",
"src/heap/read-only-spaces.cc",
"src/heap/safepoint.cc",
"src/heap/scavenge-job.cc",
"src/heap/scavenger.cc",
"src/heap/slot-set.cc",
"src/heap/spaces.cc",
"src/heap/stress-marking-observer.cc",
"src/heap/stress-scavenge-observer.cc",
"src/heap/sweeper.cc",
"src/heap/weak-object-worklists.cc",
"src/ic/call-optimization.cc",
"src/ic/handler-configuration.cc",
"src/ic/ic-stats.cc",
"src/ic/ic.cc",
"src/ic/stub-cache.cc",
"src/init/bootstrapper.cc",
"src/init/icu_util.cc",
"src/init/isolate-allocator.cc",
"src/init/startup-data-util.cc",
"src/init/v8.cc",
"src/interpreter/bytecode-array-builder.cc",
"src/interpreter/bytecode-array-iterator.cc",
"src/interpreter/bytecode-array-random-iterator.cc",
"src/interpreter/bytecode-array-writer.cc",
"src/interpreter/bytecode-decoder.cc",
"src/interpreter/bytecode-flags.cc",
"src/interpreter/bytecode-generator.cc",
"src/interpreter/bytecode-label.cc",
"src/interpreter/bytecode-node.cc",
"src/interpreter/bytecode-operands.cc",
"src/interpreter/bytecode-register-optimizer.cc",
"src/interpreter/bytecode-register.cc",
"src/interpreter/bytecode-source-info.cc",
"src/interpreter/bytecodes.cc",
"src/interpreter/constant-array-builder.cc",
"src/interpreter/control-flow-builders.cc",
"src/interpreter/handler-table-builder.cc",
"src/interpreter/interpreter-intrinsics.cc",
"src/interpreter/interpreter.cc",
"src/json/json-parser.cc",
"src/json/json-stringifier.cc",
2021-03-01 18:39:30 +00:00
"src/libsampler/sampler.cc",
2021-03-01 12:14:54 +00:00
"src/logging/counters.cc",
"src/logging/local-logger.cc",
"src/logging/log-utils.cc",
"src/logging/log.cc",
"src/logging/metrics.cc",
2021-04-12 14:38:06 +00:00
"src/logging/runtime-call-stats.cc",
2021-03-01 12:14:54 +00:00
"src/logging/tracing-flags.cc",
"src/numbers/bignum-dtoa.cc",
"src/numbers/bignum.cc",
"src/numbers/cached-powers.cc",
"src/numbers/conversions.cc",
"src/numbers/diy-fp.cc",
"src/numbers/dtoa.cc",
"src/numbers/fast-dtoa.cc",
"src/numbers/fixed-dtoa.cc",
"src/numbers/math-random.cc",
"src/numbers/strtod.cc",
"src/objects/backing-store.cc",
"src/objects/bigint.cc",
"src/objects/code-kind.cc",
"src/objects/code.cc",
"src/objects/compilation-cache-table.cc",
"src/objects/contexts.cc",
"src/objects/debug-objects.cc",
"src/objects/elements-kind.cc",
"src/objects/elements.cc",
"src/objects/embedder-data-array.cc",
"src/objects/feedback-vector.cc",
"src/objects/field-type.cc",
"src/objects/intl-objects.cc",
"src/objects/js-array-buffer.cc",
"src/objects/js-break-iterator.cc",
"src/objects/js-collator.cc",
"src/objects/js-date-time-format.cc",
"src/objects/js-display-names.cc",
"src/objects/js-function.cc",
"src/objects/js-list-format.cc",
"src/objects/js-locale.cc",
"src/objects/js-number-format.cc",
"src/objects/js-objects.cc",
"src/objects/js-plural-rules.cc",
"src/objects/js-regexp.cc",
"src/objects/js-relative-time-format.cc",
"src/objects/js-segment-iterator.cc",
"src/objects/js-segmenter.cc",
"src/objects/js-segments.cc",
"src/objects/keys.cc",
"src/objects/literal-objects.cc",
"src/objects/lookup-cache.cc",
"src/objects/lookup.cc",
"src/objects/managed.cc",
"src/objects/map-updater.cc",
"src/objects/map.cc",
"src/objects/module.cc",
"src/objects/objects.cc",
"src/objects/ordered-hash-table.cc",
"src/objects/osr-optimized-code-cache.cc",
"src/objects/property-descriptor.cc",
"src/objects/property.cc",
"src/objects/scope-info.cc",
"src/objects/shared-function-info.cc",
"src/objects/source-text-module.cc",
"src/objects/stack-frame-info.cc",
"src/objects/string-comparator.cc",
"src/objects/string-table.cc",
"src/objects/string.cc",
"src/objects/swiss-name-dictionary.cc",
"src/objects/synthetic-module.cc",
"src/objects/tagged-impl.cc",
"src/objects/template-objects.cc",
"src/objects/transitions.cc",
"src/objects/type-hints.cc",
"src/objects/value-serializer.cc",
"src/objects/visitors.cc",
"src/parsing/func-name-inferrer.cc",
"src/parsing/import-assertions.cc",
"src/parsing/literal-buffer.cc",
"src/parsing/parse-info.cc",
"src/parsing/parser.cc",
"src/parsing/parsing.cc",
"src/parsing/pending-compilation-error-handler.cc",
"src/parsing/preparse-data.cc",
"src/parsing/preparser.cc",
"src/parsing/rewriter.cc",
"src/parsing/scanner-character-streams.cc",
"src/parsing/scanner.cc",
"src/parsing/token.cc",
"src/profiler/allocation-tracker.cc",
"src/profiler/cpu-profiler.cc",
2015-09-28 19:34:08 +00:00
"src/profiler/heap-profiler.cc",
"src/profiler/heap-snapshot-generator.cc",
"src/profiler/profile-generator.cc",
2016-06-22 16:43:46 +00:00
"src/profiler/profiler-listener.cc",
2020-08-31 14:09:16 +00:00
"src/profiler/profiler-stats.cc",
2016-01-22 16:36:40 +00:00
"src/profiler/sampling-heap-profiler.cc",
2015-10-01 18:10:58 +00:00
"src/profiler/strings-storage.cc",
2020-10-01 07:07:48 +00:00
"src/profiler/symbolizer.cc",
2016-05-17 06:11:27 +00:00
"src/profiler/tick-sample.cc",
2016-09-29 09:24:46 +00:00
"src/profiler/tracing-cpu-profiler.cc",
2021-03-19 19:18:18 +00:00
"src/profiler/weak-code-registry.cc",
2020-08-31 19:49:18 +00:00
"src/regexp/experimental/experimental-bytecode.cc",
"src/regexp/experimental/experimental-compiler.cc",
"src/regexp/experimental/experimental-interpreter.cc",
2020-08-17 13:55:39 +00:00
"src/regexp/experimental/experimental.cc",
2018-09-19 07:57:52 +00:00
"src/regexp/property-sequences.cc",
2016-01-08 09:55:29 +00:00
"src/regexp/regexp-ast.cc",
2019-07-09 11:56:47 +00:00
"src/regexp/regexp-bytecode-generator.cc",
2019-10-01 11:55:16 +00:00
"src/regexp/regexp-bytecode-peephole.cc",
"src/regexp/regexp-bytecodes.cc",
2019-06-13 16:00:50 +00:00
"src/regexp/regexp-compiler-tonode.cc",
2019-06-17 07:22:43 +00:00
"src/regexp/regexp-compiler.cc",
"src/regexp/regexp-dotprinter.cc",
Reland "[regexp] Rewrite error handling"
This is a reland of e80ca24c80432f747c386da61459282d44ba7aaa
Original change's description:
> [regexp] Rewrite error handling
>
> This patch modifies irregexp's error handling. Instead of representing
> errors as C strings, they are represented as an enumeration value
> (RegExpError), and only converted to strings when throwing the error
> object in regexp.cc. This makes it significantly easier to integrate
> into SpiderMonkey. A few notes:
>
> 1. Depending on whether the stack overflows during parsing or
> analysis, the stack overflow message can vary ("Stack overflow" or
> "Maximum call stack size exceeded"). I kept that behaviour in this
> patch, under the assumption that stack overflow messages are
> (sadly) the sorts of things that real world code ends up depending
> on.
>
> 2. Depending on the point in code where the error was identified,
> invalid unicode escapes could be reported as "Invalid Unicode
> escape", "Invalid unicode escape", or "Invalid Unicode escape
> sequence". I fervently hope that nobody depends on the specific
> wording of a syntax error, so I standardized on the first one. (It
> was both the most common, and the most consistent with other
> "Invalid X escape" messages.)
>
> 3. In addition to changing the representation, this patch also adds an
> error_pos field to RegExpParser and RegExpCompileData, which stores
> the position at which an error occurred. This is used by
> SpiderMonkey to provide more helpful messages about where a syntax
> error occurred in large regular expressions.
>
> 4. This model is closer to V8's existing MessageTemplate
> infrastructure. I considered trying to integrate it more closely
> with MessageTemplate, but since one of our stated goals for this
> project was to make it easier to use irregexp outside of V8, I
> decided to hold off.
>
> R=jgruber@chromium.org
>
> Bug: v8:10303
> Change-Id: I62605fd2def2fc539f38a7e0eefa04d36e14bbde
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091863
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66784}
R=jgruber@chromium.org
Bug: v8:10303
Change-Id: Iad1f11a0e0b9e525d7499aacb56c27eff9e7c7b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2109952
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66798}
2020-03-19 14:02:33 +00:00
"src/regexp/regexp-error.cc",
2019-06-12 08:44:08 +00:00
"src/regexp/regexp-interpreter.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/regexp-macro-assembler-tracer.cc",
"src/regexp/regexp-macro-assembler.cc",
2016-01-08 09:55:29 +00:00
"src/regexp/regexp-parser.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/regexp-stack.cc",
2016-10-12 15:15:30 +00:00
"src/regexp/regexp-utils.cc",
2019-06-17 15:16:39 +00:00
"src/regexp/regexp.cc",
2019-05-24 13:51:59 +00:00
"src/roots/roots.cc",
2014-10-10 14:59:53 +00:00
"src/runtime/runtime-array.cc",
2015-06-03 17:58:29 +00:00
"src/runtime/runtime-atomics.cc",
2017-09-11 13:16:27 +00:00
"src/runtime/runtime-bigint.cc",
2014-10-01 12:11:12 +00:00
"src/runtime/runtime-classes.cc",
2014-09-29 09:32:38 +00:00
"src/runtime/runtime-collections.cc",
"src/runtime/runtime-compiler.cc",
2014-09-30 08:23:02 +00:00
"src/runtime/runtime-date.cc",
"src/runtime/runtime-debug.cc",
2015-06-01 07:20:50 +00:00
"src/runtime/runtime-forin.cc",
2014-09-30 10:46:04 +00:00
"src/runtime/runtime-function.cc",
2015-07-17 17:11:32 +00:00
"src/runtime/runtime-futex.cc",
2014-09-30 08:23:02 +00:00
"src/runtime/runtime-generator.cc",
2014-10-10 14:59:53 +00:00
"src/runtime/runtime-internal.cc",
2017-04-21 08:35:12 +00:00
"src/runtime/runtime-intl.cc",
2014-09-30 10:46:04 +00:00
"src/runtime/runtime-literals.cc",
2016-10-11 17:32:22 +00:00
"src/runtime/runtime-module.cc",
2014-09-29 09:32:38 +00:00
"src/runtime/runtime-numbers.cc",
2014-10-10 14:59:53 +00:00
"src/runtime/runtime-object.cc",
2015-09-10 13:04:15 +00:00
"src/runtime/runtime-operators.cc",
2016-10-27 12:28:03 +00:00
"src/runtime/runtime-promise.cc",
2014-09-30 10:46:04 +00:00
"src/runtime/runtime-proxy.cc",
2014-09-29 07:08:15 +00:00
"src/runtime/runtime-regexp.cc",
2014-09-30 10:46:04 +00:00
"src/runtime/runtime-scopes.cc",
2014-09-29 07:08:15 +00:00
"src/runtime/runtime-strings.cc",
2014-09-30 10:46:04 +00:00
"src/runtime/runtime-symbol.cc",
2014-09-29 09:32:38 +00:00
"src/runtime/runtime-test.cc",
2021-02-16 08:33:34 +00:00
"src/runtime/runtime-trace.cc",
2014-09-29 09:32:38 +00:00
"src/runtime/runtime-typedarray.cc",
2020-04-16 02:44:07 +00:00
"src/runtime/runtime-weak-refs.cc",
2014-09-25 07:16:15 +00:00
"src/runtime/runtime.cc",
2019-05-22 10:03:16 +00:00
"src/sanitizer/lsan-page-allocator.cc",
2016-03-01 14:42:57 +00:00
"src/snapshot/code-serializer.cc",
2020-04-22 10:40:59 +00:00
"src/snapshot/context-deserializer.cc",
"src/snapshot/context-serializer.cc",
2016-03-01 14:42:57 +00:00
"src/snapshot/deserializer.cc",
2019-05-27 09:37:45 +00:00
"src/snapshot/embedded/embedded-data.cc",
2017-08-02 14:00:37 +00:00
"src/snapshot/object-deserializer.cc",
2018-10-16 08:57:54 +00:00
"src/snapshot/read-only-deserializer.cc",
"src/snapshot/read-only-serializer.cc",
"src/snapshot/roots-serializer.cc",
2020-04-21 14:03:50 +00:00
"src/snapshot/serializer-deserializer.cc",
2016-03-31 07:30:16 +00:00
"src/snapshot/serializer.cc",
2020-02-07 20:22:04 +00:00
"src/snapshot/snapshot-compression.cc",
2020-04-15 07:22:02 +00:00
"src/snapshot/snapshot-data.cc",
2015-03-27 15:28:55 +00:00
"src/snapshot/snapshot-source-sink.cc",
2020-04-21 14:03:50 +00:00
"src/snapshot/snapshot-utils.cc",
2020-04-21 12:27:34 +00:00
"src/snapshot/snapshot.cc",
2017-08-02 14:00:37 +00:00
"src/snapshot/startup-deserializer.cc",
2016-03-01 14:42:57 +00:00
"src/snapshot/startup-serializer.cc",
2019-05-21 06:38:38 +00:00
"src/strings/char-predicates.cc",
"src/strings/string-builder.cc",
"src/strings/string-case.cc",
"src/strings/string-stream.cc",
"src/strings/unicode-decoder.cc",
"src/strings/unicode.cc",
"src/strings/uri.cc",
2019-05-24 13:51:59 +00:00
"src/tasks/cancelable-task.cc",
2020-12-02 16:29:08 +00:00
"src/tasks/operations-barrier.cc",
2019-05-24 13:51:59 +00:00
"src/tasks/task-utils.cc",
2019-01-09 14:38:22 +00:00
"src/third_party/siphash/halfsiphash.cc",
2015-12-17 18:48:07 +00:00
"src/tracing/trace-event.cc",
2016-10-06 15:27:03 +00:00
"src/tracing/traced-value.cc",
2016-10-28 20:43:17 +00:00
"src/tracing/tracing-category-observer.cc",
2018-05-04 21:44:07 +00:00
"src/trap-handler/handler-inside.cc",
2017-03-13 22:12:23 +00:00
"src/trap-handler/handler-outside.cc",
"src/trap-handler/handler-shared.cc",
2019-05-23 13:27:57 +00:00
"src/utils/address-map.cc",
"src/utils/allocation.cc",
"src/utils/bit-vector.cc",
"src/utils/detachable-vector.cc",
"src/utils/identity-map.cc",
"src/utils/memcopy.cc",
"src/utils/ostreams.cc",
"src/utils/utils.cc",
"src/utils/version.cc",
2021-03-15 09:53:02 +00:00
"src/web-snapshot/web-snapshot.cc",
"src/web-snapshot/web-snapshot.h",
2016-09-20 16:07:25 +00:00
"src/zone/accounting-allocator.cc",
2020-07-21 16:54:22 +00:00
"src/zone/type-stats.cc",
2016-10-04 08:47:17 +00:00
"src/zone/zone-segment.cc",
2016-09-20 16:07:25 +00:00
"src/zone/zone.cc",
2014-05-05 11:06:26 +00:00
]
2021-02-22 13:28:17 +00:00
if (v8_enable_webassembly) {
sources += [
"src/asmjs/asm-js.cc",
"src/asmjs/asm-parser.cc",
"src/asmjs/asm-scanner.cc",
"src/asmjs/asm-types.cc",
2021-03-01 16:41:31 +00:00
"src/debug/debug-wasm-objects.cc",
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
"src/runtime/runtime-test-wasm.cc",
"src/runtime/runtime-wasm.cc",
"src/wasm/baseline/liftoff-assembler.cc",
"src/wasm/baseline/liftoff-compiler.cc",
"src/wasm/function-body-decoder.cc",
"src/wasm/function-compiler.cc",
"src/wasm/graph-builder-interface.cc",
"src/wasm/jump-table-assembler.cc",
"src/wasm/local-decl-encoder.cc",
"src/wasm/memory-tracing.cc",
"src/wasm/module-compiler.cc",
"src/wasm/module-decoder.cc",
"src/wasm/module-instantiate.cc",
"src/wasm/signature-map.cc",
"src/wasm/simd-shuffle.cc",
"src/wasm/streaming-decoder.cc",
"src/wasm/sync-streaming-decoder.cc",
"src/wasm/value-type.cc",
"src/wasm/wasm-code-manager.cc",
"src/wasm/wasm-debug.cc",
"src/wasm/wasm-engine.cc",
"src/wasm/wasm-external-refs.cc",
"src/wasm/wasm-features.cc",
"src/wasm/wasm-import-wrapper-cache.cc",
2021-03-05 11:40:31 +00:00
"src/wasm/wasm-js.cc",
Reland "[no-wasm] Exclude src/wasm from compilation"
This is a reland of 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d. A condition
in pipeline.cc was inverted, which lead to a CSA verifier error.
Original change's description:
> [no-wasm] Exclude src/wasm from compilation
>
> This is the biggest chunk, including
> - all of src/wasm,
> - torque file for wasm objects,
> - torque file for wasm builtins,
> - wasm builtins,
> - wasm runtime functions,
> - int64 lowering,
> - simd scala lowering,
> - WasmGraphBuilder (TF graph construction for wasm),
> - wasm frame types,
> - wasm interrupts,
> - the JSWasmCall opcode,
> - wasm backing store allocation.
>
> Those components are all recursively entangled, so I found no way to
> split this change up further.
>
> Some includes that were recursively included by wasm headers needed to
> be added explicitly now.
>
> backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
> because it only tests wasm backing stores. This file is excluded from
> no-wasm builds then.
>
> R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
>
> Bug: v8:11238
> Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73344}
TBR=jgruber@chromium.org
Bug: v8:11238
Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73348}
2021-03-11 13:42:01 +00:00
"src/wasm/wasm-module-builder.cc",
"src/wasm/wasm-module-sourcemap.cc",
"src/wasm/wasm-module.cc",
"src/wasm/wasm-objects.cc",
"src/wasm/wasm-opcodes.cc",
"src/wasm/wasm-result.cc",
"src/wasm/wasm-serialization.cc",
"src/wasm/wasm-subtyping.cc",
2021-02-22 13:28:17 +00:00
]
}
2019-11-22 10:31:02 +00:00
if (v8_enable_third_party_heap) {
sources += v8_third_party_heap_files
2020-04-21 17:53:43 +00:00
} else {
sources += [ "src/heap/third-party/heap-api-stub.cc" ]
2019-11-22 10:31:02 +00:00
}
2020-08-28 20:48:41 +00:00
if (v8_enable_conservative_stack_scanning) {
2021-03-01 12:14:54 +00:00
sources += [ "src/heap/conservative-stack-visitor.cc" ]
2020-08-28 20:48:41 +00:00
}
2020-02-17 05:01:29 +00:00
if (v8_enable_wasm_gdb_remote_debugging) {
sources += [
2020-04-17 08:05:00 +00:00
"src/debug/wasm/gdb-server/gdb-remote-util.cc",
2020-02-17 05:01:29 +00:00
"src/debug/wasm/gdb-server/gdb-server-thread.cc",
"src/debug/wasm/gdb-server/gdb-server.cc",
2020-04-17 08:05:00 +00:00
"src/debug/wasm/gdb-server/packet.cc",
2020-02-17 05:01:29 +00:00
"src/debug/wasm/gdb-server/session.cc",
"src/debug/wasm/gdb-server/target.cc",
"src/debug/wasm/gdb-server/transport.cc",
2020-04-24 22:41:16 +00:00
"src/debug/wasm/gdb-server/wasm-module-debug.cc",
2020-02-17 05:01:29 +00:00
]
}
2018-07-20 13:13:31 +00:00
if (v8_check_header_includes) {
# This file will be generated by tools/generate-header-include-checks.py
# if the "check_v8_header_includes" gclient variable is set.
import("check-header-includes/sources.gni")
sources += check_header_includes_sources
}
2016-07-15 22:32:55 +00:00
if (v8_current_cpu == "x86") {
2016-09-21 11:44:10 +00:00
sources += [ ### gcmole(arch:ia32) ###
2019-05-28 13:17:52 +00:00
"src/codegen/ia32/assembler-ia32.cc",
"src/codegen/ia32/cpu-ia32.cc",
Reland "[codegen] Add static interface descriptors"
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
Bug: v8:11420
Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74010}
2021-04-16 14:52:06 +00:00
"src/codegen/ia32/interface-descriptors-ia32-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/ia32/macro-assembler-ia32.cc",
2021-03-25 16:29:25 +00:00
"src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/ia32/code-generator-ia32.cc",
"src/compiler/backend/ia32/instruction-scheduler-ia32.cc",
"src/compiler/backend/ia32/instruction-selector-ia32.cc",
2015-10-20 13:25:47 +00:00
"src/debug/ia32/debug-ia32.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/ia32/deoptimizer-ia32.cc",
"src/diagnostics/ia32/disasm-ia32.cc",
2020-10-20 09:40:34 +00:00
"src/diagnostics/ia32/unwinder-ia32.cc",
2019-05-28 13:17:52 +00:00
"src/execution/ia32/frame-constants-ia32.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/ia32/regexp-macro-assembler-ia32.cc",
2014-05-05 11:06:26 +00:00
]
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) ###
2021-03-25 16:29:25 +00:00
"src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc",
2019-05-28 13:17:52 +00:00
"src/codegen/x64/assembler-x64.cc",
"src/codegen/x64/cpu-x64.cc",
Reland "[codegen] Add static interface descriptors"
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
Bug: v8:11420
Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74010}
2021-04-16 14:52:06 +00:00
"src/codegen/x64/interface-descriptors-x64-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/x64/macro-assembler-x64.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/x64/code-generator-x64.cc",
"src/compiler/backend/x64/instruction-scheduler-x64.cc",
"src/compiler/backend/x64/instruction-selector-x64.cc",
"src/compiler/backend/x64/unwinding-info-writer-x64.cc",
2015-10-20 13:25:47 +00:00
"src/debug/x64/debug-x64.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/x64/deoptimizer-x64.cc",
"src/diagnostics/x64/disasm-x64.cc",
"src/diagnostics/x64/eh-frame-x64.cc",
2020-10-20 09:40:34 +00:00
"src/diagnostics/x64/unwinder-x64.cc",
2019-05-28 13:17:52 +00:00
"src/execution/x64/frame-constants-x64.cc",
2015-10-20 13:25:47 +00:00
"src/regexp/x64/regexp-macro-assembler-x64.cc",
2014-05-05 11:06:26 +00:00
]
2019-04-17 23:13:47 +00:00
2019-04-17 10:13:56 +00:00
# iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
# based on Darwin and thus POSIX-compliant to a similar degree.
2020-09-11 08:11:42 +00:00
if (is_linux || is_chromeos || is_mac || is_ios || target_os == "freebsd") {
2018-05-04 21:44:07 +00:00
sources += [
2018-10-26 11:04:26 +00:00
"src/trap-handler/handler-inside-posix.cc",
"src/trap-handler/handler-outside-posix.cc",
2018-05-04 21:44:07 +00:00
]
}
if (is_win) {
2018-10-30 09:35:14 +00:00
sources += [
2019-05-20 09:15:06 +00:00
"src/diagnostics/unwinding-info-win64.cc",
2018-10-30 09:35:14 +00:00
"src/trap-handler/handler-inside-win.cc",
"src/trap-handler/handler-outside-win.cc",
]
2017-03-13 22:12:23 +00:00
}
2016-07-15 22:32:55 +00:00
} else if (v8_current_cpu == "arm") {
2016-09-21 11:44:10 +00:00
sources += [ ### gcmole(arch:arm) ###
2019-05-28 13:17:52 +00:00
"src/codegen/arm/assembler-arm.cc",
"src/codegen/arm/constants-arm.cc",
"src/codegen/arm/cpu-arm.cc",
Reland "[codegen] Add static interface descriptors"
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
Bug: v8:11420
Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74010}
2021-04-16 14:52:06 +00:00
"src/codegen/arm/interface-descriptors-arm-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/arm/macro-assembler-arm.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/arm/code-generator-arm.cc",
"src/compiler/backend/arm/instruction-scheduler-arm.cc",
"src/compiler/backend/arm/instruction-selector-arm.cc",
"src/compiler/backend/arm/unwinding-info-writer-arm.cc",
2015-07-31 11:07:50 +00:00
"src/debug/arm/debug-arm.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/arm/deoptimizer-arm.cc",
"src/diagnostics/arm/disasm-arm.cc",
"src/diagnostics/arm/eh-frame-arm.cc",
2020-10-20 09:40:34 +00:00
"src/diagnostics/arm/unwinder-arm.cc",
2019-05-28 13:17:52 +00:00
"src/execution/arm/frame-constants-arm.cc",
"src/execution/arm/simulator-arm.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/arm/regexp-macro-assembler-arm.cc",
2014-05-05 11:06:26 +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) ###
2019-05-28 13:17:52 +00:00
"src/codegen/arm64/assembler-arm64.cc",
"src/codegen/arm64/cpu-arm64.cc",
"src/codegen/arm64/decoder-arm64.cc",
"src/codegen/arm64/instructions-arm64-constants.cc",
"src/codegen/arm64/instructions-arm64.cc",
Reland "[codegen] Add static interface descriptors"
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
Bug: v8:11420
Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74010}
2021-04-16 14:52:06 +00:00
"src/codegen/arm64/interface-descriptors-arm64-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/arm64/macro-assembler-arm64.cc",
"src/codegen/arm64/register-arm64.cc",
"src/codegen/arm64/utils-arm64.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/arm64/code-generator-arm64.cc",
"src/compiler/backend/arm64/instruction-scheduler-arm64.cc",
"src/compiler/backend/arm64/instruction-selector-arm64.cc",
"src/compiler/backend/arm64/unwinding-info-writer-arm64.cc",
2015-07-31 11:07:50 +00:00
"src/debug/arm64/debug-arm64.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/arm64/deoptimizer-arm64.cc",
"src/diagnostics/arm64/disasm-arm64.cc",
"src/diagnostics/arm64/eh-frame-arm64.cc",
2020-10-20 09:40:34 +00:00
"src/diagnostics/arm64/unwinder-arm64.cc",
2019-05-28 13:17:52 +00:00
"src/execution/arm64/frame-constants-arm64.cc",
2019-07-24 16:24:11 +00:00
"src/execution/arm64/pointer-auth-arm64.cc",
2019-05-28 13:17:52 +00:00
"src/execution/arm64/simulator-arm64.cc",
"src/execution/arm64/simulator-logic-arm64.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/arm64/regexp-macro-assembler-arm64.cc",
2014-05-05 11:06:26 +00:00
]
2021-01-28 10:54:20 +00:00
if (current_cpu == "arm64" && is_mac) {
sources += [
"src/trap-handler/handler-inside-posix.cc",
"src/trap-handler/handler-outside-posix.cc",
]
}
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) {
2021-03-01 12:14:54 +00:00
sources += [ "src/diagnostics/unwinding-info-win64.cc" ]
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
}
2016-09-21 11:44:10 +00:00
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
sources += [ ### gcmole(arch:mipsel) ###
2019-05-28 13:17:52 +00:00
"src/codegen/mips/assembler-mips.cc",
"src/codegen/mips/constants-mips.cc",
"src/codegen/mips/cpu-mips.cc",
"src/codegen/mips/interface-descriptors-mips.cc",
"src/codegen/mips/macro-assembler-mips.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/mips/code-generator-mips.cc",
"src/compiler/backend/mips/instruction-scheduler-mips.cc",
"src/compiler/backend/mips/instruction-selector-mips.cc",
2015-10-20 13:25:47 +00:00
"src/debug/mips/debug-mips.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/mips/deoptimizer-mips.cc",
"src/diagnostics/mips/disasm-mips.cc",
2020-10-22 02:22:22 +00:00
"src/diagnostics/mips/unwinder-mips.cc",
2019-05-28 13:17:52 +00:00
"src/execution/mips/frame-constants-mips.cc",
"src/execution/mips/simulator-mips.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/mips/regexp-macro-assembler-mips.cc",
2014-05-05 11:06:26 +00:00
]
2016-09-21 11:44:10 +00:00
} else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
sources += [ ### gcmole(arch:mips64el) ###
2019-05-28 13:17:52 +00:00
"src/codegen/mips64/assembler-mips64.cc",
"src/codegen/mips64/constants-mips64.cc",
"src/codegen/mips64/cpu-mips64.cc",
"src/codegen/mips64/interface-descriptors-mips64.cc",
"src/codegen/mips64/macro-assembler-mips64.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/mips64/code-generator-mips64.cc",
"src/compiler/backend/mips64/instruction-scheduler-mips64.cc",
"src/compiler/backend/mips64/instruction-selector-mips64.cc",
2015-10-20 13:25:47 +00:00
"src/debug/mips64/debug-mips64.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/mips64/deoptimizer-mips64.cc",
"src/diagnostics/mips64/disasm-mips64.cc",
2020-10-22 02:22:22 +00:00
"src/diagnostics/mips64/unwinder-mips64.cc",
2019-05-28 13:17:52 +00:00
"src/execution/mips64/frame-constants-mips64.cc",
"src/execution/mips64/simulator-mips64.cc",
2015-08-13 06:55:21 +00:00
"src/regexp/mips64/regexp-macro-assembler-mips64.cc",
2014-08-25 15:15:26 +00:00
]
2020-02-21 14:37:03 +00:00
} else if (v8_current_cpu == "ppc") {
2016-09-21 11:44:10 +00:00
sources += [ ### gcmole(arch:ppc) ###
2019-05-28 13:17:52 +00:00
"src/codegen/ppc/assembler-ppc.cc",
"src/codegen/ppc/constants-ppc.cc",
"src/codegen/ppc/cpu-ppc.cc",
PPC/s390: Reland "[codegen] Add static interface descriptors"
Port 2871e05cc323c5fcaa0bf5a817d9c39a53d40239
Original Commit Message:
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Id854bb901df72787ed225fc8790c3f626121ab3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830897
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74034}
2021-04-16 18:51:32 +00:00
"src/codegen/ppc/interface-descriptors-ppc-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/ppc/macro-assembler-ppc.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/ppc/code-generator-ppc.cc",
2020-02-21 14:37:03 +00:00
"src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
"src/compiler/backend/ppc/instruction-selector-ppc.cc",
"src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
"src/debug/ppc/debug-ppc.cc",
"src/deoptimizer/ppc/deoptimizer-ppc.cc",
"src/diagnostics/ppc/disasm-ppc.cc",
"src/diagnostics/ppc/eh-frame-ppc.cc",
2020-10-20 17:51:31 +00:00
"src/diagnostics/ppc/unwinder-ppc.cc",
2020-02-21 14:37:03 +00:00
"src/execution/ppc/frame-constants-ppc.cc",
"src/execution/ppc/simulator-ppc.cc",
"src/regexp/ppc/regexp-macro-assembler-ppc.cc",
]
} else if (v8_current_cpu == "ppc64") {
sources += [ ### gcmole(arch:ppc64) ###
"src/codegen/ppc/assembler-ppc.cc",
"src/codegen/ppc/constants-ppc.cc",
"src/codegen/ppc/cpu-ppc.cc",
PPC/s390: Reland "[codegen] Add static interface descriptors"
Port 2871e05cc323c5fcaa0bf5a817d9c39a53d40239
Original Commit Message:
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Id854bb901df72787ed225fc8790c3f626121ab3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830897
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74034}
2021-04-16 18:51:32 +00:00
"src/codegen/ppc/interface-descriptors-ppc-inl.h",
2020-02-21 14:37:03 +00:00
"src/codegen/ppc/macro-assembler-ppc.cc",
"src/compiler/backend/ppc/code-generator-ppc.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
"src/compiler/backend/ppc/instruction-selector-ppc.cc",
2019-11-07 14:57:07 +00:00
"src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
2016-09-21 11:44:10 +00:00
"src/debug/ppc/debug-ppc.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/ppc/deoptimizer-ppc.cc",
"src/diagnostics/ppc/disasm-ppc.cc",
2019-11-07 14:57:07 +00:00
"src/diagnostics/ppc/eh-frame-ppc.cc",
2020-10-20 17:51:31 +00:00
"src/diagnostics/ppc/unwinder-ppc.cc",
2019-05-28 13:17:52 +00:00
"src/execution/ppc/frame-constants-ppc.cc",
"src/execution/ppc/simulator-ppc.cc",
2016-09-21 11:44:10 +00:00
"src/regexp/ppc/regexp-macro-assembler-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) ###
2019-05-28 13:17:52 +00:00
"src/codegen/s390/assembler-s390.cc",
"src/codegen/s390/constants-s390.cc",
"src/codegen/s390/cpu-s390.cc",
PPC/s390: Reland "[codegen] Add static interface descriptors"
Port 2871e05cc323c5fcaa0bf5a817d9c39a53d40239
Original Commit Message:
This is a reland of ae0752df1b84d8c53cc7b2af71013a9e678a9c6e
Reland fixes:
* Remove UNREACHABLE() from constexpr switch, since we don't have a
CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
enum anyway).
* Fix IsRegisterArray trait to use public inheritance and size_t for
std::array size.
Original change's description:
> [codegen] Add static interface descriptors
>
> Add a new CRTP StaticCallInterfaceDescriptor class, which provides
> static constexpr getters for a descriptor's registers, parameter counts,
> and so on. Each CallInterfaceDescriptor subclass is changed to extend
> StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
> extending CallInterfaceDescriptor to still provide a dynamic lookup
> where needed.
>
> StaticCallInterfaceDescriptor provides a couple of customisation points,
> where it reads its CRTP derived descriptor's static fields and
> functions, with default fallbacks where appropriate. With these
> customisation points, the definition of CallInterfaceDescriptor
> subclasses is simplified to:
>
> a) Providing parameter names (as before)
> b) Providing parameter types (as before)
> c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
> static booleans on the class.
> d) Optionally providing a `registers()` method that returns a
> std::array<Register, N> of registers that may be used for
> parameters (if not provided, this defaults to the implementation
> specific default register set).
>
> Parameter registers (and register count) are automagically set based on
> the number of parameters and number of given registers, with extra magic
> to ignore no_reg registers (to reduce ia32 special casing). The
> CallInterfaceDescriptorData is initialized based on these static
> functions, rather than manual per-descriptor initializers.
>
> This allows us to skip loading descriptors dynamically for CallBuiltin
> in Sparkplug, and instead lets us use a bit of template magic to
> statically set up arguments for the calls. Any other users of statically
> known descriptors will also benefit, thanks to C++ picking the static
> methods over the dynamic methods on the base class when available.
>
> Because we can remove various virtual functions and trigger heavier
> inlining of constantly known values, binary size slightly decreases with
> this change.
>
> Note that torque-generated descriptors are changed to use the same magic,
> rather than having Torque-specific magic, for consistency.
>
> Bug: v8:11420
> Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73996}
R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Id854bb901df72787ed225fc8790c3f626121ab3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830897
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74034}
2021-04-16 18:51:32 +00:00
"src/codegen/s390/interface-descriptors-s390-inl.h",
2019-05-28 13:17:52 +00:00
"src/codegen/s390/macro-assembler-s390.cc",
2018-11-12 14:12:52 +00:00
"src/compiler/backend/s390/code-generator-s390.cc",
"src/compiler/backend/s390/instruction-scheduler-s390.cc",
"src/compiler/backend/s390/instruction-selector-s390.cc",
2019-11-07 14:57:07 +00:00
"src/compiler/backend/s390/unwinding-info-writer-s390.cc",
2016-03-01 17:00:08 +00:00
"src/debug/s390/debug-s390.cc",
2019-05-28 13:17:52 +00:00
"src/deoptimizer/s390/deoptimizer-s390.cc",
"src/diagnostics/s390/disasm-s390.cc",
2019-11-07 14:57:07 +00:00
"src/diagnostics/s390/eh-frame-s390.cc",
2020-10-20 17:51:31 +00:00
"src/diagnostics/s390/unwinder-s390.cc",
2019-05-28 13:17:52 +00:00
"src/execution/s390/frame-constants-s390.cc",
"src/execution/s390/simulator-s390.cc",
2016-03-08 15:08:01 +00:00
"src/regexp/s390/regexp-macro-assembler-s390.cc",
2016-02-26 16:24:36 +00:00
]
2021-02-09 16:11:55 +00:00
} else if (v8_current_cpu == "riscv64") {
sources += [ ### gcmole(arch:riscv64) ###
2021-03-26 01:32:35 +00:00
"src/baseline/riscv64/baseline-assembler-riscv64-inl.h",
"src/baseline/riscv64/baseline-compiler-riscv64-inl.h",
"src/codegen/riscv64/assembler-riscv64-inl.h",
2021-02-09 16:11:55 +00:00
"src/codegen/riscv64/assembler-riscv64.cc",
"src/codegen/riscv64/constants-riscv64.cc",
"src/codegen/riscv64/cpu-riscv64.cc",
"src/codegen/riscv64/interface-descriptors-riscv64.cc",
"src/codegen/riscv64/macro-assembler-riscv64.cc",
"src/compiler/backend/riscv64/code-generator-riscv64.cc",
"src/compiler/backend/riscv64/instruction-scheduler-riscv64.cc",
"src/compiler/backend/riscv64/instruction-selector-riscv64.cc",
"src/debug/riscv64/debug-riscv64.cc",
"src/deoptimizer/riscv64/deoptimizer-riscv64.cc",
"src/diagnostics/riscv64/disasm-riscv64.cc",
"src/diagnostics/riscv64/unwinder-riscv64.cc",
"src/execution/riscv64/frame-constants-riscv64.cc",
"src/execution/riscv64/simulator-riscv64.cc",
"src/regexp/riscv64/regexp-macro-assembler-riscv64.cc",
]
2014-05-05 11:06:26 +00:00
}
2021-03-01 19:42:27 +00:00
# Architecture independent but platform-specific sources
if (is_win) {
if (v8_enable_system_instrumentation) {
sources += [
"src/diagnostics/system-jit-metadata-win.h",
"src/diagnostics/system-jit-win.cc",
"src/diagnostics/system-jit-win.h",
]
}
}
2020-06-17 07:54:15 +00:00
configs = [
":internal_config",
":cppgc_base_config",
]
2014-05-05 11:06:26 +00:00
2015-01-08 13:21:52 +00:00
deps = [
2019-04-09 12:24:52 +00:00
":torque_generated_definitions",
2021-03-19 14:16:09 +00:00
":v8_bigint",
2020-08-28 21:36:02 +00:00
":v8_cppgc_shared",
2017-05-02 08:49:38 +00:00
":v8_headers",
2015-01-08 13:21:52 +00:00
":v8_libbase",
2019-02-25 10:32:56 +00:00
":v8_shared_internal_headers",
2020-04-17 20:46:18 +00:00
":v8_tracing",
2019-02-12 08:41:25 +00:00
":v8_version",
2017-03-31 08:24:34 +00:00
"src/inspector:inspector",
2015-01-08 13:21:52 +00:00
]
2014-05-05 11:06:26 +00:00
2019-02-13 10:54:08 +00:00
public_deps = [
2021-01-08 14:55:57 +00:00
":cppgc_base",
2019-02-13 10:54:08 +00:00
":generate_bytecode_builtins_list",
":run_torque",
2021-01-18 15:45:12 +00:00
":v8_headers",
2021-03-01 12:14:54 +00:00
":v8_internal_headers",
2019-04-10 09:30:39 +00:00
":v8_maybe_icu",
2019-02-13 10:54:08 +00:00
]
2014-05-05 11:06:26 +00:00
if (v8_enable_i18n_support) {
2019-07-01 20:31:08 +00:00
deps += [ ":run_gen-regexp-special-case" ]
sources += [ "$target_gen_dir/src/regexp/special-case.cc" ]
2014-05-05 11:06:26 +00:00
if (is_win) {
deps += [ "//third_party/icu:icudata" ]
}
} else {
sources -= [
2017-04-21 08:35:12 +00:00
"src/builtins/builtins-intl.cc",
"src/objects/intl-objects.cc",
2018-09-05 02:17:38 +00:00
"src/objects/js-break-iterator.cc",
2018-08-08 09:23:07 +00:00
"src/objects/js-collator.cc",
2018-08-29 04:40:53 +00:00
"src/objects/js-date-time-format.cc",
2019-11-18 18:55:57 +00:00
"src/objects/js-display-names.cc",
2018-07-24 21:07:50 +00:00
"src/objects/js-list-format.cc",
2018-05-15 20:50:46 +00:00
"src/objects/js-locale.cc",
2018-09-04 18:32:51 +00:00
"src/objects/js-number-format.cc",
2018-08-06 09:31:26 +00:00
"src/objects/js-plural-rules.cc",
2018-07-10 12:52:05 +00:00
"src/objects/js-relative-time-format.cc",
2018-10-18 07:59:28 +00:00
"src/objects/js-segment-iterator.cc",
2018-10-05 01:57:05 +00:00
"src/objects/js-segmenter.cc",
2020-07-29 15:06:31 +00:00
"src/objects/js-segments.cc",
2017-04-21 08:35:12 +00:00
"src/runtime/runtime-intl.cc",
2019-05-21 06:38:38 +00:00
"src/strings/char-predicates.cc",
2014-05-05 11:06:26 +00:00
]
}
2020-02-07 20:22:04 +00:00
deps += [
"//third_party/zlib",
"//third_party/zlib/google:compression_utils_portable",
]
2019-11-25 15:29:12 +00:00
2014-05-26 07:29:39 +00:00
if (v8_postmortem_support) {
sources += [ "$target_gen_dir/debug-support.cc" ]
deps += [ ":postmortem-metadata" ]
}
2018-10-02 08:55:17 +00:00
2019-11-22 10:31:02 +00:00
libs = []
if (v8_enable_third_party_heap) {
libs += v8_third_party_heap_libs
}
2018-10-02 08:55:17 +00:00
# Platforms that don't have CAS support need to link atomic library
# to implement atomic memory access
if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" ||
v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
2021-02-09 16:11:55 +00:00
v8_current_cpu == "s390" || v8_current_cpu == "s390x" ||
v8_current_cpu == "riscv64") {
2019-11-22 10:31:02 +00:00
libs += [ "atomic" ]
2018-10-02 08:55:17 +00:00
}
2019-12-14 08:46:38 +00:00
2020-09-11 08:11:42 +00:00
if (v8_enable_vtunetracemark && (is_linux || is_chromeos || is_win)) {
2019-12-14 08:46:38 +00:00
sources += [
"src/extensions/vtunedomain-support-extension.cc",
"src/extensions/vtunedomain-support-extension.h",
]
deps += [ "src/third_party/vtune:v8_vtune_trace_mark" ]
}
2020-04-17 20:46:18 +00:00
if (v8_use_perfetto) {
sources += [
"src/tracing/trace-categories.cc",
"src/tracing/trace-categories.h",
]
}
2014-05-26 07:29:39 +00:00
}
2019-04-09 12:34:36 +00:00
group("v8_base") {
public_deps = [
":v8_base_without_compiler",
":v8_compiler",
]
}
2018-07-24 13:16:38 +00:00
v8_source_set("torque_base") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = [
"src/torque/ast.h",
2020-09-30 21:30:16 +00:00
"src/torque/cc-generator.cc",
"src/torque/cc-generator.h",
2018-10-04 20:45:31 +00:00
"src/torque/cfg.cc",
"src/torque/cfg.h",
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
"src/torque/class-debug-reader-generator.cc",
2019-05-07 08:38:44 +00:00
"src/torque/constants.h",
2018-07-24 13:16:38 +00:00
"src/torque/contextual.h",
2018-10-04 20:45:31 +00:00
"src/torque/csa-generator.cc",
"src/torque/csa-generator.h",
2018-07-24 13:16:38 +00:00
"src/torque/declarable.cc",
"src/torque/declarable.h",
"src/torque/declaration-visitor.cc",
"src/torque/declaration-visitor.h",
"src/torque/declarations.cc",
"src/torque/declarations.h",
"src/torque/earley-parser.cc",
"src/torque/earley-parser.h",
2019-06-11 08:50:07 +00:00
"src/torque/global-context.cc",
2018-07-24 13:16:38 +00:00
"src/torque/global-context.h",
"src/torque/implementation-visitor.cc",
"src/torque/implementation-visitor.h",
2019-10-11 21:52:06 +00:00
"src/torque/instance-type-generator.cc",
2018-10-04 20:45:31 +00:00
"src/torque/instructions.cc",
"src/torque/instructions.h",
2019-11-18 06:46:45 +00:00
"src/torque/parameter-difference.h",
2019-02-28 06:12:30 +00:00
"src/torque/server-data.cc",
"src/torque/server-data.h",
2018-07-24 13:16:38 +00:00
"src/torque/source-positions.cc",
"src/torque/source-positions.h",
2020-09-30 21:30:16 +00:00
"src/torque/torque-code-generator.cc",
"src/torque/torque-code-generator.h",
2019-02-19 14:22:14 +00:00
"src/torque/torque-compiler.cc",
"src/torque/torque-compiler.h",
2018-07-24 13:16:38 +00:00
"src/torque/torque-parser.cc",
"src/torque/torque-parser.h",
2019-07-31 12:01:55 +00:00
"src/torque/type-inference.cc",
"src/torque/type-inference.h",
2018-07-24 13:16:38 +00:00
"src/torque/type-oracle.cc",
"src/torque/type-oracle.h",
2019-05-07 08:38:44 +00:00
"src/torque/type-visitor.cc",
"src/torque/type-visitor.h",
2018-07-24 13:16:38 +00:00
"src/torque/types.cc",
"src/torque/types.h",
"src/torque/utils.cc",
"src/torque/utils.h",
]
2021-03-01 19:02:11 +00:00
deps = [
":v8_flags",
":v8_shared_internal_headers",
]
2019-04-12 04:06:41 +00:00
2021-02-25 09:55:25 +00:00
public_deps = [ ":v8_libbase" ]
2019-04-12 04:06:41 +00:00
2019-06-25 10:51:59 +00:00
# The use of exceptions for Torque in violation of the Chromium style-guide
# is justified by the fact that it is only used from the non-essential
# language server and can be removed anytime if it causes problems.
2019-04-12 04:06:41 +00:00
configs = [
":internal_config",
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
]
remove_configs = [
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
]
2019-01-23 15:17:35 +00:00
if (is_win && is_asan) {
2019-05-28 12:42:29 +00:00
# Due to a bug in ASAN on Windows (chromium:893437), we disable ASAN for
# Torque on Windows.
2019-04-12 04:06:41 +00:00
remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
2019-01-23 15:17:35 +00:00
}
2019-05-15 17:14:05 +00:00
if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) {
# The :no_optimize config is added to v8_add_configs in v8.gni.
remove_configs += [ "//build/config/compiler:no_optimize" ]
configs += [ ":always_optimize" ]
}
2018-07-24 13:16:38 +00:00
}
2019-02-26 06:56:08 +00:00
v8_source_set("torque_ls_base") {
sources = [
2019-03-01 07:50:42 +00:00
"src/torque/ls/globals.h",
2019-02-26 06:56:08 +00:00
"src/torque/ls/json-parser.cc",
"src/torque/ls/json-parser.h",
"src/torque/ls/json.cc",
"src/torque/ls/json.h",
2019-03-01 07:50:42 +00:00
"src/torque/ls/message-handler.cc",
"src/torque/ls/message-handler.h",
"src/torque/ls/message-macros.h",
"src/torque/ls/message-pipe.h",
"src/torque/ls/message.h",
2019-02-26 06:56:08 +00:00
]
2020-01-29 11:27:10 +00:00
public_deps = [ ":torque_base" ]
2019-02-26 06:56:08 +00:00
2019-06-25 10:51:59 +00:00
# The use of exceptions for Torque in violation of the Chromium style-guide
# is justified by the fact that it is only used from the non-essential
# language server and can be removed anytime if it causes problems.
2019-04-12 04:06:41 +00:00
configs = [
":internal_config",
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
]
remove_configs = [
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
]
2019-02-26 06:56:08 +00:00
if (is_win && is_asan) {
2019-04-12 04:06:41 +00:00
remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
2019-02-26 06:56:08 +00:00
}
}
2016-10-07 07:56:43 +00:00
v8_component("v8_libbase") {
2014-05-26 07:29:39 +00:00
sources = [
2018-09-17 11:32:01 +00:00
"src/base/address-region.h",
2016-05-09 16:22:09 +00:00
"src/base/atomic-utils.h",
2014-06-05 12:14:47 +00:00
"src/base/atomicops.h",
"src/base/atomicops_internals_atomicword_compat.h",
2016-10-21 10:05:32 +00:00
"src/base/atomicops_internals_portable.h",
2017-08-19 17:45:44 +00:00
"src/base/atomicops_internals_std.h",
2016-10-07 07:56:43 +00:00
"src/base/base-export.h",
2019-11-15 11:58:57 +00:00
"src/base/bit-field.h",
2020-03-13 14:46:31 +00:00
"src/base/bits-iterator.h",
2014-09-02 13:36:35 +00:00
"src/base/bits.cc",
2014-08-14 09:07:58 +00:00
"src/base/bits.h",
2018-09-15 19:13:23 +00:00
"src/base/bounded-page-allocator.cc",
"src/base/bounded-page-allocator.h",
2019-11-15 11:58:57 +00:00
"src/base/bounds.h",
2014-05-28 08:07:18 +00:00
"src/base/build_config.h",
2016-09-15 13:14:33 +00:00
"src/base/compiler-specific.h",
2014-06-30 13:25:46 +00:00
"src/base/cpu.cc",
"src/base/cpu.h",
2016-08-18 14:25:19 +00:00
"src/base/debug/stack_trace.cc",
"src/base/debug/stack_trace.h",
2014-09-05 11:48:47 +00:00
"src/base/division-by-constant.cc",
"src/base/division-by-constant.h",
2019-01-14 16:52:32 +00:00
"src/base/enum-set.h",
2017-05-03 09:58:03 +00:00
"src/base/export-template.h",
2016-06-08 12:09:25 +00:00
"src/base/file-utils.cc",
"src/base/file-utils.h",
2014-08-27 12:16:36 +00:00
"src/base/flags.h",
2016-08-18 14:25:19 +00:00
"src/base/free_deleter.h",
2014-10-06 12:27:24 +00:00
"src/base/functional.cc",
"src/base/functional.h",
2016-09-20 08:40:04 +00:00
"src/base/hashmap-entry.h",
2016-06-09 17:58:10 +00:00
"src/base/hashmap.h",
2016-06-10 05:51:58 +00:00
"src/base/ieee754.cc",
"src/base/ieee754.h",
2021-03-12 13:34:23 +00:00
"src/base/immediate-crash.h",
2014-12-16 07:31:46 +00:00
"src/base/iterator.h",
2014-06-05 12:14:47 +00:00
"src/base/lazy-instance.h",
2014-06-30 13:25:46 +00:00
"src/base/logging.cc",
"src/base/logging.h",
2019-05-29 15:22:10 +00:00
"src/base/lsan.h",
2014-05-26 07:29:39 +00:00
"src/base/macros.h",
2019-06-17 09:26:18 +00:00
"src/base/memory.h",
2014-06-05 12:14:47 +00:00
"src/base/once.cc",
"src/base/once.h",
2017-06-09 10:48:12 +00:00
"src/base/optional.h",
2019-01-10 10:38:25 +00:00
"src/base/overflowing-math.h",
2017-12-21 18:09:26 +00:00
"src/base/page-allocator.cc",
"src/base/page-allocator.h",
2014-06-30 13:25:46 +00:00
"src/base/platform/condition-variable.cc",
"src/base/platform/condition-variable.h",
2016-03-31 07:30:16 +00:00
"src/base/platform/elapsed-timer.h",
2014-06-30 13:25:46 +00:00
"src/base/platform/mutex.cc",
"src/base/platform/mutex.h",
"src/base/platform/platform.h",
"src/base/platform/semaphore.cc",
"src/base/platform/semaphore.h",
2016-03-31 07:30:16 +00:00
"src/base/platform/time.cc",
"src/base/platform/time.h",
2021-02-25 09:55:25 +00:00
"src/base/platform/wrappers.h",
2018-08-30 13:38:28 +00:00
"src/base/region-allocator.cc",
"src/base/region-allocator.h",
2016-10-14 08:12:16 +00:00
"src/base/ring-buffer.h",
2014-06-18 11:01:54 +00:00
"src/base/safe_conversions.h",
2020-10-12 16:13:18 +00:00
"src/base/safe_conversions_arm_impl.h",
2014-06-18 11:01:54 +00:00
"src/base/safe_conversions_impl.h",
2018-12-18 13:47:18 +00:00
"src/base/small-vector.h",
2014-08-27 08:29:22 +00:00
"src/base/sys-info.cc",
"src/base/sys-info.h",
2017-05-30 08:47:37 +00:00
"src/base/template-utils.h",
2017-03-03 13:54:57 +00:00
"src/base/timezone-cache.h",
2019-05-22 10:03:16 +00:00
"src/base/type-traits.h",
2014-06-30 13:25:46 +00:00
"src/base/utils/random-number-generator.cc",
"src/base/utils/random-number-generator.h",
2019-07-16 14:22:44 +00:00
"src/base/vlq-base64.cc",
"src/base/vlq-base64.h",
2021-02-25 13:52:38 +00:00
"src/base/vlq.h",
2014-05-26 07:29:39 +00:00
]
2016-05-17 10:54:14 +00:00
configs = [ ":internal_config_base" ]
2014-06-30 13:25:46 +00:00
2016-10-07 07:56:43 +00:00
public_configs = [ ":libbase_config" ]
2021-02-25 17:09:50 +00:00
deps = [ ":v8_config_headers" ]
2019-02-12 08:41:25 +00:00
2018-03-26 07:00:19 +00:00
data = []
2018-04-09 06:36:36 +00:00
data_deps = []
2014-06-30 13:25:46 +00:00
defines = []
2016-10-07 07:56:43 +00:00
if (is_component_build) {
defines = [ "BUILDING_V8_BASE_SHARED" ]
}
2018-03-30 17:55:49 +00:00
if (is_posix || is_fuchsia) {
2017-03-03 13:54:57 +00:00
sources += [
"src/base/platform/platform-posix.cc",
"src/base/platform/platform-posix.h",
]
2018-02-01 19:52:44 +00:00
if (current_os != "aix") {
sources += [
"src/base/platform/platform-posix-time.cc",
2018-02-09 12:38:11 +00:00
"src/base/platform/platform-posix-time.h",
2018-02-01 19:52:44 +00:00
]
}
2014-06-30 13:25:46 +00:00
}
2020-09-11 08:11:42 +00:00
if (is_linux || is_chromeos) {
2016-08-18 14:25:19 +00:00
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-linux.cc",
]
2014-06-30 13:25:46 +00:00
2016-03-31 07:30:16 +00:00
libs = [
"dl",
2017-05-12 01:35:09 +00:00
"rt",
]
} else if (current_os == "aix") {
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-aix.cc",
]
2020-11-13 15:06:51 +00:00
libs = [ "dl" ]
2014-06-30 13:25:46 +00:00
} else if (is_android) {
2015-03-31 12:08:10 +00:00
if (current_toolchain == host_toolchain) {
2016-03-31 07:30:16 +00:00
libs = [
"dl",
"rt",
]
2015-03-31 12:08:10 +00:00
if (host_os == "mac") {
2016-08-18 14:25:19 +00:00
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-macos.cc",
]
2014-06-30 13:25:46 +00:00
} else {
2016-08-18 14:25:19 +00:00
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-linux.cc",
]
2014-06-30 13:25:46 +00:00
}
} else {
2016-08-18 14:25:19 +00:00
sources += [
"src/base/debug/stack_trace_android.cc",
"src/base/platform/platform-linux.cc",
]
2014-06-30 13:25:46 +00:00
}
2017-06-11 14:34:32 +00:00
} else if (is_fuchsia) {
sources += [
"src/base/debug/stack_trace_fuchsia.cc",
"src/base/platform/platform-fuchsia.cc",
]
2020-11-10 19:38:21 +00:00
deps += [ "//third_party/fuchsia-sdk/sdk/pkg/zx" ]
2019-04-16 12:21:36 +00:00
} else if (is_mac || is_ios) {
2016-08-18 14:25:19 +00:00
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-macos.cc",
]
2014-06-30 13:25:46 +00:00
} else if (is_win) {
# TODO(jochen): Add support for cygwin.
sources += [
2016-08-18 14:25:19 +00:00
"src/base/debug/stack_trace_win.cc",
2014-06-30 13:25:46 +00:00
"src/base/platform/platform-win32.cc",
2014-07-17 17:39:54 +00:00
"src/base/win32-headers.h",
2014-06-30 13:25:46 +00:00
]
defines += [ "_CRT_RAND_S" ] # for rand_s()
2015-01-08 13:21:52 +00:00
libs = [
2016-08-18 14:25:19 +00:00
"dbghelp.lib",
2015-01-08 13:21:52 +00:00
"winmm.lib",
"ws2_32.lib",
]
2018-03-26 07:00:19 +00:00
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
if (v8_enable_system_instrumentation) {
libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h
}
2018-04-09 06:36:36 +00:00
data_deps += [ "//build/win:runtime_libs" ]
2014-06-30 13:25:46 +00:00
}
2018-11-02 13:09:47 +00:00
if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") {
# Add runtime libs for mips.
data += [
"tools/mips_toolchain/sysroot/usr/lib/",
"tools/mips_toolchain/mips-mti-linux-gnu/lib",
]
}
2019-09-17 10:00:28 +00:00
if (is_ubsan && (v8_current_cpu == "x86" || v8_current_cpu == "arm" ||
v8_current_cpu == "mips")) {
# Special UBSan 32-bit requirement.
sources += [ "src/base/ubsan.cc" ]
}
2021-02-09 16:11:55 +00:00
if (v8_current_cpu == "riscv64") {
libs += [ "atomic" ]
}
2018-03-26 11:29:32 +00:00
if (is_tsan && !build_with_chromium) {
data += [ "tools/sanitizers/tsan_suppressions.txt" ]
2021-02-03 14:11:03 +00:00
2021-01-20 12:01:20 +00:00
# llvm-symbolizer uses libstdc++ from the clang package.
data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ]
2018-03-26 11:29:32 +00:00
}
2014-06-30 13:25:46 +00:00
# TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
2014-05-05 11:06:26 +00:00
}
2016-10-10 08:51:48 +00:00
v8_component("v8_libplatform") {
2014-07-03 07:37:27 +00:00
sources = [
2016-08-02 17:12:20 +00:00
"//base/trace_event/common/trace_event_common.h",
2016-10-10 08:51:48 +00:00
"include/libplatform/libplatform-export.h",
2014-07-03 07:37:27 +00:00
"include/libplatform/libplatform.h",
2016-07-27 16:21:09 +00:00
"include/libplatform/v8-tracing.h",
2017-11-15 12:07:22 +00:00
"src/libplatform/default-foreground-task-runner.cc",
"src/libplatform/default-foreground-task-runner.h",
2020-04-24 13:14:50 +00:00
"src/libplatform/default-job.cc",
"src/libplatform/default-job.h",
2014-07-03 07:37:27 +00:00
"src/libplatform/default-platform.cc",
"src/libplatform/default-platform.h",
2018-03-26 16:44:23 +00:00
"src/libplatform/default-worker-threads-task-runner.cc",
"src/libplatform/default-worker-threads-task-runner.h",
2019-03-19 09:23:34 +00:00
"src/libplatform/delayed-task-queue.cc",
"src/libplatform/delayed-task-queue.h",
2014-07-03 07:37:27 +00:00
"src/libplatform/task-queue.cc",
"src/libplatform/task-queue.h",
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
"src/libplatform/tracing/recorder-default.cc",
"src/libplatform/tracing/recorder.h",
2016-07-27 16:21:09 +00:00
"src/libplatform/tracing/trace-buffer.cc",
"src/libplatform/tracing/trace-buffer.h",
"src/libplatform/tracing/trace-config.cc",
"src/libplatform/tracing/trace-object.cc",
"src/libplatform/tracing/trace-writer.cc",
"src/libplatform/tracing/trace-writer.h",
"src/libplatform/tracing/tracing-controller.cc",
2014-07-03 07:37:27 +00:00
"src/libplatform/worker-thread.cc",
"src/libplatform/worker-thread.h",
]
2016-05-17 10:54:14 +00:00
configs = [ ":internal_config_base" ]
2014-07-03 07:37:27 +00:00
2016-10-10 08:51:48 +00:00
if (is_component_build) {
defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
}
2016-05-17 10:54:14 +00:00
public_configs = [ ":libplatform_config" ]
2016-05-11 12:03:16 +00:00
2020-11-17 06:07:54 +00:00
public_deps = []
2014-07-03 07:37:27 +00:00
deps = [
2021-03-01 22:19:03 +00:00
":v8_config_headers",
2014-07-03 07:37:27 +00:00
":v8_libbase",
2020-04-17 20:46:18 +00:00
":v8_tracing",
2014-07-03 07:37:27 +00:00
]
2020-04-17 20:46:18 +00:00
2019-03-28 08:52:41 +00:00
if (v8_use_perfetto) {
2020-04-17 20:46:18 +00:00
sources -= [
"//base/trace_event/common/trace_event_common.h",
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
"src/libplatform/tracing/recorder-default.cc",
2021-03-01 19:42:27 +00:00
"src/libplatform/tracing/recorder.h",
2020-04-17 20:46:18 +00:00
"src/libplatform/tracing/trace-buffer.cc",
"src/libplatform/tracing/trace-buffer.h",
"src/libplatform/tracing/trace-object.cc",
"src/libplatform/tracing/trace-writer.cc",
"src/libplatform/tracing/trace-writer.h",
]
2019-04-30 11:11:39 +00:00
sources += [
2019-07-08 08:29:54 +00:00
"src/libplatform/tracing/trace-event-listener.cc",
2019-05-27 12:46:35 +00:00
"src/libplatform/tracing/trace-event-listener.h",
2019-04-30 11:11:39 +00:00
]
2019-05-09 07:42:02 +00:00
deps += [
2020-04-17 20:46:18 +00:00
# TODO(skyostil): Switch TraceEventListener to protozero.
2019-07-08 08:29:54 +00:00
"//third_party/perfetto/protos/perfetto/trace:lite",
2019-05-09 07:42:02 +00:00
]
Step 1 (of 3-ish): Basic ETW Instrumentation in V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U
A lot has changed since the last patchset! I recommend revisiting this
design doc and reading the parts in green. I explain the roadmap for
what changes to expect from ETW instrumentation as well as the
instrumentation of this particular CL.
I'll do my best to answer any further questions anyone has about my
particular instrumentation or ETW in general :)
---
This is the first of a series of changelists to round out ETW
instrumentation for V8.
This changelist represents the most minimal change needed to instrument
ETW in V8. In particular, it:
- defines and registers the ETW provider,
- interacts minimally with the rest of V8, by hooking into the
existing TracingController::AddTraceEvent function,
- is designed with a platform-agnostic layer, so that event tracers
for other platforms can be instrumented in teh future.
Some notes on instrumentation (aka I copied stuff from the design doc):
We make heavy use of the TraceLogging API to log events. It differs from
previous methods of emitting ETW events in that it doesn<E2><80><99>t
require the overhead of a separate manifest file to keep track of
metadata; rather, events using this API are self-descriptive.
Here are the five major steps to instrument the TraceLogging API:
- Forward declare the provider (from provider-win.h)
- Define the provider in a .cc file (from provider-win.cc)
- Register the provider (called from v8.cc).
- Write events (called from libplatform/tracing-controller.cc)
- Unregister the provider (called from v8.cc)
At the base, we have an abstract provider class that encapsulates the
functionality of an event provider. These are things like registering
and unregistering the provider, and the actual event-logging.
The provider class is split into provider-win and provider-mac
(currently not instantiated) classes, with OS-dependent implementations
of the above functions.
In particular, the TraceLogging API is used only in provider-win. It is
here that we forward declare and define the provider, as well as write
ETW events.
Finally, there is a v8-provider class that serves as a top-level API and
is exposed to the rest of V8. It acts as a wrapper for the
platform-specific providers.
The .wprp file is needed so that Windows Performance Recorder knows how
to capture our events.
Some considerations:
- Is TracingController::AddTraceEvent the best place from which to
write my events?
- Is src/libplatform/tracing the best place to put my instrumentation?
- Right now, I fail the preupload because of this, which tells me my
files are probably not in the best location:
You added one or more #includes that violate checkdeps rules.
src\init\v8.cc Illegal include: "src/libplatform/tracing/v8-provider.h"
Because of "-src/libplatform" from src's include_rules.
Change-Id: Id53e4a034c9e526524a17000da0a647a95d93edf
Bug: v8:11043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233407
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71918}
2021-01-05 18:43:34 +00:00
} else if (is_win) {
sources -= [ "src/libplatform/tracing/recorder-default.cc" ]
sources += [ "src/libplatform/tracing/recorder-win.cc" ]
2021-04-09 20:41:42 +00:00
} else if (target_os == "mac") {
2021-04-07 17:14:43 +00:00
sources -= [ "src/libplatform/tracing/recorder-default.cc" ]
sources += [ "src/libplatform/tracing/recorder-mac.cc" ]
2019-03-28 08:52:41 +00:00
}
2014-07-03 07:37:27 +00:00
}
2016-05-11 10:17:37 +00:00
v8_source_set("fuzzer_support") {
2016-01-26 12:19:28 +00:00
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = [
"test/fuzzer/fuzzer-support.cc",
"test/fuzzer/fuzzer-support.h",
]
2016-05-17 10:54:14 +00:00
configs = [ ":internal_config_base" ]
2016-01-26 12:19:28 +00:00
2016-09-26 07:40:24 +00:00
public_deps = [
2020-04-17 20:46:18 +00:00
":v8",
2016-10-10 08:51:48 +00:00
":v8_libbase",
2016-09-26 07:40:24 +00:00
":v8_libplatform",
2019-04-10 09:30:39 +00:00
":v8_maybe_icu",
2016-09-26 07:40:24 +00:00
]
}
2021-03-19 14:16:09 +00:00
v8_source_set("v8_bigint") {
sources = [
2021-04-19 14:48:37 +00:00
"src/bigint/bigint-internal.cc",
"src/bigint/bigint-internal.h",
2021-03-19 14:16:09 +00:00
"src/bigint/bigint.h",
2021-04-19 14:48:37 +00:00
"src/bigint/digit-arithmetic.h",
"src/bigint/mul-schoolbook.cc",
2021-03-19 14:16:09 +00:00
"src/bigint/vector-arithmetic.cc",
2021-04-19 14:48:37 +00:00
"src/bigint/vector-arithmetic.h",
2021-03-19 14:16:09 +00:00
]
configs = [ ":internal_config" ]
}
2020-06-22 09:57:37 +00:00
v8_source_set("v8_cppgc_shared") {
sources = [
"src/heap/base/stack.cc",
"src/heap/base/stack.h",
2020-09-10 15:31:31 +00:00
"src/heap/base/worklist.cc",
2020-09-09 12:17:35 +00:00
"src/heap/base/worklist.h",
2021-02-22 09:10:50 +00:00
"src/heap/cppgc/sanitizers.h",
2020-06-22 09:57:37 +00:00
]
if (is_clang || !is_win) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ]
} else if (current_cpu == "x86") {
sources += [ "src/heap/base/asm/ia32/push_registers_asm.cc" ]
} else if (current_cpu == "arm") {
sources += [ "src/heap/base/asm/arm/push_registers_asm.cc" ]
} else if (current_cpu == "arm64") {
sources += [ "src/heap/base/asm/arm64/push_registers_asm.cc" ]
} else if (current_cpu == "ppc64") {
sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ]
} else if (current_cpu == "s390x") {
sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ]
} else if (current_cpu == "mipsel") {
sources += [ "src/heap/base/asm/mips/push_registers_asm.cc" ]
} else if (current_cpu == "mips64el") {
sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ]
2021-02-09 16:11:55 +00:00
} else if (current_cpu == "riscv64") {
sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ]
2020-06-22 09:57:37 +00:00
}
} else if (is_win) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ]
} else if (current_cpu == "x86") {
sources += [ "src/heap/base/asm/ia32/push_registers_masm.S" ]
} else if (current_cpu == "arm64") {
sources += [ "src/heap/base/asm/arm64/push_registers_masm.S" ]
}
}
configs = [ ":internal_config" ]
public_deps = [ ":v8_libbase" ]
}
2020-11-11 21:17:16 +00:00
# This is split out to be a non-code containing target that the Chromium browser
# can depend upon to get basic cppgc types.
v8_header_set("cppgc_headers") {
configs = [ ":internal_config" ]
2020-11-24 20:44:23 +00:00
public_configs = [
":v8_header_features",
":cppgc_header_features",
]
2020-11-11 21:17:16 +00:00
2020-03-20 14:44:46 +00:00
sources = [
2020-03-25 15:59:13 +00:00
"include/cppgc/allocation.h",
2020-05-12 11:09:49 +00:00
"include/cppgc/common.h",
2020-05-07 20:36:03 +00:00
"include/cppgc/custom-space.h",
2020-07-22 21:24:25 +00:00
"include/cppgc/default-platform.h",
2020-10-15 09:03:15 +00:00
"include/cppgc/ephemeron-pair.h",
2021-03-08 11:48:00 +00:00
"include/cppgc/explicit-management.h",
2020-03-27 10:02:58 +00:00
"include/cppgc/garbage-collected.h",
2020-11-24 11:52:42 +00:00
"include/cppgc/heap-consistency.h",
2021-02-05 14:05:48 +00:00
"include/cppgc/heap-state.h",
2021-02-11 13:57:15 +00:00
"include/cppgc/heap-statistics.h",
2020-03-27 10:02:58 +00:00
"include/cppgc/heap.h",
2020-06-26 09:06:03 +00:00
"include/cppgc/internal/api-constants.h",
2020-06-02 16:20:04 +00:00
"include/cppgc/internal/atomic-entry-flag.h",
2020-04-14 15:07:29 +00:00
"include/cppgc/internal/compiler-specific.h",
2020-06-26 09:06:03 +00:00
"include/cppgc/internal/finalizer-trait.h",
2020-04-07 21:54:43 +00:00
"include/cppgc/internal/gc-info.h",
2020-10-08 11:20:09 +00:00
"include/cppgc/internal/name-trait.h",
2020-04-15 13:37:22 +00:00
"include/cppgc/internal/persistent-node.h",
2020-04-08 08:40:24 +00:00
"include/cppgc/internal/pointer-policies.h",
2020-04-14 15:07:29 +00:00
"include/cppgc/internal/prefinalizer-handler.h",
2020-06-02 16:20:04 +00:00
"include/cppgc/internal/write-barrier.h",
2020-04-09 13:26:19 +00:00
"include/cppgc/liveness-broker.h",
2020-04-14 15:07:29 +00:00
"include/cppgc/macros.h",
2020-03-31 17:19:02 +00:00
"include/cppgc/member.h",
2020-10-08 11:20:09 +00:00
"include/cppgc/name-provider.h",
2021-01-22 19:59:37 +00:00
"include/cppgc/object-size-trait.h",
2020-04-15 13:37:22 +00:00
"include/cppgc/persistent.h",
2020-03-24 13:35:51 +00:00
"include/cppgc/platform.h",
2020-04-14 15:07:29 +00:00
"include/cppgc/prefinalizer.h",
2021-02-17 17:21:07 +00:00
"include/cppgc/process-heap-statistics.h",
2021-02-05 14:05:48 +00:00
"include/cppgc/sentinel-pointer.h",
2020-04-03 01:13:41 +00:00
"include/cppgc/source-location.h",
2020-04-07 12:35:52 +00:00
"include/cppgc/trace-trait.h",
"include/cppgc/type-traits.h",
"include/cppgc/visitor.h",
2021-02-25 17:09:50 +00:00
]
2021-03-01 21:54:36 +00:00
if (cppgc_enable_caged_heap) {
sources += [ "include/cppgc/internal/caged-heap-local-data.h" ]
}
deps = [ ":v8_libplatform" ]
2021-02-25 17:09:50 +00:00
public_deps = [ ":v8_config_headers" ]
}
v8_source_set("cppgc_base") {
visibility = [ ":*" ]
sources = [
2020-03-27 10:02:58 +00:00
"src/heap/cppgc/allocation.cc",
2020-10-23 12:55:45 +00:00
"src/heap/cppgc/compaction-worklists.cc",
"src/heap/cppgc/compaction-worklists.h",
"src/heap/cppgc/compactor.cc",
"src/heap/cppgc/compactor.h",
2020-10-05 17:40:21 +00:00
"src/heap/cppgc/concurrent-marker.cc",
"src/heap/cppgc/concurrent-marker.h",
2020-11-25 09:22:14 +00:00
"src/heap/cppgc/default-platform.cc",
2021-03-08 11:48:00 +00:00
"src/heap/cppgc/explicit-management.cc",
2020-04-22 10:30:58 +00:00
"src/heap/cppgc/free-list.cc",
"src/heap/cppgc/free-list.h",
2020-06-08 09:53:26 +00:00
"src/heap/cppgc/garbage-collector.h",
2020-03-24 13:35:51 +00:00
"src/heap/cppgc/gc-info-table.cc",
"src/heap/cppgc/gc-info-table.h",
"src/heap/cppgc/gc-info.cc",
2020-06-08 09:53:26 +00:00
"src/heap/cppgc/gc-invoker.cc",
"src/heap/cppgc/gc-invoker.h",
2020-06-15 09:37:43 +00:00
"src/heap/cppgc/heap-base.cc",
"src/heap/cppgc/heap-base.h",
2021-01-26 23:09:23 +00:00
"src/heap/cppgc/heap-consistency.cc",
2020-06-08 09:53:26 +00:00
"src/heap/cppgc/heap-growing.cc",
"src/heap/cppgc/heap-growing.h",
2020-03-25 15:59:13 +00:00
"src/heap/cppgc/heap-object-header.cc",
"src/heap/cppgc/heap-object-header.h",
2020-04-09 07:18:50 +00:00
"src/heap/cppgc/heap-page.cc",
"src/heap/cppgc/heap-page.h",
2020-04-27 23:24:31 +00:00
"src/heap/cppgc/heap-space.cc",
"src/heap/cppgc/heap-space.h",
2021-02-05 14:05:48 +00:00
"src/heap/cppgc/heap-state.cc",
2021-02-11 13:57:15 +00:00
"src/heap/cppgc/heap-statistics-collector.cc",
"src/heap/cppgc/heap-statistics-collector.h",
2020-04-28 20:16:14 +00:00
"src/heap/cppgc/heap-visitor.h",
2020-03-27 10:02:58 +00:00
"src/heap/cppgc/heap.cc",
"src/heap/cppgc/heap.h",
2020-08-25 23:17:11 +00:00
"src/heap/cppgc/incremental-marking-schedule.cc",
"src/heap/cppgc/incremental-marking-schedule.h",
2020-04-09 13:26:19 +00:00
"src/heap/cppgc/liveness-broker.cc",
2020-06-29 15:10:24 +00:00
"src/heap/cppgc/liveness-broker.h",
2020-04-14 15:44:08 +00:00
"src/heap/cppgc/logging.cc",
2020-05-07 12:16:20 +00:00
"src/heap/cppgc/marker.cc",
"src/heap/cppgc/marker.h",
2020-09-09 08:50:34 +00:00
"src/heap/cppgc/marking-state.cc",
2020-07-01 12:40:40 +00:00
"src/heap/cppgc/marking-state.h",
2020-07-16 12:02:12 +00:00
"src/heap/cppgc/marking-verifier.cc",
"src/heap/cppgc/marking-verifier.h",
2020-05-07 12:16:20 +00:00
"src/heap/cppgc/marking-visitor.cc",
"src/heap/cppgc/marking-visitor.h",
2020-07-03 10:25:25 +00:00
"src/heap/cppgc/marking-worklists.cc",
"src/heap/cppgc/marking-worklists.h",
2021-01-22 14:16:15 +00:00
"src/heap/cppgc/metric-recorder.h",
2020-10-08 11:20:09 +00:00
"src/heap/cppgc/name-trait.cc",
2020-04-27 23:24:31 +00:00
"src/heap/cppgc/object-allocator.cc",
"src/heap/cppgc/object-allocator.h",
2021-03-15 19:55:09 +00:00
"src/heap/cppgc/object-poisoner.h",
2021-01-22 19:59:37 +00:00
"src/heap/cppgc/object-size-trait.cc",
2020-05-13 10:35:58 +00:00
"src/heap/cppgc/object-start-bitmap.h",
2020-04-14 13:39:15 +00:00
"src/heap/cppgc/page-memory.cc",
"src/heap/cppgc/page-memory.h",
2020-04-15 13:37:22 +00:00
"src/heap/cppgc/persistent-node.cc",
2020-03-27 10:02:58 +00:00
"src/heap/cppgc/platform.cc",
2020-04-08 08:40:24 +00:00
"src/heap/cppgc/pointer-policies.cc",
2020-04-14 15:07:29 +00:00
"src/heap/cppgc/prefinalizer-handler.cc",
"src/heap/cppgc/prefinalizer-handler.h",
2021-02-17 17:21:07 +00:00
"src/heap/cppgc/process-heap-statistics.cc",
"src/heap/cppgc/process-heap-statistics.h",
2020-06-02 16:20:04 +00:00
"src/heap/cppgc/process-heap.cc",
2020-10-09 12:06:43 +00:00
"src/heap/cppgc/process-heap.h",
2020-04-27 23:24:31 +00:00
"src/heap/cppgc/raw-heap.cc",
"src/heap/cppgc/raw-heap.h",
2020-04-03 01:13:41 +00:00
"src/heap/cppgc/source-location.cc",
2020-06-03 15:33:09 +00:00
"src/heap/cppgc/stats-collector.cc",
"src/heap/cppgc/stats-collector.h",
2020-05-05 21:34:20 +00:00
"src/heap/cppgc/sweeper.cc",
"src/heap/cppgc/sweeper.h",
2020-06-08 09:53:26 +00:00
"src/heap/cppgc/task-handle.h",
2020-11-19 12:27:35 +00:00
"src/heap/cppgc/trace-event.h",
2020-07-10 10:09:55 +00:00
"src/heap/cppgc/trace-trait.cc",
2020-05-29 10:34:52 +00:00
"src/heap/cppgc/virtual-memory.cc",
"src/heap/cppgc/virtual-memory.h",
2020-05-13 08:47:25 +00:00
"src/heap/cppgc/visitor.cc",
2020-06-02 16:20:04 +00:00
"src/heap/cppgc/write-barrier.cc",
2021-02-17 17:21:07 +00:00
"src/heap/cppgc/write-barrier.h",
2020-03-20 14:44:46 +00:00
]
2020-06-15 18:57:06 +00:00
if (cppgc_enable_caged_heap) {
sources += [
2020-06-16 22:41:00 +00:00
"src/heap/cppgc/caged-heap-local-data.cc",
2020-06-15 18:57:06 +00:00
"src/heap/cppgc/caged-heap.cc",
"src/heap/cppgc/caged-heap.h",
]
}
2020-04-01 22:11:38 +00:00
configs = [
":internal_config",
":cppgc_base_config",
]
2020-03-20 14:44:46 +00:00
2020-06-22 09:57:37 +00:00
public_deps = [
2021-02-25 17:09:50 +00:00
":cppgc_headers",
2020-06-22 09:57:37 +00:00
":v8_cppgc_shared",
":v8_libbase",
2020-10-08 11:16:20 +00:00
":v8_libplatform",
2020-06-22 09:57:37 +00:00
]
2021-03-31 15:45:44 +00:00
if (cppgc_is_standalone && !v8_use_perfetto) {
sources += [ "//base/trace_event/common/trace_event_common.h" ]
} else {
public_deps += [ ":v8_tracing" ]
}
2020-03-20 14:44:46 +00:00
}
2021-02-03 14:11:03 +00:00
v8_source_set("cppgc_base_for_testing") {
visibility = [ ":*" ]
sources = [
"include/cppgc/testing.h",
"src/heap/cppgc/testing.cc",
]
configs = [
":internal_config",
":cppgc_base_config",
]
public_deps = [ ":cppgc_base" ]
}
2017-11-27 09:36:01 +00:00
###############################################################################
# Produce a single static library for embedders
#
if (v8_monolithic) {
# A component build is not monolithic.
assert(!is_component_build)
# Using external startup data would produce separate files.
assert(!v8_use_external_startup_data)
v8_static_library("v8_monolith") {
deps = [
":v8",
":v8_libbase",
":v8_libplatform",
"//build/win:default_exe_manifest",
]
configs = [ ":internal_config" ]
}
}
2021-03-08 13:47:44 +00:00
if (v8_enable_webassembly) {
v8_static_library("wee8") {
deps = [
":v8_base",
":v8_libbase",
":v8_libplatform",
":v8_shared_internal_headers",
":v8_snapshot",
"//build/win:default_exe_manifest",
]
2019-04-17 14:50:31 +00:00
2021-03-08 13:47:44 +00:00
# TODO: v8dll-main.cc equivalent for shared library builds
2019-04-17 14:50:31 +00:00
2021-03-08 13:47:44 +00:00
configs = [ ":internal_config" ]
2019-04-17 14:50:31 +00:00
2021-03-08 13:47:44 +00:00
sources = [
### gcmole(all) ###
"src/wasm/c-api.cc",
"src/wasm/c-api.h",
"third_party/wasm-api/wasm.h",
"third_party/wasm-api/wasm.hh",
]
}
2019-04-17 14:50:31 +00:00
}
2014-05-05 11:06:26 +00:00
###############################################################################
# Executables
#
2018-09-12 11:55:04 +00:00
if (current_toolchain == v8_generator_toolchain) {
2018-09-11 10:27:03 +00:00
v8_executable("bytecode_builtins_list_generator") {
2018-09-10 12:55:45 +00:00
visibility = [ ":*" ] # Only targets in this file can depend on this.
include_dirs = [ "." ]
sources = [
"src/builtins/generate-bytecodes-builtins-list.cc",
"src/interpreter/bytecode-operands.cc",
"src/interpreter/bytecode-operands.h",
2021-02-22 09:10:50 +00:00
"src/interpreter/bytecode-traits.h",
2018-09-10 12:55:45 +00:00
"src/interpreter/bytecodes.cc",
"src/interpreter/bytecodes.h",
]
2018-09-11 10:27:03 +00:00
configs = [ ":internal_config" ]
2018-09-10 12:55:45 +00:00
deps = [
":v8_libbase",
2021-02-22 09:10:50 +00:00
":v8_shared_internal_headers",
2018-09-10 12:55:45 +00:00
"//build/win:default_exe_manifest",
]
}
}
2019-10-15 06:51:14 +00:00
if (current_toolchain == v8_snapshot_toolchain) {
2016-06-14 10:07:22 +00:00
v8_executable("mksnapshot") {
2014-09-09 08:57:29 +00:00
visibility = [ ":*" ] # Only targets in this file can depend on this.
2014-06-03 06:50:46 +00:00
2014-06-05 08:45:24 +00:00
sources = [
2019-10-22 12:14:53 +00:00
"src/snapshot/embedded/embedded-empty.cc",
2019-05-27 09:37:45 +00:00
"src/snapshot/embedded/embedded-file-writer.cc",
"src/snapshot/embedded/embedded-file-writer.h",
2019-05-23 12:03:04 +00:00
"src/snapshot/embedded/platform-embedded-file-writer-aix.cc",
"src/snapshot/embedded/platform-embedded-file-writer-aix.h",
2019-05-22 13:24:03 +00:00
"src/snapshot/embedded/platform-embedded-file-writer-base.cc",
"src/snapshot/embedded/platform-embedded-file-writer-base.h",
"src/snapshot/embedded/platform-embedded-file-writer-generic.cc",
"src/snapshot/embedded/platform-embedded-file-writer-generic.h",
2019-05-23 12:03:04 +00:00
"src/snapshot/embedded/platform-embedded-file-writer-mac.cc",
"src/snapshot/embedded/platform-embedded-file-writer-mac.h",
"src/snapshot/embedded/platform-embedded-file-writer-win.cc",
"src/snapshot/embedded/platform-embedded-file-writer-win.h",
2015-03-27 15:28:55 +00:00
"src/snapshot/mksnapshot.cc",
2019-10-22 12:14:53 +00:00
"src/snapshot/snapshot-empty.cc",
2014-06-05 08:45:24 +00:00
]
2014-05-05 11:06:26 +00:00
2020-08-18 12:47:13 +00:00
if (v8_control_flow_integrity) {
sources += [ "src/deoptimizer/deoptimizer-cfi-empty.cc" ]
}
2016-06-20 05:51:37 +00:00
configs = [ ":internal_config" ]
2014-06-04 15:21:26 +00:00
2014-06-05 08:45:24 +00:00
deps = [
2019-04-09 12:34:36 +00:00
":v8_base_without_compiler",
":v8_compiler_for_mksnapshot",
2017-09-06 10:48:08 +00:00
":v8_init",
2016-10-07 07:56:43 +00:00
":v8_libbase",
2014-07-03 07:37:27 +00:00
":v8_libplatform",
2019-10-22 12:14:53 +00:00
":v8_maybe_icu",
2021-02-22 09:10:50 +00:00
":v8_shared_internal_headers",
2020-05-05 17:13:11 +00:00
":v8_tracing",
2016-05-02 16:46:13 +00:00
"//build/win:default_exe_manifest",
2014-06-05 08:45:24 +00:00
]
2014-05-05 11:06:26 +00:00
}
2015-01-08 10:48:04 +00:00
}
2018-04-16 09:24:22 +00:00
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("torque") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
2020-01-29 11:27:10 +00:00
sources = [ "src/torque/torque.cc" ]
2018-04-16 09:24:22 +00:00
deps = [
2018-07-24 13:16:38 +00:00
":torque_base",
2018-04-16 09:24:22 +00:00
"//build/win:default_exe_manifest",
]
2019-06-25 10:51:59 +00:00
# The use of exceptions for Torque in violation of the Chromium style-guide
# is justified by the fact that it is only used from the non-essential
# language server and can be removed anytime if it causes problems.
2019-04-12 04:06:41 +00:00
configs = [
":internal_config",
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
]
remove_configs = [
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
]
2019-01-23 15:17:35 +00:00
if (is_win && is_asan) {
2019-04-12 04:06:41 +00:00
remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
2019-01-23 15:17:35 +00:00
}
2018-04-16 09:24:22 +00:00
}
}
2019-03-01 07:50:42 +00:00
v8_executable("torque-language-server") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
2020-01-29 11:27:10 +00:00
sources = [ "src/torque/ls/torque-language-server.cc" ]
2019-03-01 07:50:42 +00:00
deps = [
":torque_base",
":torque_ls_base",
"//build/win:default_exe_manifest",
]
2019-06-25 10:51:59 +00:00
# The use of exceptions for Torque in violation of the Chromium style-guide
# is justified by the fact that it is only used from the non-essential
# language server and can be removed anytime if it causes problems.
2019-04-12 04:06:41 +00:00
configs = [
":internal_config",
"//build/config/compiler:exceptions",
"//build/config/compiler:rtti",
]
remove_configs = [
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
]
2019-03-01 07:50:42 +00:00
if (is_win && is_asan) {
2019-04-12 04:06:41 +00:00
remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
2019-03-01 07:50:42 +00:00
}
}
2019-07-10 07:25:49 +00:00
if (v8_enable_i18n_support) {
if (current_toolchain == v8_generator_toolchain) {
v8_executable("gen-regexp-special-case") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
2019-07-01 20:31:08 +00:00
2021-02-22 09:10:50 +00:00
sources = [
"src/regexp/gen-regexp-special-case.cc",
"src/regexp/special-case.h",
]
2019-07-01 20:31:08 +00:00
2019-07-10 07:25:49 +00:00
deps = [
":v8_libbase",
2021-02-22 09:10:50 +00:00
":v8_shared_internal_headers",
2019-07-10 07:25:49 +00:00
"//build/win:default_exe_manifest",
"//third_party/icu",
]
2019-07-01 20:31:08 +00:00
2019-07-10 07:25:49 +00:00
configs = [ ":internal_config" ]
}
2019-07-01 20:31:08 +00:00
}
2019-07-10 07:25:49 +00:00
action("run_gen-regexp-special-case") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
2019-07-01 20:31:08 +00:00
2019-07-10 07:25:49 +00:00
script = "tools/run.py"
2019-07-01 20:31:08 +00:00
2020-01-29 11:27:10 +00:00
deps = [ ":gen-regexp-special-case($v8_generator_toolchain)" ]
2019-07-01 20:31:08 +00:00
2019-07-10 07:25:49 +00:00
output_file = "$target_gen_dir/src/regexp/special-case.cc"
2019-07-01 20:31:08 +00:00
2020-01-29 11:27:10 +00:00
outputs = [ output_file ]
2019-07-01 20:31:08 +00:00
2019-07-10 07:25:49 +00:00
args = [
"./" + rebase_path(
get_label_info(
":gen-regexp-special-case($v8_generator_toolchain)",
"root_out_dir") + "/gen-regexp-special-case",
root_build_dir),
rebase_path(output_file, root_build_dir),
]
}
2019-07-01 20:31:08 +00:00
}
2015-01-08 13:21:52 +00:00
###############################################################################
# Public targets
#
2015-01-08 05:16:32 +00:00
2016-06-08 12:09:25 +00:00
want_v8_shell =
2016-06-01 12:28:57 +00:00
(current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
(current_toolchain == v8_snapshot_toolchain &&
v8_toolset_for_shell == "host") ||
2016-06-08 12:09:25 +00:00
(current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
2016-06-01 12:28:57 +00:00
group("gn_all") {
testonly = true
deps = [
":d8",
2017-01-13 09:09:26 +00:00
":v8_fuzzers",
2016-06-22 13:36:44 +00:00
":v8_hello_world",
":v8_sample_process",
2016-06-03 13:46:08 +00:00
"test:gn_all",
"tools:gn_all",
2016-06-01 12:28:57 +00:00
]
2018-06-11 11:49:00 +00:00
if (v8_custom_deps != "") {
# Custom dependency from directory under v8/custom_deps.
deps += [ v8_custom_deps ]
}
2016-06-01 12:28:57 +00:00
if (want_v8_shell) {
2016-06-08 12:09:25 +00:00
deps += [ ":v8_shell" ]
2016-06-01 12:28:57 +00:00
}
}
2019-05-09 09:05:37 +00:00
group("v8_python_base") {
2020-01-29 11:27:10 +00:00
data = [ ".vpython" ]
2019-05-09 09:05:37 +00:00
}
2017-02-02 11:32:52 +00:00
group("v8_clusterfuzz") {
2017-10-31 13:14:41 +00:00
testonly = true
2020-11-13 15:06:51 +00:00
deps = [
":d8",
":v8_simple_inspector_fuzzer",
]
2017-02-02 11:32:52 +00:00
if (v8_multi_arch_build) {
deps += [
":d8(//build/toolchain/linux:clang_x64)",
2017-02-13 10:42:08 +00:00
":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
2017-02-14 15:19:03 +00:00
":d8(//build/toolchain/linux:clang_x86)",
2017-02-13 10:42:08 +00:00
":d8(//build/toolchain/linux:clang_x86_v8_arm)",
2019-09-30 13:11:24 +00:00
":d8(tools/clusterfuzz/toolchain:clang_x64_pointer_compression)",
2017-02-02 11:32:52 +00:00
]
}
}
2017-06-22 14:11:01 +00:00
group("v8_archive") {
2018-11-10 08:20:16 +00:00
testonly = true
2020-01-29 11:27:10 +00:00
deps = [ ":d8" ]
2018-11-15 11:49:19 +00:00
if (!is_win) {
# On windows, cctest doesn't link with v8_static_library.
deps += [ "test/cctest:cctest" ]
}
2017-06-22 14:11:01 +00:00
}
2018-09-15 02:51:06 +00:00
# TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause
# is removed from Chromium.
if (is_fuchsia && !build_with_chromium) {
import("//build/config/fuchsia/rules.gni")
2020-02-19 10:18:28 +00:00
cr_fuchsia_package("d8_fuchsia_pkg") {
2018-09-15 02:51:06 +00:00
testonly = true
binary = ":d8"
2021-04-02 08:49:39 +00:00
manifest = "gni/v8.cmx"
2018-09-15 02:51:06 +00:00
package_name_override = "d8"
}
fuchsia_package_runner("d8_fuchsia") {
testonly = true
package = ":d8_fuchsia_pkg"
package_name_override = "d8"
}
}
2017-01-13 09:09:26 +00:00
group("v8_fuzzers") {
testonly = true
2018-03-26 13:12:27 +00:00
data_deps = [
2020-11-02 13:06:11 +00:00
":v8_simple_inspector_fuzzer",
2017-01-13 09:09:26 +00:00
":v8_simple_json_fuzzer",
":v8_simple_parser_fuzzer",
2018-01-18 10:27:08 +00:00
":v8_simple_regexp_builtins_fuzzer",
2017-01-13 09:09:26 +00:00
":v8_simple_regexp_fuzzer",
]
2021-02-26 10:52:45 +00:00
if (v8_enable_webassembly) {
data_deps += [
2021-03-08 13:47:44 +00:00
":v8_simple_multi_return_fuzzer",
2021-02-26 10:52:45 +00:00
":v8_simple_wasm_async_fuzzer",
":v8_simple_wasm_code_fuzzer",
":v8_simple_wasm_compile_fuzzer",
":v8_simple_wasm_fuzzer",
]
}
2017-01-13 09:09:26 +00:00
}
2015-06-09 08:36:09 +00:00
if (is_component_build) {
2016-06-14 10:07:22 +00:00
v8_component("v8") {
2020-01-29 11:27:10 +00:00
sources = [ "src/utils/v8dll-main.cc" ]
2015-01-08 13:21:52 +00:00
2015-09-18 09:32:30 +00:00
public_deps = [
":v8_base",
2019-11-12 10:32:23 +00:00
":v8_snapshot",
2015-09-18 09:32:30 +00:00
]
2015-01-08 13:21:52 +00:00
2016-06-20 05:51:37 +00:00
configs = [ ":internal_config" ]
2015-01-08 10:48:04 +00:00
2015-04-09 19:36:02 +00:00
public_configs = [ ":external_config" ]
2015-01-08 13:21:52 +00:00
}
2017-05-03 09:58:03 +00:00
v8_component("v8_for_testing") {
testonly = true
2020-01-29 11:27:10 +00:00
sources = [ "src/utils/v8dll-main.cc" ]
2017-05-03 09:58:03 +00:00
public_deps = [
2021-02-03 14:11:03 +00:00
":cppgc_base_for_testing",
2018-07-24 13:16:38 +00:00
":torque_base",
2019-03-04 15:24:39 +00:00
":torque_ls_base",
2017-05-03 09:58:03 +00:00
":v8_base",
2019-02-15 15:10:20 +00:00
":v8_headers",
2019-10-15 06:51:14 +00:00
":v8_initializers",
2019-11-12 10:32:23 +00:00
":v8_snapshot",
2017-05-03 09:58:03 +00:00
]
configs = [ ":internal_config" ]
public_configs = [ ":external_config" ]
}
2020-03-20 14:44:46 +00:00
2020-04-20 18:19:29 +00:00
v8_component("cppgc") {
public_deps = [ ":cppgc_base" ]
2020-11-24 02:11:37 +00:00
if (!cppgc_is_standalone) {
deps = [ ":v8" ]
}
2021-02-03 14:11:03 +00:00
configs = []
2020-04-20 18:19:29 +00:00
public_configs = [ ":external_config" ]
}
2020-11-24 02:11:37 +00:00
if (cppgc_is_standalone) {
v8_component("cppgc_for_testing") {
testonly = true
2020-03-20 14:44:46 +00:00
2021-02-03 14:11:03 +00:00
public_deps = [
":cppgc_base",
":cppgc_base_for_testing",
]
2020-03-20 14:44:46 +00:00
2021-02-03 14:11:03 +00:00
configs = []
2020-11-24 02:11:37 +00:00
public_configs = [ ":external_config" ]
}
2020-03-20 14:44:46 +00:00
}
2020-09-09 12:17:35 +00:00
v8_component("v8_cppgc_shared_for_testing") {
testonly = true
public_deps = [ ":v8_cppgc_shared" ]
2021-02-03 14:11:03 +00:00
configs = []
2020-09-09 12:17:35 +00:00
public_configs = [ ":external_config" ]
}
2015-01-08 13:21:52 +00:00
} else {
group("v8") {
2015-09-18 09:32:30 +00:00
public_deps = [
":v8_base",
2019-11-12 10:32:23 +00:00
":v8_snapshot",
2015-09-18 09:32:30 +00:00
]
2016-11-28 10:41:47 +00:00
2015-04-09 19:36:02 +00:00
public_configs = [ ":external_config" ]
2015-01-08 13:21:52 +00:00
}
2017-05-03 09:58:03 +00:00
group("v8_for_testing") {
testonly = true
public_deps = [
2021-02-03 14:11:03 +00:00
":cppgc_base_for_testing",
2018-07-24 13:16:38 +00:00
":torque_base",
2019-03-04 15:24:39 +00:00
":torque_ls_base",
2017-05-03 09:58:03 +00:00
":v8_base",
2019-10-15 06:51:14 +00:00
":v8_initializers",
2019-11-12 10:32:23 +00:00
":v8_snapshot",
2017-05-03 09:58:03 +00:00
]
public_configs = [ ":external_config" ]
}
2020-03-20 14:44:46 +00:00
2020-04-20 18:19:29 +00:00
group("cppgc") {
public_deps = [ ":cppgc_base" ]
2020-11-24 02:11:37 +00:00
if (!cppgc_is_standalone) {
deps = [ ":v8" ]
}
2020-04-20 18:19:29 +00:00
public_configs = [ ":external_config" ]
}
2020-11-24 02:11:37 +00:00
if (cppgc_is_standalone) {
group("cppgc_for_testing") {
testonly = true
2020-03-20 14:44:46 +00:00
2021-02-03 14:11:03 +00:00
public_deps = [
":cppgc_base",
":cppgc_base_for_testing",
]
2020-03-20 14:44:46 +00:00
2020-11-24 02:11:37 +00:00
public_configs = [ ":external_config" ]
}
2020-03-20 14:44:46 +00:00
}
2020-09-09 12:17:35 +00:00
group("v8_cppgc_shared_for_testing") {
testonly = true
public_deps = [ ":v8_cppgc_shared" ]
public_configs = [ ":external_config" ]
}
2014-05-28 11:48:55 +00:00
}
2015-01-20 11:31:44 +00:00
2016-06-14 10:07:22 +00:00
v8_executable("d8") {
2016-05-13 16:11:24 +00:00
sources = [
2019-05-15 12:59:47 +00:00
"src/d8/async-hooks-wrapper.cc",
"src/d8/async-hooks-wrapper.h",
"src/d8/d8-console.cc",
"src/d8/d8-console.h",
"src/d8/d8-js.cc",
"src/d8/d8-platforms.cc",
"src/d8/d8-platforms.h",
2021-04-06 06:46:11 +00:00
"src/d8/d8-test.cc",
2019-05-15 12:59:47 +00:00
"src/d8/d8.cc",
"src/d8/d8.h",
2016-05-13 16:11:24 +00:00
]
2015-01-20 11:31:44 +00:00
2020-06-23 08:21:22 +00:00
if (v8_fuzzilli) {
sources += [
"src/d8/cov.cc",
"src/d8/cov.h",
]
}
2016-06-14 10:07:22 +00:00
configs = [
2016-05-13 16:11:24 +00:00
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :v8, and
# you can't have both applied to the same target.
":internal_config_base",
2020-03-04 11:35:45 +00:00
":v8_tracing_config",
2016-05-13 16:11:24 +00:00
]
2015-01-20 11:31:44 +00:00
2016-05-13 16:11:24 +00:00
deps = [
":v8",
2016-10-07 07:56:43 +00:00
":v8_libbase",
2016-05-13 16:11:24 +00:00
":v8_libplatform",
2020-04-17 20:46:18 +00:00
":v8_tracing",
2016-05-13 16:11:24 +00:00
"//build/win:default_exe_manifest",
]
2015-01-20 11:31:44 +00:00
2018-03-30 17:55:49 +00:00
if (is_posix || is_fuchsia) {
2019-05-15 12:59:47 +00:00
sources += [ "src/d8/d8-posix.cc" ]
2016-05-13 16:11:24 +00:00
} else if (is_win) {
2019-05-15 12:59:47 +00:00
sources += [ "src/d8/d8-windows.cc" ]
2016-05-13 16:11:24 +00:00
}
2015-01-20 11:31:44 +00:00
2017-01-10 10:19:21 +00:00
if (v8_correctness_fuzzer) {
2018-02-22 01:27:40 +00:00
deps += [ "tools/clusterfuzz:v8_correctness_fuzzer_resources" ]
2017-01-10 10:19:21 +00:00
}
2016-10-21 06:37:29 +00:00
defines = []
2017-02-13 02:54:05 +00:00
if (v8_enable_vtunejit) {
2018-03-27 16:22:47 +00:00
deps += [ "src/third_party/vtune:v8_vtune" ]
2017-02-13 02:54:05 +00:00
}
2015-01-20 11:31:44 +00:00
}
2016-01-26 12:19:28 +00:00
2016-06-22 13:36:44 +00:00
v8_executable("v8_hello_world") {
2020-01-29 11:27:10 +00:00
sources = [ "samples/hello-world.cc" ]
2016-06-22 13:36:44 +00:00
configs = [
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :v8, and
# you can't have both applied to the same target.
":internal_config_base",
]
deps = [
":v8",
2016-10-07 07:56:43 +00:00
":v8_libbase",
2016-06-22 13:36:44 +00:00
":v8_libplatform",
"//build/win:default_exe_manifest",
]
}
v8_executable("v8_sample_process") {
2020-01-29 11:27:10 +00:00
sources = [ "samples/process.cc" ]
2016-06-22 13:36:44 +00:00
configs = [
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :v8, and
# you can't have both applied to the same target.
":internal_config_base",
]
2016-06-27 11:55:33 +00:00
deps = [
2016-10-14 08:35:20 +00:00
":v8",
2016-10-07 07:56:43 +00:00
":v8_libbase",
2016-06-27 11:55:33 +00:00
":v8_libplatform",
"//build/win:default_exe_manifest",
]
}
2016-06-01 12:28:57 +00:00
if (want_v8_shell) {
2016-06-14 10:07:22 +00:00
v8_executable("v8_shell") {
2020-01-29 11:27:10 +00:00
sources = [ "samples/shell.cc" ]
2016-05-06 07:30:52 +00:00
2016-06-14 10:07:22 +00:00
configs = [
2016-05-06 07:30:52 +00:00
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :v8, and
# you can't have both applied to the same target.
":internal_config_base",
]
deps = [
":v8",
2016-10-07 07:56:43 +00:00
":v8_libbase",
2016-05-06 07:30:52 +00:00
":v8_libplatform",
"//build/win:default_exe_manifest",
]
}
}
2020-11-25 09:22:14 +00:00
v8_executable("cppgc_sample") {
sources = [ "samples/cppgc/cppgc-sample.cc" ]
2020-06-03 11:55:19 +00:00
2021-02-09 16:11:55 +00:00
if (v8_current_cpu == "riscv64") {
libs = [ "atomic" ]
}
2020-11-25 09:22:14 +00:00
configs = [
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :cppgc, and
# you can't have both applied to the same target.
":internal_config_base",
":cppgc_base_config",
]
2020-07-22 21:24:25 +00:00
2020-11-25 09:22:14 +00:00
deps = [ ":cppgc" ]
if (!cppgc_is_standalone) {
deps += [
2020-11-24 02:11:37 +00:00
":v8",
"//build/win:default_exe_manifest",
]
}
2020-07-22 21:24:25 +00:00
}
2016-06-03 13:09:52 +00:00
template("v8_fuzzer") {
name = target_name
forward_variables_from(invoker, "*")
2016-06-14 10:07:22 +00:00
v8_executable("v8_simple_" + name) {
2016-06-03 13:09:52 +00:00
deps = [
":" + name,
2016-06-04 06:28:01 +00:00
"//build/win:default_exe_manifest",
2016-06-03 13:09:52 +00:00
]
2020-01-29 11:27:10 +00:00
sources = [ "test/fuzzer/fuzzer.cc" ]
2017-01-05 09:27:40 +00:00
2016-06-14 10:07:22 +00:00
configs = [ ":external_config" ]
2016-06-03 13:09:52 +00:00
}
}
2016-05-11 10:17:37 +00:00
v8_source_set("json_fuzzer") {
2020-01-29 11:27:10 +00:00
sources = [ "test/fuzzer/json.cc" ]
2016-02-02 11:28:47 +00:00
2020-01-29 11:27:10 +00:00
deps = [ ":fuzzer_support" ]
2016-02-02 11:28:47 +00:00
2016-09-26 07:40:24 +00:00
configs = [
":external_config",
":internal_config_base",
]
2016-02-02 11:28:47 +00:00
}
2016-06-08 12:09:25 +00:00
v8_fuzzer("json_fuzzer") {
}
2016-06-03 13:09:52 +00:00
2016-05-11 10:17:37 +00:00
v8_source_set("parser_fuzzer") {
2020-01-29 11:27:10 +00:00
sources = [ "test/fuzzer/parser.cc" ]
2016-01-26 12:19:28 +00:00
2021-02-25 09:55:25 +00:00
deps = [ ":fuzzer_support" ]
2016-01-26 12:19:28 +00:00
2016-09-26 07:40:24 +00:00
configs = [
":external_config",
":internal_config_base",
]
2016-01-26 12:19:28 +00:00
}
2016-02-01 14:00:12 +00:00
2016-06-08 12:09:25 +00:00
v8_fuzzer("parser_fuzzer") {
}
2016-06-03 13:09:52 +00:00
2018-01-18 10:27:08 +00:00
v8_source_set("regexp_builtins_fuzzer") {
sources = [
"test/fuzzer/regexp-builtins.cc",
"test/fuzzer/regexp_builtins/mjsunit.js.h",
]
2021-02-25 09:55:25 +00:00
deps = [ ":fuzzer_support" ]
2018-01-18 10:27:08 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
v8_fuzzer("regexp_builtins_fuzzer") {
}
2016-05-11 10:17:37 +00:00
v8_source_set("regexp_fuzzer") {
2020-01-29 11:27:10 +00:00
sources = [ "test/fuzzer/regexp.cc" ]
2016-02-01 14:00:12 +00:00
2021-02-25 09:55:25 +00:00
deps = [ ":fuzzer_support" ]
2016-02-01 14:00:12 +00:00
2016-09-26 07:40:24 +00:00
configs = [
":external_config",
":internal_config_base",
]
2016-02-01 14:00:12 +00:00
}
2016-03-02 00:53:19 +00:00
2016-06-08 12:09:25 +00:00
v8_fuzzer("regexp_fuzzer") {
}
2016-06-03 13:09:52 +00:00
2021-02-26 10:52:45 +00:00
if (v8_enable_webassembly) {
2021-03-08 13:47:44 +00:00
v8_source_set("multi_return_fuzzer") {
sources = [ "test/fuzzer/multi-return.cc" ]
deps = [ ":fuzzer_support" ]
configs = [
":external_config",
":internal_config_base",
]
}
v8_fuzzer("multi_return_fuzzer") {
}
2021-02-26 10:52:45 +00:00
v8_source_set("wasm_test_common") {
sources = [
2021-03-02 10:55:50 +00:00
"test/common/flag-utils.h",
"test/common/wasm/flag-utils.h",
2021-02-26 10:52:45 +00:00
"test/common/wasm/wasm-interpreter.cc",
"test/common/wasm/wasm-interpreter.h",
"test/common/wasm/wasm-module-runner.cc",
"test/common/wasm/wasm-module-runner.h",
]
2016-09-14 10:31:23 +00:00
2021-02-26 10:52:45 +00:00
deps = [
":generate_bytecode_builtins_list",
":run_torque",
2021-03-01 12:14:54 +00:00
":v8_internal_headers",
2021-03-02 11:47:19 +00:00
":v8_libbase",
2021-02-26 10:52:45 +00:00
":v8_shared_internal_headers",
":v8_tracing",
]
2018-04-16 09:24:22 +00:00
2021-02-26 10:52:45 +00:00
public_deps = [ ":v8_maybe_icu" ]
2018-07-09 17:04:28 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
2016-09-14 10:31:23 +00:00
2021-02-26 10:52:45 +00:00
v8_source_set("wasm_fuzzer") {
sources = [ "test/fuzzer/wasm.cc" ]
2016-03-02 00:53:19 +00:00
2021-02-26 10:52:45 +00:00
deps = [
":fuzzer_support",
":lib_wasm_fuzzer_common",
":wasm_test_common",
]
2016-03-02 00:53:19 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
2016-03-02 00:53:19 +00:00
2021-02-26 10:52:45 +00:00
v8_fuzzer("wasm_fuzzer") {
}
2016-06-03 13:09:52 +00:00
2021-02-26 10:52:45 +00:00
v8_source_set("wasm_async_fuzzer") {
sources = [ "test/fuzzer/wasm-async.cc" ]
2017-06-13 14:41:54 +00:00
2021-02-26 10:52:45 +00:00
deps = [
":fuzzer_support",
":lib_wasm_fuzzer_common",
":wasm_test_common",
]
2017-06-13 14:41:54 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
2017-06-13 14:41:54 +00:00
2021-02-26 10:52:45 +00:00
v8_fuzzer("wasm_async_fuzzer") {
}
2017-06-13 14:41:54 +00:00
2021-02-26 10:52:45 +00:00
v8_source_set("wasm_code_fuzzer") {
sources = [
"test/common/wasm/test-signatures.h",
"test/fuzzer/wasm-code.cc",
]
2016-08-29 13:55:41 +00:00
2021-02-26 10:52:45 +00:00
deps = [
":fuzzer_support",
":lib_wasm_fuzzer_common",
":wasm_test_common",
]
2016-08-29 13:55:41 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
2016-08-29 13:55:41 +00:00
2021-02-26 10:52:45 +00:00
v8_fuzzer("wasm_code_fuzzer") {
}
[wasm] Write fuzzers for single wasm sections.
This CL adds fuzzers for the wasm module sections 'types', 'names',
'globals', 'imports', 'function signatures', 'memory', and 'data', one
fuzzer per section. No fuzzers are added for the other sections because
either there already exists a fuzzer (e.g. wasm-code), or there exist
inter-section dependencies.
To avoid introducing a bunch executables which would make compilation
with make slow, I introduce a single executable
'v8_simple_wasm_section_fuzzer' which calls the fuzzers mentioned above.
This executable is run by the trybots and ensures that the fuzzers
actually compile. For debugging I introduce commandline parameters which
allow to execute the specific fuzzers from 'v8_simple_wasm_section_fuzzer'.
R=titzer@chromium.org, jochen@chromium.org, mstarzinger@chromium.org
Review-Url: https://codereview.chromium.org/2336603002
Cr-Commit-Position: refs/heads/master@{#39413}
2016-09-14 11:17:11 +00:00
2021-02-26 10:52:45 +00:00
v8_source_set("lib_wasm_fuzzer_common") {
sources = [
"test/fuzzer/wasm-fuzzer-common.cc",
"test/fuzzer/wasm-fuzzer-common.h",
]
[wasm] Write fuzzers for single wasm sections.
This CL adds fuzzers for the wasm module sections 'types', 'names',
'globals', 'imports', 'function signatures', 'memory', and 'data', one
fuzzer per section. No fuzzers are added for the other sections because
either there already exists a fuzzer (e.g. wasm-code), or there exist
inter-section dependencies.
To avoid introducing a bunch executables which would make compilation
with make slow, I introduce a single executable
'v8_simple_wasm_section_fuzzer' which calls the fuzzers mentioned above.
This executable is run by the trybots and ensures that the fuzzers
actually compile. For debugging I introduce commandline parameters which
allow to execute the specific fuzzers from 'v8_simple_wasm_section_fuzzer'.
R=titzer@chromium.org, jochen@chromium.org, mstarzinger@chromium.org
Review-Url: https://codereview.chromium.org/2336603002
Cr-Commit-Position: refs/heads/master@{#39413}
2016-09-14 11:17:11 +00:00
2021-02-26 10:52:45 +00:00
deps = [
2021-03-01 22:33:51 +00:00
":fuzzer_support",
2021-02-26 10:52:45 +00:00
":generate_bytecode_builtins_list",
":run_torque",
2021-03-01 12:14:54 +00:00
":v8_internal_headers",
2021-02-26 10:52:45 +00:00
":v8_tracing",
":wasm_test_common",
]
2018-04-16 09:24:22 +00:00
2021-02-26 10:52:45 +00:00
public_deps = [ ":v8_maybe_icu" ]
2018-07-09 17:04:28 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
[wasm] Write fuzzers for single wasm sections.
This CL adds fuzzers for the wasm module sections 'types', 'names',
'globals', 'imports', 'function signatures', 'memory', and 'data', one
fuzzer per section. No fuzzers are added for the other sections because
either there already exists a fuzzer (e.g. wasm-code), or there exist
inter-section dependencies.
To avoid introducing a bunch executables which would make compilation
with make slow, I introduce a single executable
'v8_simple_wasm_section_fuzzer' which calls the fuzzers mentioned above.
This executable is run by the trybots and ensures that the fuzzers
actually compile. For debugging I introduce commandline parameters which
allow to execute the specific fuzzers from 'v8_simple_wasm_section_fuzzer'.
R=titzer@chromium.org, jochen@chromium.org, mstarzinger@chromium.org
Review-Url: https://codereview.chromium.org/2336603002
Cr-Commit-Position: refs/heads/master@{#39413}
2016-09-14 11:17:11 +00:00
2021-02-26 10:52:45 +00:00
v8_source_set("wasm_compile_fuzzer") {
sources = [
"test/common/wasm/test-signatures.h",
"test/fuzzer/wasm-compile.cc",
]
[wasm] Syntax- and Type-aware Fuzzer
This is the beginning of a new fuzzer that generates
correct-by-construction Wasm modules. This should allow us to better
exercise the compiler and correctness aspects of fuzzing. It is based off
of ahaas' original Wasm fuzzer.
At the moment, it can generate expressions made up of most binops, and
also nested blocks with unconditional breaks. Future CLs will add
additional constructs, such as br_if, loops, memory access, etc.
The way the fuzzer works is that it starts with an array of arbitrary
data provided by libfuzzer. It uses the data to generate an expression.
Care is taken to make use of the entire string. Basically, the
generator has a bunch of grammar-like rules for how to construct an
expression of a given type. For example, an i32 can be made by adding
two other i32s, or by wrapping an i64. The process then continues
recursively until all the data is consumed.
We generate an expression from a slice of data as follows:
* If the slice is less than or equal to the size of the type (e.g. 4
bytes for i32), then it will emit the entire slice as a constant.
* Otherwise, it will consume the first 4 bytes of the slice and use
this to select which rule to apply. Each rule then consumes the
remainder of the slice in an appropriate way. For example:
* Unary ops use the remainder of the slice to generate the argument.
* Binary ops consume another four bytes and mod this with the length
of the remaining slice to split the slice into two parts. Each of
these subslices are then used to generate one of the arguments to
the binop.
* Blocks are basically like a unary op, but a stack of block types is
maintained to facilitate branches. For blocks that end in a break,
the first four bytes of a slice are used to select the break depth
and the stack determines what type of expression to generate.
The goal is that once this generator is complete, it will provide a one
to one mapping between binary strings and valid Wasm modules.
Review-Url: https://codereview.chromium.org/2658723006
Cr-Commit-Position: refs/heads/master@{#43289}
2017-02-17 17:06:29 +00:00
2021-02-26 10:52:45 +00:00
deps = [
":fuzzer_support",
":lib_wasm_fuzzer_common",
":wasm_test_common",
]
[wasm] Syntax- and Type-aware Fuzzer
This is the beginning of a new fuzzer that generates
correct-by-construction Wasm modules. This should allow us to better
exercise the compiler and correctness aspects of fuzzing. It is based off
of ahaas' original Wasm fuzzer.
At the moment, it can generate expressions made up of most binops, and
also nested blocks with unconditional breaks. Future CLs will add
additional constructs, such as br_if, loops, memory access, etc.
The way the fuzzer works is that it starts with an array of arbitrary
data provided by libfuzzer. It uses the data to generate an expression.
Care is taken to make use of the entire string. Basically, the
generator has a bunch of grammar-like rules for how to construct an
expression of a given type. For example, an i32 can be made by adding
two other i32s, or by wrapping an i64. The process then continues
recursively until all the data is consumed.
We generate an expression from a slice of data as follows:
* If the slice is less than or equal to the size of the type (e.g. 4
bytes for i32), then it will emit the entire slice as a constant.
* Otherwise, it will consume the first 4 bytes of the slice and use
this to select which rule to apply. Each rule then consumes the
remainder of the slice in an appropriate way. For example:
* Unary ops use the remainder of the slice to generate the argument.
* Binary ops consume another four bytes and mod this with the length
of the remaining slice to split the slice into two parts. Each of
these subslices are then used to generate one of the arguments to
the binop.
* Blocks are basically like a unary op, but a stack of block types is
maintained to facilitate branches. For blocks that end in a break,
the first four bytes of a slice are used to select the break depth
and the stack determines what type of expression to generate.
The goal is that once this generator is complete, it will provide a one
to one mapping between binary strings and valid Wasm modules.
Review-Url: https://codereview.chromium.org/2658723006
Cr-Commit-Position: refs/heads/master@{#43289}
2017-02-17 17:06:29 +00:00
2021-02-26 10:52:45 +00:00
configs = [
":external_config",
":internal_config_base",
]
}
[wasm] Syntax- and Type-aware Fuzzer
This is the beginning of a new fuzzer that generates
correct-by-construction Wasm modules. This should allow us to better
exercise the compiler and correctness aspects of fuzzing. It is based off
of ahaas' original Wasm fuzzer.
At the moment, it can generate expressions made up of most binops, and
also nested blocks with unconditional breaks. Future CLs will add
additional constructs, such as br_if, loops, memory access, etc.
The way the fuzzer works is that it starts with an array of arbitrary
data provided by libfuzzer. It uses the data to generate an expression.
Care is taken to make use of the entire string. Basically, the
generator has a bunch of grammar-like rules for how to construct an
expression of a given type. For example, an i32 can be made by adding
two other i32s, or by wrapping an i64. The process then continues
recursively until all the data is consumed.
We generate an expression from a slice of data as follows:
* If the slice is less than or equal to the size of the type (e.g. 4
bytes for i32), then it will emit the entire slice as a constant.
* Otherwise, it will consume the first 4 bytes of the slice and use
this to select which rule to apply. Each rule then consumes the
remainder of the slice in an appropriate way. For example:
* Unary ops use the remainder of the slice to generate the argument.
* Binary ops consume another four bytes and mod this with the length
of the remaining slice to split the slice into two parts. Each of
these subslices are then used to generate one of the arguments to
the binop.
* Blocks are basically like a unary op, but a stack of block types is
maintained to facilitate branches. For blocks that end in a break,
the first four bytes of a slice are used to select the break depth
and the stack determines what type of expression to generate.
The goal is that once this generator is complete, it will provide a one
to one mapping between binary strings and valid Wasm modules.
Review-Url: https://codereview.chromium.org/2658723006
Cr-Commit-Position: refs/heads/master@{#43289}
2017-02-17 17:06:29 +00:00
2021-02-26 10:52:45 +00:00
v8_fuzzer("wasm_compile_fuzzer") {
}
[wasm] Syntax- and Type-aware Fuzzer
This is the beginning of a new fuzzer that generates
correct-by-construction Wasm modules. This should allow us to better
exercise the compiler and correctness aspects of fuzzing. It is based off
of ahaas' original Wasm fuzzer.
At the moment, it can generate expressions made up of most binops, and
also nested blocks with unconditional breaks. Future CLs will add
additional constructs, such as br_if, loops, memory access, etc.
The way the fuzzer works is that it starts with an array of arbitrary
data provided by libfuzzer. It uses the data to generate an expression.
Care is taken to make use of the entire string. Basically, the
generator has a bunch of grammar-like rules for how to construct an
expression of a given type. For example, an i32 can be made by adding
two other i32s, or by wrapping an i64. The process then continues
recursively until all the data is consumed.
We generate an expression from a slice of data as follows:
* If the slice is less than or equal to the size of the type (e.g. 4
bytes for i32), then it will emit the entire slice as a constant.
* Otherwise, it will consume the first 4 bytes of the slice and use
this to select which rule to apply. Each rule then consumes the
remainder of the slice in an appropriate way. For example:
* Unary ops use the remainder of the slice to generate the argument.
* Binary ops consume another four bytes and mod this with the length
of the remaining slice to split the slice into two parts. Each of
these subslices are then used to generate one of the arguments to
the binop.
* Blocks are basically like a unary op, but a stack of block types is
maintained to facilitate branches. For blocks that end in a break,
the first four bytes of a slice are used to select the break depth
and the stack determines what type of expression to generate.
The goal is that once this generator is complete, it will provide a one
to one mapping between binary strings and valid Wasm modules.
Review-Url: https://codereview.chromium.org/2658723006
Cr-Commit-Position: refs/heads/master@{#43289}
2017-02-17 17:06:29 +00:00
}
2018-11-29 10:10:21 +00:00
2020-11-02 13:06:11 +00:00
v8_source_set("inspector_fuzzer") {
sources = [ "test/fuzzer/inspector-fuzzer.cc" ]
deps = [
":fuzzer_support",
"test/inspector:inspector_test",
]
configs = [
":external_config",
":internal_config_base",
]
}
v8_fuzzer("inspector_fuzzer") {
}
2018-11-29 10:10:21 +00:00
# Target to build all generated .cc files.
group("v8_generated_cc_files") {
testonly = true
deps = [
":generate_bytecode_builtins_list",
":run_torque",
"src/inspector:v8_generated_cc_files",
]
}
2019-03-28 08:52:41 +00:00
# Protobuf targets, used only when building outside of chromium.
if (!build_with_chromium && v8_use_perfetto) {
# This config is applied to the autogenerated .pb.{cc,h} files in
# proto_library.gni. This config is propagated up to the source sets
# that depend on generated proto headers.
config("protobuf_gen_config") {
defines = [
"GOOGLE_PROTOBUF_NO_RTTI",
"GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
]
cflags = [
"-Wno-unknown-warning-option",
"-Wno-deprecated",
"-Wno-undef",
"-Wno-zero-as-null-pointer-constant",
2019-05-28 13:02:29 +00:00
"-Wno-thread-safety-attributes",
2019-03-28 08:52:41 +00:00
]
2019-05-28 13:02:29 +00:00
include_dirs = [ "third_party/protobuf/src" ]
2019-03-28 08:52:41 +00:00
}
# Configuration used to build libprotobuf_* and the protoc compiler.
config("protobuf_config") {
# Apply the lighter supressions and macro definitions from above.
configs = [ ":protobuf_gen_config" ]
2019-05-28 13:02:29 +00:00
if (!is_win) {
defines = [ "HAVE_PTHREAD=1" ]
}
2019-03-28 08:52:41 +00:00
if (is_clang) {
cflags = [
2019-04-16 15:07:29 +00:00
"-Wno-unused-private-field",
"-Wno-unused-function",
"-Wno-inconsistent-missing-override",
2019-03-28 08:52:41 +00:00
"-Wno-unknown-warning-option",
"-Wno-enum-compare-switch",
"-Wno-user-defined-warnings",
"-Wno-tautological-constant-compare",
]
}
2020-04-17 20:46:18 +00:00
if (is_win && is_clang) {
2019-05-28 13:02:29 +00:00
cflags += [ "-Wno-microsoft-unqualified-friend" ]
}
2019-03-28 08:52:41 +00:00
}
source_set("protobuf_lite") {
sources = [
2019-04-02 12:46:55 +00:00
"third_party/protobuf/src/google/protobuf/any_lite.cc",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/arena.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/arena.h",
"third_party/protobuf/src/google/protobuf/arena_impl.h",
"third_party/protobuf/src/google/protobuf/arenastring.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/extension_set.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/extension_set.h",
"third_party/protobuf/src/google/protobuf/generated_enum_util.cc",
"third_party/protobuf/src/google/protobuf/generated_enum_util.h",
2019-04-02 12:46:55 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_util.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_util.h",
"third_party/protobuf/src/google/protobuf/has_bits.h",
2019-04-02 12:46:55 +00:00
"third_party/protobuf/src/google/protobuf/implicit_weak_message.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/implicit_weak_message.h",
"third_party/protobuf/src/google/protobuf/inlined_string_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/coded_stream.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/coded_stream.h",
"third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h",
"third_party/protobuf/src/google/protobuf/io/io_win32.cc",
"third_party/protobuf/src/google/protobuf/io/io_win32.h",
2019-04-02 12:46:55 +00:00
"third_party/protobuf/src/google/protobuf/io/strtod.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/strtod.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h",
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h",
"third_party/protobuf/src/google/protobuf/map.h",
"third_party/protobuf/src/google/protobuf/map_entry_lite.h",
"third_party/protobuf/src/google/protobuf/map_field_lite.h",
"third_party/protobuf/src/google/protobuf/map_type_handler.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/message_lite.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/message_lite.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/repeated_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/repeated_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/bytestream.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/bytestream.h",
"third_party/protobuf/src/google/protobuf/stubs/callback.h",
"third_party/protobuf/src/google/protobuf/stubs/casts.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/common.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/common.h",
"third_party/protobuf/src/google/protobuf/stubs/fastmem.h",
"third_party/protobuf/src/google/protobuf/stubs/hash.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/int128.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/int128.h",
"third_party/protobuf/src/google/protobuf/stubs/logging.h",
"third_party/protobuf/src/google/protobuf/stubs/macros.h",
"third_party/protobuf/src/google/protobuf/stubs/map_util.h",
"third_party/protobuf/src/google/protobuf/stubs/mutex.h",
"third_party/protobuf/src/google/protobuf/stubs/once.h",
"third_party/protobuf/src/google/protobuf/stubs/platform_macros.h",
"third_party/protobuf/src/google/protobuf/stubs/port.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/status.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/status.h",
"third_party/protobuf/src/google/protobuf/stubs/status_macros.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/statusor.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/statusor.h",
"third_party/protobuf/src/google/protobuf/stubs/stl_util.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/stringpiece.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/stringprintf.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc",
"third_party/protobuf/src/google/protobuf/stubs/strutil.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/strutil.h",
"third_party/protobuf/src/google/protobuf/stubs/template_util.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/time.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/time.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/wire_format_lite.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/wire_format_lite.h",
2019-03-28 08:52:41 +00:00
]
configs -= [ "//build/config/compiler:chromium_code" ]
2019-04-16 15:07:29 +00:00
configs += [
"//build/config/compiler:no_chromium_code",
":protobuf_config",
]
2019-05-28 13:02:29 +00:00
if (is_win) {
configs -= [ "//build/config/win:lean_and_mean" ]
}
2019-03-28 08:52:41 +00:00
public_configs = [ ":protobuf_gen_config" ]
}
# This target should be used only by the protoc compiler and by test targets.
source_set("protobuf_full") {
2020-01-29 11:27:10 +00:00
deps = [ ":protobuf_lite" ]
2019-03-28 08:52:41 +00:00
sources = [
"third_party/protobuf/src/google/protobuf/any.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/any.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/any.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/any.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/api.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/api.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/importer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/importer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/parser.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/parser.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/descriptor.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/descriptor.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/descriptor.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/descriptor.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/descriptor_database.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/descriptor_database.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/duration.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/duration.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/dynamic_message.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/dynamic_message.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/empty.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/empty.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/extension_set_heavy.cc",
"third_party/protobuf/src/google/protobuf/field_mask.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/field_mask.pb.h",
"third_party/protobuf/src/google/protobuf/generated_enum_reflection.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_reflection.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/generated_message_reflection.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/gzip_stream.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/gzip_stream.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/printer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/printer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/io/tokenizer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/io/tokenizer.h",
"third_party/protobuf/src/google/protobuf/map_entry.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/map_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/map_field.h",
"third_party/protobuf/src/google/protobuf/map_field_inl.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/message.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/message.h",
"third_party/protobuf/src/google/protobuf/metadata.h",
"third_party/protobuf/src/google/protobuf/reflection.h",
"third_party/protobuf/src/google/protobuf/reflection_internal.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/reflection_ops.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/reflection_ops.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/service.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/service.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/source_context.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/source_context.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/struct.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/struct.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/mathlimits.h",
"third_party/protobuf/src/google/protobuf/stubs/mathutil.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/stubs/substitute.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/stubs/substitute.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/text_format.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/text_format.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/timestamp.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/timestamp.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/type.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/type.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/unknown_field_set.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/unknown_field_set.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/field_comparator.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/field_comparator.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/field_mask_util.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/field_mask_util.h",
"third_party/protobuf/src/google/protobuf/util/internal/constants.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/datapiece.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/error_listener.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h",
"third_party/protobuf/src/google/protobuf/util/internal/location_tracker.h",
"third_party/protobuf/src/google/protobuf/util/internal/object_location_tracker.h",
"third_party/protobuf/src/google/protobuf/util/internal/object_source.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/object_writer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h",
"third_party/protobuf/src/google/protobuf/util/internal/structured_objectwriter.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/type_info.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/type_info.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/utility.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/internal/utility.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/json_util.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/json_util.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/message_differencer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/message_differencer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/time_util.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/time_util.h",
"third_party/protobuf/src/google/protobuf/util/type_resolver.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/util/type_resolver_util.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/wire_format.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/wire_format.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/wrappers.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/wrappers.pb.h",
2019-03-28 08:52:41 +00:00
]
configs -= [ "//build/config/compiler:chromium_code" ]
2019-04-16 15:07:29 +00:00
configs += [
"//build/config/compiler:no_chromium_code",
":protobuf_config",
]
2019-05-28 13:02:29 +00:00
if (is_win) {
configs -= [ "//build/config/win:lean_and_mean" ]
}
2019-03-28 08:52:41 +00:00
public_configs = [ ":protobuf_gen_config" ]
}
if (current_toolchain == host_toolchain) {
source_set("protoc_lib") {
2020-01-29 11:27:10 +00:00
deps = [ ":protobuf_full" ]
2019-03-28 08:52:41 +00:00
sources = [
"third_party/protobuf/src/google/protobuf/compiler/code_generator.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/code_generator.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h",
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h",
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h",
2019-04-02 12:46:55 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/plugin.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/plugin.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/subprocess.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/subprocess.h",
2019-03-28 08:52:41 +00:00
"third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc",
2021-01-18 11:44:07 +00:00
"third_party/protobuf/src/google/protobuf/compiler/zip_writer.h",
2019-03-28 08:52:41 +00:00
]
configs -= [ "//build/config/compiler:chromium_code" ]
2019-04-16 15:07:29 +00:00
configs += [
"//build/config/compiler:no_chromium_code",
":protobuf_config",
]
2019-05-28 13:02:29 +00:00
if (is_win) {
configs -= [ "//build/config/win:lean_and_mean" ]
}
2019-03-28 08:52:41 +00:00
public_configs = [ ":protobuf_gen_config" ]
}
executable("protoc") {
deps = [
":protoc_lib",
"//build/win:default_exe_manifest",
]
2020-01-29 11:27:10 +00:00
sources = [ "src/protobuf/protobuf-compiler-main.cc" ]
2019-03-28 08:52:41 +00:00
configs -= [ "//build/config/compiler:chromium_code" ]
2019-04-16 15:07:29 +00:00
configs += [ "//build/config/compiler:no_chromium_code" ]
2019-03-28 08:52:41 +00:00
}
} # host_toolchain
2020-04-17 20:46:18 +00:00
v8_component("v8_libperfetto") {
configs = [ ":v8_tracing_config" ]
public_configs = [ "//third_party/perfetto/gn:public_config" ]
deps = [
"//third_party/perfetto/src/trace_processor:export_json",
"//third_party/perfetto/src/trace_processor:storage_minimal",
"//third_party/perfetto/src/tracing:client_api",
"//third_party/perfetto/src/tracing/core",
# TODO(skyostil): Support non-POSIX platforms.
"//third_party/perfetto/protos/perfetto/config:cpp",
"//third_party/perfetto/protos/perfetto/trace/track_event:zero",
"//third_party/perfetto/src/tracing:in_process_backend",
2021-01-18 11:44:07 +00:00
"//third_party/perfetto/src/tracing:platform_impl",
2020-04-17 20:46:18 +00:00
]
}
2019-03-28 08:52:41 +00:00
} # if (!build_with_chromium && v8_use_perfetto)