mirror of https://github.com/lukechilds/node.git
Browse Source
Pick up latest commit from the 5.4-lkgr branch. deps: edit V8 gitignore to allow trace event copy deps: update V8 trace event to 315bf1e2d45be7d53346c31cfcc37424a32c30c8 deps: edit V8 gitignore to allow gtest_prod.h copy deps: update V8 gtest to 6f8a66431cb592dad629028a50b3dd418a408c87 PR-URL: https://github.com/nodejs/node/pull/8317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>v6
Michaël Zasso
8 years ago
2386 changed files with 260277 additions and 148300 deletions
@ -0,0 +1,51 @@ |
|||
# This file is used by the GN meta build system to find the root of the source |
|||
# tree and to set startup options. For documentation on the values set in this |
|||
# file, run "gn help dotfile" at the command line. |
|||
|
|||
# The location of the build configuration file. |
|||
buildconfig = "//build/config/BUILDCONFIG.gn" |
|||
|
|||
# The secondary source root is a parallel directory tree where |
|||
# GN build files are placed when they can not be placed directly |
|||
# in the source tree, e.g. for third party source trees. |
|||
secondary_source = "//build/secondary/" |
|||
|
|||
# These are the targets to check headers for by default. The files in targets |
|||
# matching these patterns (see "gn help label_pattern" for format) will have |
|||
# their includes checked for proper dependencies when you run either |
|||
# "gn check" or "gn gen --check". |
|||
check_targets = [ |
|||
] |
|||
|
|||
# These are the list of GN files that run exec_script. This whitelist exists |
|||
# to force additional review for new uses of exec_script, which is strongly |
|||
# discouraged except for gypi_to_gn calls. |
|||
exec_script_whitelist = [ |
|||
"//build/config/android/BUILD.gn", |
|||
"//build/config/android/config.gni", |
|||
"//build/config/android/internal_rules.gni", |
|||
"//build/config/android/rules.gni", |
|||
"//build/config/BUILD.gn", |
|||
"//build/config/compiler/BUILD.gn", |
|||
"//build/config/gcc/gcc_version.gni", |
|||
"//build/config/ios/ios_sdk.gni", |
|||
"//build/config/linux/atk/BUILD.gn", |
|||
"//build/config/linux/BUILD.gn", |
|||
"//build/config/linux/pkg_config.gni", |
|||
"//build/config/mac/mac_sdk.gni", |
|||
"//build/config/posix/BUILD.gn", |
|||
"//build/config/sysroot.gni", |
|||
"//build/config/win/BUILD.gn", |
|||
"//build/config/win/visual_studio_version.gni", |
|||
"//build/gn_helpers.py", |
|||
"//build/gypi_to_gn.py", |
|||
"//build/toolchain/concurrent_links.gni", |
|||
"//build/toolchain/gcc_toolchain.gni", |
|||
"//build/toolchain/mac/BUILD.gn", |
|||
"//build/toolchain/win/BUILD.gn", |
|||
"//build/util/branding.gni", |
|||
"//build/util/version.gni", |
|||
"//test/cctest/BUILD.gn", |
|||
"//test/test262/BUILD.gn", |
|||
"//test/unittests/BUILD.gn", |
|||
] |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,97 +0,0 @@ |
|||
#
|
|||
# Copyright 2013 the V8 project authors. All rights reserved.
|
|||
# Redistribution and use in source and binary forms, with or without
|
|||
# modification, are permitted provided that the following conditions are
|
|||
# met:
|
|||
#
|
|||
# * Redistributions of source code must retain the above copyright
|
|||
# notice, this list of conditions and the following disclaimer.
|
|||
# * Redistributions in binary form must reproduce the above
|
|||
# copyright notice, this list of conditions and the following
|
|||
# disclaimer in the documentation and/or other materials provided
|
|||
# with the distribution.
|
|||
# * Neither the name of Google Inc. nor the names of its
|
|||
# contributors may be used to endorse or promote products derived
|
|||
# from this software without specific prior written permission.
|
|||
#
|
|||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
|||
# Those definitions should be consistent with the main Makefile
|
|||
NACL_ARCHES = nacl_ia32 nacl_x64 |
|||
MODES = release debug |
|||
|
|||
# Generates all combinations of NACL ARCHES and MODES,
|
|||
# e.g. "nacl_ia32.release" or "nacl_x64.release"
|
|||
NACL_BUILDS = $(foreach mode,$(MODES), \
|
|||
$(addsuffix .$(mode),$(NACL_ARCHES))) |
|||
|
|||
HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') |
|||
TOOLCHAIN_PATH = $(realpath ${NACL_SDK_ROOT}/toolchain) |
|||
NACL_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/linux_pnacl |
|||
|
|||
ifeq ($(wildcard $(NACL_TOOLCHAIN)),) |
|||
$(error Cannot find Native Client toolchain in "${NACL_TOOLCHAIN}") |
|||
endif |
|||
|
|||
ifeq ($(ARCH), nacl_ia32) |
|||
GYPENV = nacl_target_arch=nacl_ia32 v8_target_arch=arm v8_host_arch=ia32 |
|||
NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang" |
|||
NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++" |
|||
NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-32" |
|||
else |
|||
ifeq ($(ARCH), nacl_x64) |
|||
GYPENV = nacl_target_arch=nacl_x64 v8_target_arch=arm v8_host_arch=ia32 |
|||
NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang" |
|||
NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++" |
|||
NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-64" |
|||
else |
|||
$(error Target architecture "${ARCH}" is not supported) |
|||
endif |
|||
endif |
|||
|
|||
# For mksnapshot host generation.
|
|||
GYPENV += host_os=${HOST_OS} |
|||
|
|||
# ICU doesn't support NaCl.
|
|||
GYPENV += v8_enable_i18n_support=0 |
|||
|
|||
# Disable strict aliasing - v8 code often relies on undefined behavior of C++.
|
|||
GYPENV += v8_no_strict_aliasing=1 |
|||
|
|||
NACL_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(NACL_BUILDS)) |
|||
.SECONDEXPANSION: |
|||
# For some reason the $$(basename $$@) expansion didn't work here...
|
|||
$(NACL_BUILDS): $(NACL_MAKEFILES) |
|||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
|
|||
CC=${NACL_CC} \
|
|||
CXX=${NACL_CXX} \
|
|||
AR="$(NACL_TOOLCHAIN)/bin/pnacl-ar" \
|
|||
RANLIB="$(NACL_TOOLCHAIN)/bin/pnacl-ranlib" \
|
|||
LD="$(NACL_TOOLCHAIN)/bin/pnacl-ld" \
|
|||
LINK=${NACL_LINK} \
|
|||
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
|
|||
python -c "print raw_input().capitalize()") \
|
|||
builddir="$(shell pwd)/$(OUTDIR)/$@" |
|||
|
|||
# NACL GYP file generation targets.
|
|||
$(NACL_MAKEFILES): |
|||
GYP_GENERATORS=make \
|
|||
GYP_DEFINES="${GYPENV}" \
|
|||
CC=${NACL_CC} \
|
|||
CXX=${NACL_CXX} \
|
|||
LINK=${NACL_LINK} \
|
|||
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \
|
|||
build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
|
|||
-Ibuild/standalone.gypi --depth=. \
|
|||
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) \
|
|||
-Dwno_array_bounds=-Wno-array-bounds |
@ -1,21 +0,0 @@ |
|||
#!/usr/bin/env python |
|||
# Copyright 2016 the V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
import os |
|||
|
|||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
|||
VALGRIND_DIR = os.path.join(BASE_DIR, 'third_party', 'valgrind') |
|||
LINUX32_DIR = os.path.join(VALGRIND_DIR, 'linux_x86') |
|||
LINUX64_DIR = os.path.join(VALGRIND_DIR, 'linux_x64') |
|||
|
|||
|
|||
def DoMain(_): |
|||
"""Hook to be called from gyp without starting a separate python |
|||
interpreter.""" |
|||
return int(os.path.exists(LINUX32_DIR) and os.path.exists(LINUX64_DIR)) |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
print DoMain([]) |
@ -0,0 +1,18 @@ |
|||
# Copyright 2016 The V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
mac_sdk_min_build_override = "10.10" |
|||
mac_deployment_target_build_override = "10.7" |
|||
|
|||
# Variable that can be used to support multiple build scenarios, like having |
|||
# Chromium specific targets in a client project's GN file etc. |
|||
build_with_chromium = false |
|||
|
|||
# Uncomment these to specify a different NDK location and version in |
|||
# non-Chromium builds. |
|||
# default_android_ndk_root = "//third_party/android_tools/ndk" |
|||
# default_android_ndk_version = "r10e" |
|||
|
|||
# Some non-Chromium builds don't support building java targets. |
|||
enable_java_templates = false |
@ -0,0 +1,15 @@ |
|||
# Copyright 2016 The V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
# Exclude support for registering main function in multi-process tests. |
|||
gtest_include_multiprocess = false |
|||
|
|||
# Exclude support for platform-specific operations across unit tests. |
|||
gtest_include_platform_test = false |
|||
|
|||
# Exclude support for testing Objective C code on OS X and iOS. |
|||
gtest_include_objc_support = false |
|||
|
|||
# Exclude support for flushing coverage files on iOS. |
|||
gtest_include_ios_coverage = false |
@ -0,0 +1,26 @@ |
|||
# Copyright 2015 The V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
import("//build/config/features.gni") |
|||
import("//build/config/ui.gni") |
|||
import("//build/config/v8_target_cpu.gni") |
|||
import("//gni/v8.gni") |
|||
|
|||
if (is_android) { |
|||
import("//build/config/android/config.gni") |
|||
} |
|||
|
|||
if (((v8_current_cpu == "x86" || |
|||
v8_current_cpu == "x64" || |
|||
v8_current_cpu=="x87") && |
|||
(is_linux || is_mac)) || |
|||
(v8_current_cpu == "ppc64" && is_linux)) { |
|||
v8_enable_gdbjit_default = true |
|||
} |
|||
|
|||
v8_imminent_deprecation_warnings_default = true |
|||
|
|||
# Add simple extras solely for the purpose of the cctests. |
|||
v8_extra_library_files = [ "//test/cctest/test-extra.js" ] |
|||
v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ] |
@ -0,0 +1,175 @@ |
|||
# Copyright 2016 the V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
import("//build/config/sanitizers/sanitizers.gni") |
|||
import("//third_party/icu/config.gni") |
|||
import("v8.gni") |
|||
|
|||
declare_args() { |
|||
# Sets the test isolation mode (noop|prepare|check). |
|||
v8_test_isolation_mode = "noop" |
|||
} |
|||
|
|||
template("v8_isolate_run") { |
|||
# Remember target name as within the action scope the target name will be |
|||
# different. |
|||
name = target_name |
|||
if (name != "" && invoker.isolate != "" && invoker.deps != [] && |
|||
v8_test_isolation_mode != "noop") { |
|||
action(name + "_run") { |
|||
testonly = true |
|||
|
|||
deps = invoker.deps |
|||
|
|||
script = "//tools/isolate_driver.py" |
|||
|
|||
sources = [ |
|||
invoker.isolate, |
|||
] |
|||
|
|||
inputs = [ |
|||
# Files that are known to be involved in this step. |
|||
"//tools/swarming_client/isolate.py", |
|||
"//tools/swarming_client/run_isolated.py", |
|||
] |
|||
|
|||
if (v8_test_isolation_mode == "prepare") { |
|||
outputs = [ |
|||
"$root_out_dir/$name.isolated.gen.json", |
|||
] |
|||
} else if (v8_test_isolation_mode == "check") { |
|||
outputs = [ |
|||
"$root_out_dir/$name.isolated", |
|||
"$root_out_dir/$name.isolated.state", |
|||
] |
|||
} |
|||
|
|||
# Translate gn to gyp variables. |
|||
if (is_asan) { |
|||
asan = "1" |
|||
} else { |
|||
asan = "0" |
|||
} |
|||
if (is_msan) { |
|||
msan = "1" |
|||
} else { |
|||
msan = "0" |
|||
} |
|||
if (is_tsan) { |
|||
tsan = "1" |
|||
} else { |
|||
tsan = "0" |
|||
} |
|||
if (is_cfi) { |
|||
cfi_vptr = "1" |
|||
} else { |
|||
cfi_vptr = "0" |
|||
} |
|||
if (target_cpu == "x86") { |
|||
target_arch = "ia32" |
|||
} else { |
|||
target_arch = target_cpu |
|||
} |
|||
if (is_debug) { |
|||
configuration_name = "Debug" |
|||
} else { |
|||
configuration_name = "Release" |
|||
} |
|||
if (is_component_build) { |
|||
component = "shared_library" |
|||
} else { |
|||
component = "static_library" |
|||
} |
|||
if (icu_use_data_file) { |
|||
icu_use_data_file_flag = "1" |
|||
} else { |
|||
icu_use_data_file_flag = "0" |
|||
} |
|||
if (v8_use_external_startup_data) { |
|||
use_external_startup_data = "1" |
|||
} else { |
|||
use_external_startup_data = "0" |
|||
} |
|||
if (v8_use_snapshot) { |
|||
use_snapshot = "true" |
|||
} else { |
|||
use_snapshot = "false" |
|||
} |
|||
if (v8_has_valgrind) { |
|||
has_valgrind = "1" |
|||
} else { |
|||
has_valgrind = "0" |
|||
} |
|||
if (v8_gcmole) { |
|||
gcmole = "1" |
|||
} else { |
|||
gcmole = "0" |
|||
} |
|||
|
|||
|
|||
# Note, all paths will be rebased in isolate_driver.py to be relative to |
|||
# the isolate file. |
|||
args = [ |
|||
v8_test_isolation_mode, |
|||
"--isolated", |
|||
rebase_path("$root_out_dir/$name.isolated", root_build_dir), |
|||
"--isolate", |
|||
rebase_path(invoker.isolate, root_build_dir), |
|||
|
|||
# Path variables are used to replace file paths when loading a .isolate |
|||
# file |
|||
"--path-variable", |
|||
"DEPTH", |
|||
rebase_path("//", root_build_dir), |
|||
"--path-variable", |
|||
"PRODUCT_DIR", |
|||
rebase_path(root_out_dir, root_build_dir), |
|||
|
|||
# TODO(machenbach): Set variables for remaining features. |
|||
"--config-variable", |
|||
"CONFIGURATION_NAME=$configuration_name", |
|||
"--config-variable", |
|||
"OS=$target_os", |
|||
"--config-variable", |
|||
"asan=$asan", |
|||
"--config-variable", |
|||
"cfi_vptr=$cfi_vptr", |
|||
"--config-variable", |
|||
"gcmole=$gcmole", |
|||
"--config-variable", |
|||
"has_valgrind=$has_valgrind", |
|||
"--config-variable", |
|||
"icu_use_data_file_flag=$icu_use_data_file_flag", |
|||
"--config-variable", |
|||
"msan=$msan", |
|||
"--config-variable", |
|||
"tsan=$tsan", |
|||
"--config-variable", |
|||
"coverage=0", |
|||
"--config-variable", |
|||
"sanitizer_coverage=0", |
|||
"--config-variable", |
|||
"component=$component", |
|||
"--config-variable", |
|||
"target_arch=$target_arch", |
|||
"--config-variable", |
|||
"v8_use_external_startup_data=$use_external_startup_data", |
|||
"--config-variable", |
|||
"v8_use_snapshot=$use_snapshot", |
|||
] |
|||
|
|||
if (is_win) { |
|||
args += [ |
|||
"--config-variable", |
|||
"msvs_version=2013", |
|||
] |
|||
} else { |
|||
args += [ |
|||
"--config-variable", |
|||
"msvs_version=0", |
|||
] |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
# Copyright 2016 the V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
import("//build/config/sanitizers/sanitizers.gni") |
|||
import("//build/config/v8_target_cpu.gni") |
|||
|
|||
declare_args() { |
|||
# Indicate if valgrind was fetched as a custom deps to make it available on |
|||
# swarming. |
|||
v8_has_valgrind = false |
|||
|
|||
# Indicate if gcmole was fetched as a hook to make it available on swarming. |
|||
v8_gcmole = false |
|||
|
|||
# Turns on compiler optimizations in V8 in Debug build. |
|||
v8_optimized_debug = true |
|||
|
|||
# Support for backtrace_symbols on linux. |
|||
v8_enable_backtrace = "" |
|||
|
|||
# Enable the snapshot feature, for fast context creation. |
|||
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html |
|||
v8_use_snapshot = true |
|||
|
|||
# Use external files for startup data blobs: |
|||
# the JS builtins sources and the start snapshot. |
|||
v8_use_external_startup_data = "" |
|||
} |
|||
|
|||
if (v8_use_external_startup_data == "") { |
|||
# If not specified as a gn arg, use external startup data by default if |
|||
# a snapshot is used and if we're not on ios. |
|||
v8_use_external_startup_data = v8_use_snapshot && !is_ios |
|||
} |
|||
|
|||
if (v8_enable_backtrace == "") { |
|||
v8_enable_backtrace = is_debug && !v8_optimized_debug |
|||
} |
|||
|
|||
############################################################################### |
|||
# Templates |
|||
# |
|||
|
|||
# Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute |
|||
# paths for all configs in templates as they are shared in different |
|||
# subdirectories. |
|||
v8_path_prefix = get_path_info("../", "abspath") |
|||
|
|||
# Common configs to remove or add in all v8 targets. |
|||
v8_remove_configs = [ "//build/config/compiler:chromium_code" ] |
|||
v8_add_configs = [ |
|||
"//build/config/compiler:no_chromium_code", |
|||
v8_path_prefix + ":features", |
|||
v8_path_prefix + ":toolchain", |
|||
] |
|||
|
|||
if (is_debug && !v8_optimized_debug) { |
|||
v8_remove_configs += [ "//build/config/compiler:default_optimization" ] |
|||
v8_add_configs += [ "//build/config/compiler:no_optimize" ] |
|||
} else { |
|||
v8_remove_configs += [ "//build/config/compiler:default_optimization" ] |
|||
|
|||
# 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 && !using_sanitizer) { |
|||
v8_add_configs += [ "//build/config/compiler:optimize_speed" ] |
|||
} else { |
|||
v8_add_configs += [ "//build/config/compiler:optimize_max" ] |
|||
} |
|||
} |
|||
|
|||
if (is_posix && v8_enable_backtrace) { |
|||
v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] |
|||
v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ] |
|||
} |
|||
|
|||
# All templates should be kept in sync. |
|||
template("v8_source_set") { |
|||
source_set(target_name) { |
|||
forward_variables_from(invoker, "*", [ "configs" ]) |
|||
configs += invoker.configs |
|||
configs -= v8_remove_configs |
|||
configs += v8_add_configs |
|||
} |
|||
} |
|||
|
|||
template("v8_executable") { |
|||
executable(target_name) { |
|||
forward_variables_from(invoker, "*", [ "configs" ]) |
|||
configs += invoker.configs |
|||
configs -= v8_remove_configs |
|||
configs += v8_add_configs |
|||
if (is_linux) { |
|||
# For enabling ASLR. |
|||
ldflags = [ "-pie" ] |
|||
} |
|||
} |
|||
} |
|||
|
|||
template("v8_component") { |
|||
component(target_name) { |
|||
forward_variables_from(invoker, "*", [ "configs" ]) |
|||
configs += invoker.configs |
|||
configs -= v8_remove_configs |
|||
configs += v8_add_configs |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
# Copyright 2016 the V8 project authors. All rights reserved. |
|||
# Copyright (c) 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. |
|||
|
|||
# This file is meant to be included to set clang-specific compiler flags. |
|||
# To use this the following variable can be defined: |
|||
# clang_warning_flags: list: Compiler flags to pass to clang. |
|||
# clang_warning_flags_unset: list: Compiler flags to not pass to clang. |
|||
# |
|||
# Only use this in third-party code. In chromium_code, fix your code to not |
|||
# warn instead! |
|||
# |
|||
# Note that the gypi file is included in target_defaults, so it does not need |
|||
# to be explicitly included. |
|||
# |
|||
# Warning flags set by this will be used on all platforms. If you want to set |
|||
# warning flags on only some platforms, you have to do so manually. |
|||
# |
|||
# To use this, create a gyp target with the following form: |
|||
# { |
|||
# 'target_name': 'my_target', |
|||
# 'variables': { |
|||
# 'clang_warning_flags': ['-Wno-awesome-warning'], |
|||
# 'clang_warning_flags_unset': ['-Wpreviously-set-flag'], |
|||
# } |
|||
# } |
|||
|
|||
{ |
|||
'variables': { |
|||
'clang_warning_flags_unset%': [], # Provide a default value. |
|||
}, |
|||
'conditions': [ |
|||
['clang==1', { |
|||
# This uses >@ instead of @< to also see clang_warning_flags set in |
|||
# targets directly, not just the clang_warning_flags in target_defaults. |
|||
'cflags': [ '>@(clang_warning_flags)' ], |
|||
'cflags!': [ '>@(clang_warning_flags_unset)' ], |
|||
'xcode_settings': { |
|||
'WARNING_CFLAGS': ['>@(clang_warning_flags)'], |
|||
'WARNING_CFLAGS!': ['>@(clang_warning_flags_unset)'], |
|||
}, |
|||
'msvs_settings': { |
|||
'VCCLCompilerTool': { |
|||
'AdditionalOptions': [ '>@(clang_warning_flags)' ], |
|||
'AdditionalOptions!': [ '>@(clang_warning_flags_unset)' ], |
|||
}, |
|||
}, |
|||
}], |
|||
['clang==0 and host_clang==1', { |
|||
'target_conditions': [ |
|||
['_toolset=="host"', { |
|||
'cflags': [ '>@(clang_warning_flags)' ], |
|||
'cflags!': [ '>@(clang_warning_flags_unset)' ], |
|||
}], |
|||
], |
|||
}], |
|||
], |
|||
} |
@ -0,0 +1,5 @@ |
|||
specific_include_rules = { |
|||
"libplatform\.h": [ |
|||
"+libplatform/v8-tracing.h", |
|||
], |
|||
} |
@ -0,0 +1,253 @@ |
|||
// Copyright 2016 the V8 project authors. All rights reserved.
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
|||
// found in the LICENSE file.
|
|||
|
|||
#ifndef V8_LIBPLATFORM_V8_TRACING_H_ |
|||
#define V8_LIBPLATFORM_V8_TRACING_H_ |
|||
|
|||
#include <fstream> |
|||
#include <memory> |
|||
#include <vector> |
|||
|
|||
namespace v8 { |
|||
namespace platform { |
|||
namespace tracing { |
|||
|
|||
const int kTraceMaxNumArgs = 2; |
|||
|
|||
class TraceObject { |
|||
public: |
|||
union ArgValue { |
|||
bool as_bool; |
|||
uint64_t as_uint; |
|||
int64_t as_int; |
|||
double as_double; |
|||
const void* as_pointer; |
|||
const char* as_string; |
|||
}; |
|||
|
|||
TraceObject() {} |
|||
~TraceObject(); |
|||
void Initialize(char phase, const uint8_t* category_enabled_flag, |
|||
const char* name, const char* scope, uint64_t id, |
|||
uint64_t bind_id, int num_args, const char** arg_names, |
|||
const uint8_t* arg_types, const uint64_t* arg_values, |
|||
unsigned int flags); |
|||
void UpdateDuration(); |
|||
void InitializeForTesting(char phase, const uint8_t* category_enabled_flag, |
|||
const char* name, const char* scope, uint64_t id, |
|||
uint64_t bind_id, int num_args, |
|||
const char** arg_names, const uint8_t* arg_types, |
|||
const uint64_t* arg_values, unsigned int flags, |
|||
int pid, int tid, int64_t ts, int64_t tts, |
|||
uint64_t duration, uint64_t cpu_duration); |
|||
|
|||
int pid() const { return pid_; } |
|||
int tid() const { return tid_; } |
|||
char phase() const { return phase_; } |
|||
const uint8_t* category_enabled_flag() const { |
|||
return category_enabled_flag_; |
|||
} |
|||
const char* name() const { return name_; } |
|||
const char* scope() const { return scope_; } |
|||
uint64_t id() const { return id_; } |
|||
uint64_t bind_id() const { return bind_id_; } |
|||
int num_args() const { return num_args_; } |
|||
const char** arg_names() { return arg_names_; } |
|||
uint8_t* arg_types() { return arg_types_; } |
|||
ArgValue* arg_values() { return arg_values_; } |
|||
unsigned int flags() const { return flags_; } |
|||
int64_t ts() { return ts_; } |
|||
int64_t tts() { return tts_; } |
|||
uint64_t duration() { return duration_; } |
|||
uint64_t cpu_duration() { return cpu_duration_; } |
|||
|
|||
private: |
|||
int pid_; |
|||
int tid_; |
|||
char phase_; |
|||
const char* name_; |
|||
const char* scope_; |
|||
const uint8_t* category_enabled_flag_; |
|||
uint64_t id_; |
|||
uint64_t bind_id_; |
|||
int num_args_; |
|||
const char* arg_names_[kTraceMaxNumArgs]; |
|||
uint8_t arg_types_[kTraceMaxNumArgs]; |
|||
ArgValue arg_values_[kTraceMaxNumArgs]; |
|||
char* parameter_copy_storage_ = nullptr; |
|||
unsigned int flags_; |
|||
int64_t ts_; |
|||
int64_t tts_; |
|||
uint64_t duration_; |
|||
uint64_t cpu_duration_; |
|||
|
|||
// Disallow copy and assign
|
|||
TraceObject(const TraceObject&) = delete; |
|||
void operator=(const TraceObject&) = delete; |
|||
}; |
|||
|
|||
class TraceWriter { |
|||
public: |
|||
TraceWriter() {} |
|||
virtual ~TraceWriter() {} |
|||
virtual void AppendTraceEvent(TraceObject* trace_event) = 0; |
|||
virtual void Flush() = 0; |
|||
|
|||
static TraceWriter* CreateJSONTraceWriter(std::ostream& stream); |
|||
|
|||
private: |
|||
// Disallow copy and assign
|
|||
TraceWriter(const TraceWriter&) = delete; |
|||
void operator=(const TraceWriter&) = delete; |
|||
}; |
|||
|
|||
class TraceBufferChunk { |
|||
public: |
|||
explicit TraceBufferChunk(uint32_t seq); |
|||
|
|||
void Reset(uint32_t new_seq); |
|||
bool IsFull() const { return next_free_ == kChunkSize; } |
|||
TraceObject* AddTraceEvent(size_t* event_index); |
|||
TraceObject* GetEventAt(size_t index) { return &chunk_[index]; } |
|||
|
|||
uint32_t seq() const { return seq_; } |
|||
size_t size() const { return next_free_; } |
|||
|
|||
static const size_t kChunkSize = 64; |
|||
|
|||
private: |
|||
size_t next_free_ = 0; |
|||
TraceObject chunk_[kChunkSize]; |
|||
uint32_t seq_; |
|||
|
|||
// Disallow copy and assign
|
|||
TraceBufferChunk(const TraceBufferChunk&) = delete; |
|||
void operator=(const TraceBufferChunk&) = delete; |
|||
}; |
|||
|
|||
class TraceBuffer { |
|||
public: |
|||
TraceBuffer() {} |
|||
virtual ~TraceBuffer() {} |
|||
|
|||
virtual TraceObject* AddTraceEvent(uint64_t* handle) = 0; |
|||
virtual TraceObject* GetEventByHandle(uint64_t handle) = 0; |
|||
virtual bool Flush() = 0; |
|||
|
|||
static const size_t kRingBufferChunks = 1024; |
|||
|
|||
static TraceBuffer* CreateTraceBufferRingBuffer(size_t max_chunks, |
|||
TraceWriter* trace_writer); |
|||
|
|||
private: |
|||
// Disallow copy and assign
|
|||
TraceBuffer(const TraceBuffer&) = delete; |
|||
void operator=(const TraceBuffer&) = delete; |
|||
}; |
|||
|
|||
// Options determines how the trace buffer stores data.
|
|||
enum TraceRecordMode { |
|||
// Record until the trace buffer is full.
|
|||
RECORD_UNTIL_FULL, |
|||
|
|||
// Record until the user ends the trace. The trace buffer is a fixed size
|
|||
// and we use it as a ring buffer during recording.
|
|||
RECORD_CONTINUOUSLY, |
|||
|
|||
// Record until the trace buffer is full, but with a huge buffer size.
|
|||
RECORD_AS_MUCH_AS_POSSIBLE, |
|||
|
|||
// Echo to console. Events are discarded.
|
|||
ECHO_TO_CONSOLE, |
|||
}; |
|||
|
|||
class TraceConfig { |
|||
public: |
|||
typedef std::vector<std::string> StringList; |
|||
|
|||
static TraceConfig* CreateDefaultTraceConfig(); |
|||
|
|||
TraceConfig() |
|||
: enable_sampling_(false), |
|||
enable_systrace_(false), |
|||
enable_argument_filter_(false) {} |
|||
TraceRecordMode GetTraceRecordMode() const { return record_mode_; } |
|||
bool IsSamplingEnabled() const { return enable_sampling_; } |
|||
bool IsSystraceEnabled() const { return enable_systrace_; } |
|||
bool IsArgumentFilterEnabled() const { return enable_argument_filter_; } |
|||
|
|||
void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } |
|||
void EnableSampling() { enable_sampling_ = true; } |
|||
void EnableSystrace() { enable_systrace_ = true; } |
|||
void EnableArgumentFilter() { enable_argument_filter_ = true; } |
|||
|
|||
void AddIncludedCategory(const char* included_category); |
|||
void AddExcludedCategory(const char* excluded_category); |
|||
|
|||
bool IsCategoryGroupEnabled(const char* category_group) const; |
|||
|
|||
private: |
|||
TraceRecordMode record_mode_; |
|||
bool enable_sampling_ : 1; |
|||
bool enable_systrace_ : 1; |
|||
bool enable_argument_filter_ : 1; |
|||
StringList included_categories_; |
|||
StringList excluded_categories_; |
|||
|
|||
// Disallow copy and assign
|
|||
TraceConfig(const TraceConfig&) = delete; |
|||
void operator=(const TraceConfig&) = delete; |
|||
}; |
|||
|
|||
class TracingController { |
|||
public: |
|||
enum Mode { DISABLED = 0, RECORDING_MODE }; |
|||
|
|||
// The pointer returned from GetCategoryGroupEnabledInternal() points to a
|
|||
// value with zero or more of the following bits. Used in this class only.
|
|||
// The TRACE_EVENT macros should only use the value as a bool.
|
|||
// These values must be in sync with macro values in TraceEvent.h in Blink.
|
|||
enum CategoryGroupEnabledFlags { |
|||
// Category group enabled for the recording mode.
|
|||
ENABLED_FOR_RECORDING = 1 << 0, |
|||
// Category group enabled by SetEventCallbackEnabled().
|
|||
ENABLED_FOR_EVENT_CALLBACK = 1 << 2, |
|||
// Category group enabled to export events to ETW.
|
|||
ENABLED_FOR_ETW_EXPORT = 1 << 3 |
|||
}; |
|||
|
|||
TracingController() {} |
|||
void Initialize(TraceBuffer* trace_buffer); |
|||
const uint8_t* GetCategoryGroupEnabled(const char* category_group); |
|||
static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag); |
|||
uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag, |
|||
const char* name, const char* scope, uint64_t id, |
|||
uint64_t bind_id, int32_t num_args, |
|||
const char** arg_names, const uint8_t* arg_types, |
|||
const uint64_t* arg_values, unsigned int flags); |
|||
void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, |
|||
const char* name, uint64_t handle); |
|||
|
|||
void StartTracing(TraceConfig* trace_config); |
|||
void StopTracing(); |
|||
|
|||
private: |
|||
const uint8_t* GetCategoryGroupEnabledInternal(const char* category_group); |
|||
void UpdateCategoryGroupEnabledFlag(size_t category_index); |
|||
void UpdateCategoryGroupEnabledFlags(); |
|||
|
|||
std::unique_ptr<TraceBuffer> trace_buffer_; |
|||
std::unique_ptr<TraceConfig> trace_config_; |
|||
Mode mode_ = DISABLED; |
|||
|
|||
// Disallow copy and assign
|
|||
TracingController(const TracingController&) = delete; |
|||
void operator=(const TracingController&) = delete; |
|||
}; |
|||
|
|||
} // namespace tracing
|
|||
} // namespace platform
|
|||
} // namespace v8
|
|||
|
|||
#endif // V8_LIBPLATFORM_V8_TRACING_H_
|
File diff suppressed because it is too large
@ -0,0 +1,35 @@ |
|||
# Copyright 2016 the V8 project authors. All rights reserved. |
|||
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
|||
# |
|||
# Use of this source code is governed by a BSD-style license |
|||
# that can be found in the LICENSE file in the root of the source |
|||
# tree. An additional intellectual property rights grant can be found |
|||
# in the file PATENTS. All contributing project authors may |
|||
# be found in the AUTHORS file in the root of the source tree. |
|||
|
|||
|
|||
def _CommonChecks(input_api, output_api): |
|||
results = [] |
|||
|
|||
# Validate the format of the mb_config.pyl file. |
|||
mb_script = input_api.os_path.join(input_api.PresubmitLocalPath(), '..', |
|||
'..', 'tools', 'mb', 'mb.py') |
|||
mb_config_path = input_api.os_path.join(input_api.PresubmitLocalPath(), |
|||
'mb_config.pyl') |
|||
cmd = [input_api.python_executable, mb_script, 'validate', '--config-file', |
|||
mb_config_path] |
|||
kwargs = {'cwd': input_api.PresubmitLocalPath()} |
|||
results.extend(input_api.RunTests([ |
|||
input_api.Command(name='mb_validate', |
|||
cmd=cmd, kwargs=kwargs, |
|||
message=output_api.PresubmitError)])) |
|||
|
|||
return results |
|||
|
|||
|
|||
def CheckChangeOnUpload(input_api, output_api): |
|||
return _CommonChecks(input_api, output_api) |
|||
|
|||
|
|||
def CheckChangeOnCommit(input_api, output_api): |
|||
return _CommonChecks(input_api, output_api) |
@ -0,0 +1,670 @@ |
|||
# Copyright 2016 The V8 project authors. All rights reserved. |
|||
# Use of this source code is governed by a BSD-style license that can be |
|||
# found in the LICENSE file. |
|||
|
|||
{ |
|||
# This is a map of buildbot master names -> buildbot builder names -> |
|||
# config names (where each config name is a key in the 'configs' dict, |
|||
# below). MB uses this dict to look up which config to use for a given bot. |
|||
# Bots are ordered by appearance on waterfall. |
|||
'masters': { |
|||
'developer_default': { |
|||
'x64.debug': 'default_debug_x64', |
|||
'x64.optdebug': 'default_optdebug_x64', |
|||
'x64.release': 'default_release_x64', |
|||
'x86.debug': 'default_debug_x86', |
|||
'x86.optdebug': 'default_optdebug_x86', |
|||
'x86.release': 'default_release_x86', |
|||
}, |
|||
|
|||
'client.dart.fyi': { |
|||
'v8-linux-release': 'gyp_release_x86_disassembler', |
|||
'v8-win-release': 'gyp_release_x86_disassembler', |
|||
'v8-mac-release': 'gyp_release_x86_disassembler', |
|||
}, |
|||
'client.dynamorio': { |
|||
'linux-v8-dr': 'gyp_release_x64', |
|||
}, |
|||
'client.v8': { |
|||
# Linux. |
|||
'V8 Linux - builder': 'gn_release_x86_gcmole', |
|||
'V8 Linux - debug builder': 'gn_debug_x86', |
|||
'V8 Linux - nosnap builder': 'gn_release_x86_no_snap', |
|||
'V8 Linux - nosnap debug builder': 'gn_debug_x86_no_snap', |
|||
'V8 Linux - shared': 'gn_release_x86_shared_verify_heap', |
|||
'V8 Linux - noi18n - debug': 'gyp_debug_x86_no_i18n', |
|||
# Linux64. |
|||
'V8 Linux64 - builder': 'gn_release_x64', |
|||
'V8 Linux64 - debug builder': 'gn_debug_x64_valgrind', |
|||
'V8 Linux64 - custom snapshot - debug builder': 'gn_debug_x64_custom', |
|||
'V8 Linux64 - internal snapshot': 'gn_release_x64_internal', |
|||
'V8 Linux64 - gyp': 'gyp_release_x64', |
|||
# Windows. |
|||
'V8 Win32 - builder': 'gyp_release_x86_minimal_symbols', |
|||
'V8 Win32 - debug builder': 'gyp_debug_x86_minimal_symbols', |
|||
'V8 Win32 - nosnap - shared': |
|||
'gyp_release_x86_no_snap_shared_minimal_symbols', |
|||
'V8 Win64': 'gyp_release_x64_minimal_symbols', |
|||
'V8 Win64 - debug': 'gyp_debug_x64_minimal_symbols', |
|||
'V8 Win64 - clang': 'gyp_release_x64_clang', |
|||
# Mac. |
|||
'V8 Mac': 'gn_release_x86', |
|||
'V8 Mac - debug': 'gn_debug_x86', |
|||
'V8 Mac64': 'gn_release_x64', |
|||
'V8 Mac64 - debug': 'gn_debug_x64', |
|||
'V8 Mac GC Stress': 'gn_debug_x86', |
|||
'V8 Mac64 ASAN': 'gyp_release_x64_asan', |
|||
# Sanitizers. |
|||
'V8 Linux64 ASAN': 'gyp_release_x64_asan', |
|||
'V8 Linux64 TSAN': 'gn_release_x64_tsan', |
|||
'V8 Linux - arm64 - sim - MSAN': 'gn_release_simulate_arm64_msan', |
|||
# Clusterfuzz. |
|||
'V8 Linux64 ASAN no inline - release builder': |
|||
'gyp_release_x64_asan_symbolized_edge_verify_heap', |
|||
'V8 Linux64 ASAN - debug builder': 'gyp_debug_x64_asan_edge', |
|||
'V8 Linux64 ASAN arm64 - debug builder': |
|||
'gyp_debug_simulate_arm64_asan_edge', |
|||
'V8 Linux ASAN arm - debug builder': |
|||
'gyp_debug_simulate_arm_asan_edge', |
|||
'V8 Linux ASAN mipsel - debug builder': |
|||
'gyp_debug_simulate_mipsel_asan_edge', |
|||
# Misc. |
|||
'V8 Linux gcc 4.8': 'gn_release_x86_gcc', |
|||
# FYI. |
|||
'V8 Linux - swarming staging': 'gn_release_x64', |
|||
# TODO(machenbach): Figure out if symbolized is still needed. The |
|||
# original config also specified -O1, which we dropped because chromium |
|||
# doesn't have it (anymore). |
|||
'V8 Linux64 - cfi': 'gyp_release_x64_cfi_symbolized', |
|||
'V8 Linux - vtunejit': 'gyp_debug_x86_vtunejit', |
|||
'V8 Linux64 - gcov coverage': 'gyp_release_x64_gcc_coverage', |
|||
'V8 Linux - predictable': 'gyp_release_x86_predictable', |
|||
'V8 Linux - full debug': 'gyp_full_debug_x86', |
|||
'V8 Linux - interpreted regexp': 'gyp_release_x86_interpreted_regexp', |
|||
'V8 Random Deopt Fuzzer - debug': 'gyp_debug_x86', |
|||
}, |
|||
|
|||
'client.v8.ports': { |
|||
# Arm. |
|||
'V8 Arm - builder': 'gyp_release_arm', |
|||
'V8 Arm - debug builder': 'gyp_debug_arm', |
|||
'V8 Android Arm - builder': 'gyp_release_android_arm', |
|||
'V8 Linux - arm - sim': 'gyp_release_simulate_arm', |
|||
'V8 Linux - arm - sim - debug': 'gyp_debug_simulate_arm', |
|||
# Arm64. |
|||
'V8 Android Arm64 - builder': 'gyp_release_android_arm64', |
|||
'V8 Linux - arm64 - sim': 'gn_release_simulate_arm64', |
|||
'V8 Linux - arm64 - sim - debug': 'gn_debug_simulate_arm64', |
|||
'V8 Linux - arm64 - sim - nosnap - debug': |
|||
'gn_debug_simulate_arm64_no_snap', |
|||
'V8 Linux - arm64 - sim - gc stress': 'gn_debug_simulate_arm64', |
|||
# Mips. |
|||
'V8 Mips - builder': 'gyp_release_mips_no_snap_no_i18n', |
|||
'V8 Linux - mipsel - sim - builder': 'gyp_release_simulate_mipsel', |
|||
'V8 Linux - mips64el - sim - builder': 'gyp_release_simulate_mips64el', |
|||
# PPC. |
|||
'V8 Linux - ppc - sim': 'gyp_release_simulate_ppc', |
|||
'V8 Linux - ppc64 - sim': 'gyp_release_simulate_ppc64', |
|||
# S390. |
|||
'V8 Linux - s390 - sim': 'gyp_release_simulate_s390', |
|||
'V8 Linux - s390x - sim': 'gyp_release_simulate_s390x', |
|||
# X87. |
|||
'V8 Linux - x87 - nosnap - debug builder': |
|||
'gyp_debug_simulate_x87_no_snap', |
|||
}, |
|||
'client.v8.branches': { |
|||
'V8 Linux - beta branch': 'gn_release_x86', |
|||
'V8 Linux - beta branch - debug': 'gn_debug_x86', |
|||
'V8 Linux - stable branch': 'gn_release_x86', |
|||
'V8 Linux - stable branch - debug': 'gn_debug_x86', |
|||
'V8 Linux64 - beta branch': 'gyp_release_x64', |
|||
'V8 Linux64 - beta branch - debug': 'gn_debug_x64', |
|||
'V8 Linux64 - stable branch': 'gn_release_x64', |
|||
'V8 Linux64 - stable branch - debug': 'gn_debug_x64', |
|||
'V8 arm - sim - beta branch': 'gyp_release_simulate_arm', |
|||
'V8 arm - sim - beta branch - debug': 'gyp_debug_simulate_arm', |
|||
'V8 arm - sim - stable branch': 'gyp_release_simulate_arm', |
|||
'V8 arm - sim - stable branch - debug': 'gyp_debug_simulate_arm', |
|||
'V8 mips64el - sim - beta branch': 'gyp_release_simulate_mips64el', |
|||
'V8 mips64el - sim - stable branch': 'gyp_release_simulate_mips64el', |
|||
'V8 mipsel - sim - beta branch': 'gyp_release_simulate_mipsel', |
|||
'V8 mipsel - sim - stable branch': 'gyp_release_simulate_mipsel', |
|||
'V8 ppc - sim - beta branch': 'gyp_release_simulate_ppc', |
|||
'V8 ppc - sim - stable branch': 'gyp_release_simulate_ppc', |
|||
'V8 ppc64 - sim - beta branch': 'gyp_release_simulate_ppc64', |
|||
'V8 ppc64 - sim - stable branch': 'gyp_release_simulate_ppc64', |
|||
'V8 s390 - sim - beta branch': 'gyp_release_simulate_s390', |
|||
'V8 s390 - sim - stable branch': 'gyp_release_simulate_s390', |
|||
'V8 s390x - sim - beta branch': 'gyp_release_simulate_s390x', |
|||
'V8 s390x - sim - stable branch': 'gyp_release_simulate_s390x', |
|||
}, |
|||
'tryserver.v8': { |
|||
'v8_linux_rel_ng': 'gn_release_x86_gcmole_trybot', |
|||
'v8_linux_avx2_dbg': 'gn_debug_x86_trybot', |
|||
'v8_linux_nodcheck_rel_ng': 'gn_release_x86_minimal_symbols', |
|||
'v8_linux_dbg_ng': 'gn_debug_x86_trybot', |
|||
'v8_linux_noi18n_rel_ng': 'gyp_release_x86_no_i18n_trybot', |
|||
'v8_linux_gc_stress_dbg': 'gyp_debug_x86_trybot', |
|||
'v8_linux_nosnap_rel': 'gn_release_x86_no_snap_trybot', |
|||
'v8_linux_nosnap_dbg': 'gn_debug_x86_no_snap_trybot', |
|||
'v8_linux_gcc_compile_rel': 'gn_release_x86_gcc_minimal_symbols', |
|||
'v8_linux_gcc_rel': 'gn_release_x86_gcc_minimal_symbols', |
|||
'v8_linux64_rel_ng': 'gn_release_x64_trybot', |
|||
'v8_linux64_gyp_rel_ng': 'gyp_release_x64', |
|||
'v8_linux64_avx2_rel_ng': 'gn_release_x64_trybot', |
|||
'v8_linux64_avx2_dbg': 'gn_debug_x64_trybot', |
|||
'v8_linux64_asan_rel_ng': 'gyp_release_x64_asan_minimal_symbols', |
|||
'v8_linux64_msan_rel': 'gn_release_simulate_arm64_msan_minimal_symbols', |
|||
'v8_linux64_sanitizer_coverage_rel': |
|||
'gyp_release_x64_asan_minimal_symbols_coverage', |
|||
'v8_linux64_tsan_rel': 'gn_release_x64_tsan_minimal_symbols', |
|||
'v8_win_dbg': 'gyp_debug_x86_trybot', |
|||
'v8_win_compile_dbg': 'gyp_debug_x86_trybot', |
|||
'v8_win_rel_ng': 'gyp_release_x86_trybot', |
|||
'v8_win_nosnap_shared_rel_ng': |
|||
'gyp_release_x86_no_snap_shared_minimal_symbols', |
|||
'v8_win64_dbg': 'gyp_debug_x64_minimal_symbols', |
|||
'v8_win64_rel_ng': 'gyp_release_x64_trybot', |
|||
'v8_mac_rel_ng': 'gn_release_x86_trybot', |
|||
'v8_mac_dbg': 'gn_debug_x86_trybot', |
|||
'v8_mac_gc_stress_dbg': 'gn_debug_x86_trybot', |
|||
'v8_mac64_rel': 'gn_release_x64_trybot', |
|||
'v8_mac64_dbg': 'gn_debug_x64_minimal_symbols', |
|||
'v8_mac64_asan_rel': 'gyp_release_x64_asan', |
|||
'v8_linux_arm_rel_ng': 'gyp_release_simulate_arm_trybot', |
|||
'v8_linux_arm_dbg': 'gyp_debug_simulate_arm', |
|||
'v8_linux_arm_armv8a_rel': 'gyp_release_simulate_arm_trybot', |
|||
'v8_linux_arm_armv8a_dbg': 'gyp_debug_simulate_arm', |
|||
'v8_linux_arm64_rel_ng': 'gn_release_simulate_arm64_trybot', |
|||
'v8_linux_arm64_dbg': 'gn_debug_simulate_arm64', |
|||
'v8_linux_arm64_gc_stress_dbg': 'gn_debug_simulate_arm64', |
|||
'v8_linux_mipsel_compile_rel': 'gyp_release_simulate_mipsel', |
|||
'v8_linux_mips64el_compile_rel': 'gyp_release_simulate_mips64el', |
|||
'v8_android_arm_compile_rel': 'gyp_release_android_arm', |
|||
}, |
|||
}, |
|||
|
|||
|
|||
# To ease readability, config values are ordered by: |
|||
# gyp/gn, release/debug, arch type, other values alphabetically. |
|||
'configs': { |
|||
# Developer default configs. |
|||
'default_debug_x64': [ |
|||
'gn', 'debug', 'x64', 'v8_enable_slow_dchecks', 'v8_full_debug'], |
|||
'default_optdebug_x64': [ |
|||
'gn', 'debug', 'x64', 'v8_enable_slow_dchecks'], |
|||
'default_release_x64': [ |
|||
'gn', 'release', 'x64'], |
|||
'default_debug_x86': [ |
|||
'gn', 'debug', 'x86', 'v8_enable_slow_dchecks', 'v8_full_debug'], |
|||
'default_optdebug_x86': [ |
|||
'gn', 'debug', 'x86', 'v8_enable_slow_dchecks'], |
|||
'default_release_x86': [ |
|||
'gn', 'release', 'x86'], |
|||
|
|||
|
|||
# GN debug configs for simulators. |
|||
'gn_debug_simulate_arm64': [ |
|||
'gn', 'debug_bot', 'simulate_arm64', 'swarming'], |
|||
'gn_debug_simulate_arm64_no_snap': [ |
|||
'gn', 'debug_bot', 'simulate_arm64', 'swarming', 'v8_snapshot_none'], |
|||
|
|||
# GN release configs for simulators. |
|||
'gn_release_simulate_arm64': [ |
|||
'gn', 'release_bot', 'simulate_arm64', 'swarming'], |
|||
'gn_release_simulate_arm64_msan': [ |
|||
'gn', 'release_bot', 'simulate_arm64', 'msan', 'swarming'], |
|||
'gn_release_simulate_arm64_msan_minimal_symbols': [ |
|||
'gn', 'release_bot', 'simulate_arm64', 'msan', 'minimal_symbols', |
|||
'swarming'], |
|||
'gn_release_simulate_arm64_trybot': [ |
|||
'gn', 'release_trybot', 'simulate_arm64', 'swarming'], |
|||
|
|||
# GN release configs for x64. |
|||
'gn_release_x64': [ |
|||
'gn', 'release_bot', 'x64', 'swarming'], |
|||
'gn_release_x64_internal': [ |
|||
'gn', 'release_bot', 'x64', 'swarming', 'v8_snapshot_internal'], |
|||
'gn_release_x64_trybot': [ |
|||
'gn', 'release_trybot', 'x64', 'swarming'], |
|||
'gn_release_x64_tsan': [ |
|||
'gn', 'release_bot', 'x64', 'tsan', 'swarming'], |
|||
'gn_release_x64_tsan_minimal_symbols': [ |
|||
'gn', 'release_bot', 'x64', 'tsan', 'minimal_symbols', 'swarming'], |
|||
|
|||
# GN debug configs for x64. |
|||
'gn_debug_x64': [ |
|||
'gn', 'debug_bot', 'x64', 'swarming'], |
|||
'gn_debug_x64_custom': [ |
|||
'gn', 'debug_bot', 'x64', 'swarming', 'v8_snapshot_custom'], |
|||
'gn_debug_x64_minimal_symbols': [ |
|||
'gn', 'debug_bot', 'x64', 'minimal_symbols', 'swarming'], |
|||
'gn_debug_x64_trybot': [ |
|||
'gn', 'debug_trybot', 'x64', 'swarming'], |
|||
'gn_debug_x64_valgrind': [ |
|||
'gn', 'debug_bot', 'x64', 'swarming', 'valgrind'], |
|||
|
|||
# GN debug configs for x86. |
|||
'gn_debug_x86': [ |
|||
'gn', 'debug_bot', 'x86', 'swarming'], |
|||
'gn_debug_x86_no_snap': [ |
|||
'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'], |
|||
'gn_debug_x86_no_snap_trybot': [ |
|||
'gn', 'debug_trybot', 'x86', 'swarming', 'v8_snapshot_none'], |
|||
'gn_debug_x86_trybot': [ |
|||
'gn', 'debug_trybot', 'x86', 'swarming'], |
|||
|
|||
# GN release configs for x86. |
|||
'gn_release_x86': [ |
|||
'gn', 'release_bot', 'x86', 'swarming'], |
|||
'gn_release_x86_gcc': [ |
|||
'gn', 'release_bot', 'x86', 'gcc'], |
|||
'gn_release_x86_gcc_minimal_symbols': [ |
|||
'gn', 'release_bot', 'x86', 'gcc', 'minimal_symbols'], |
|||
'gn_release_x86_gcmole': [ |
|||
'gn', 'release_bot', 'x86', 'gcmole', 'swarming'], |
|||
'gn_release_x86_gcmole_trybot': [ |
|||
'gn', 'release_trybot', 'x86', 'gcmole', 'swarming'], |
|||
'gn_release_x86_minimal_symbols': [ |
|||
'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], |
|||
'gn_release_x86_no_snap': [ |
|||
'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'], |
|||
'gn_release_x86_no_snap_trybot': [ |
|||
'gn', 'release_trybot', 'x86', 'swarming', 'v8_snapshot_none'], |
|||
'gn_release_x86_shared_verify_heap': [ |
|||
'gn', 'release', 'x86', 'goma', 'shared', 'swarming', 'v8_verify_heap'], |
|||
'gn_release_x86_trybot': [ |
|||
'gn', 'release_trybot', 'x86', 'swarming'], |
|||
|
|||
# Gyp debug configs for arm. |
|||
'gyp_debug_arm': [ |
|||
'gyp', 'debug_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], |
|||
|
|||
# Gyp debug configs for simulators. |
|||
'gyp_debug_simulate_arm': [ |
|||
'gyp', 'debug_bot', 'simulate_arm', 'swarming'], |
|||
'gyp_debug_simulate_arm_asan_edge': [ |
|||
'gyp', 'debug_bot', 'simulate_arm', 'asan', 'edge'], |
|||
'gyp_debug_simulate_arm64_asan_edge': [ |
|||
'gyp', 'debug_bot', 'simulate_arm64', 'asan', 'lsan', 'edge'], |
|||
'gyp_debug_simulate_mipsel_asan_edge': [ |
|||
'gyp', 'debug_bot', 'simulate_mipsel', 'asan', 'edge'], |
|||
'gyp_debug_simulate_x87_no_snap': [ |
|||
'gyp', 'debug_bot', 'simulate_x87', 'swarming', 'v8_snapshot_none'], |
|||
|
|||
# Gyp debug configs for x64. |
|||
'gyp_debug_x64_asan_edge': [ |
|||
'gyp', 'debug_bot', 'x64', 'asan', 'lsan', 'edge'], |
|||
'gyp_debug_x64_minimal_symbols': [ |
|||
'gyp', 'debug_bot', 'x64', 'minimal_symbols', 'swarming'], |
|||
|
|||
# Gyp debug configs for x86. |
|||
'gyp_debug_x86': [ |
|||
'gyp', 'debug_bot', 'x86', 'swarming'], |
|||
'gyp_debug_x86_minimal_symbols': [ |
|||
'gyp', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], |
|||
'gyp_debug_x86_trybot': [ |
|||
'gyp', 'debug_trybot', 'x86', 'swarming'], |
|||
'gyp_debug_x86_no_i18n': [ |
|||
'gyp', 'debug_bot', 'x86', 'v8_no_i18n'], |
|||
'gyp_debug_x86_vtunejit': [ |
|||
'gyp', 'debug_bot', 'x86', 'v8_enable_vtunejit'], |
|||
'gyp_full_debug_x86': [ |
|||
'gyp', 'debug', 'x86', 'goma', 'static', 'v8_enable_slow_dchecks', |
|||
'v8_full_debug'], |
|||
|
|||
# Gyp release configs for arm. |
|||
'gyp_release_arm': [ |
|||
'gyp', 'release_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], |
|||
'gyp_release_android_arm': [ |
|||
'gyp', 'release_bot', 'arm', 'android', 'crosscompile', 'swarming'], |
|||
'gyp_release_android_arm64': [ |
|||
'gyp', 'release_bot', 'arm64', 'android', 'crosscompile', 'swarming'], |
|||
|
|||
# Gyp release configs for mips. |
|||
'gyp_release_mips_no_snap_no_i18n': [ |
|||
'gyp', 'release', 'mips', 'crosscompile', 'static', 'v8_no_i18n', |
|||
'v8_snapshot_none'], |
|||
|
|||
# Gyp release configs for simulators. |
|||
'gyp_release_simulate_arm': [ |
|||
'gyp', 'release_bot', 'simulate_arm', 'swarming'], |
|||
'gyp_release_simulate_arm_trybot': [ |
|||
'gyp', 'release_trybot', 'simulate_arm', 'swarming'], |
|||
'gyp_release_simulate_mipsel': [ |
|||
'gyp', 'release_bot', 'simulate_mipsel', 'swarming'], |
|||
'gyp_release_simulate_mips64el': [ |
|||
'gyp', 'release_bot', 'simulate_mips64el', 'swarming'], |
|||
'gyp_release_simulate_ppc': [ |
|||
'gyp', 'release_bot', 'simulate_ppc', 'swarming'], |
|||
'gyp_release_simulate_ppc64': [ |
|||
'gyp', 'release_bot', 'simulate_ppc64', 'swarming'], |
|||
'gyp_release_simulate_s390': [ |
|||
'gyp', 'release_bot', 'simulate_s390', 'swarming'], |
|||
'gyp_release_simulate_s390x': [ |
|||
'gyp', 'release_bot', 'simulate_s390x', 'swarming'], |
|||
|
|||
# Gyp release configs for x64. |
|||
'gyp_release_x64': [ |
|||
'gyp', 'release_bot', 'x64', 'swarming'], |
|||
'gyp_release_x64_asan': [ |
|||
'gyp', 'release_bot', 'x64', 'asan', 'lsan', 'swarming'], |
|||
'gyp_release_x64_asan_minimal_symbols': [ |
|||
'gyp', 'release_bot', 'x64', 'asan', 'lsan', 'minimal_symbols', |
|||
'swarming'], |
|||
'gyp_release_x64_asan_minimal_symbols_coverage': [ |
|||
'gyp', 'release_bot', 'x64', 'asan', 'bb', 'coverage', 'lsan', |
|||
'minimal_symbols', 'swarming'], |
|||
'gyp_release_x64_asan_symbolized_edge_verify_heap': [ |
|||
'gyp', 'release_bot', 'x64', 'asan', 'edge', 'lsan', 'symbolized', |
|||
'v8_verify_heap'], |
|||
'gyp_release_x64_cfi_symbolized': [ |
|||
'gyp', 'release_bot', 'x64', 'cfi', 'swarming', 'symbolized'], |
|||
'gyp_release_x64_clang': [ |
|||
'gyp', 'release_bot', 'x64', 'clang', 'swarming'], |
|||
'gyp_release_x64_gcc_coverage': [ |
|||
'gyp', 'release_bot', 'x64', 'coverage', 'gcc'], |
|||
'gyp_release_x64_minimal_symbols': [ |
|||
'gyp', 'release_bot', 'x64', 'minimal_symbols', 'swarming'], |
|||
'gyp_release_x64_trybot': [ |
|||
'gyp', 'release_trybot', 'x64', 'swarming'], |
|||
|
|||
# Gyp release configs for x86. |
|||
'gyp_release_x86_disassembler': [ |
|||
'gyp', 'release_bot', 'x86', 'v8_enable_disassembler'], |
|||
'gyp_release_x86_interpreted_regexp': [ |
|||
'gyp', 'release_bot', 'x86', 'v8_interpreted_regexp'], |
|||
'gyp_release_x86_minimal_symbols': [ |
|||
'gyp', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], |
|||
'gyp_release_x86_no_i18n_trybot': [ |
|||
'gyp', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'], |
|||
'gyp_release_x86_no_snap_shared_minimal_symbols': [ |
|||
'gyp', 'release', 'x86', 'goma', 'minimal_symbols', 'shared', 'swarming', |
|||
'v8_snapshot_none'], |
|||
'gyp_release_x86_predictable': [ |
|||
'gyp', 'release_bot', 'x86', 'v8_enable_verify_predictable'], |
|||
'gyp_release_x86_trybot': [ |
|||
'gyp', 'release_trybot', 'x86', 'swarming'], |
|||
}, |
|||
|
|||
'mixins': { |
|||
'android': { |
|||
'gn_args': 'target_os="android" v8_android_log_stdout=true', |
|||
'gyp_defines': 'OS=android v8_android_log_stdout=1', |
|||
}, |
|||
|
|||
'arm': { |
|||
'gn_args': 'target_cpu="arm"', |
|||
'gyp_defines': 'target_arch=arm', |
|||
}, |
|||
|
|||
'arm64': { |
|||
'gn_args': 'target_cpu="arm64"', |
|||
'gyp_defines': 'target_arch=arm64', |
|||
}, |
|||
|
|||
'asan': { |
|||
'gn_args': 'is_asan=true', |
|||
'gyp_defines': 'clang=1 asan=1', |
|||
}, |
|||
|
|||
'bb': { |
|||
'gn_args': 'sanitizer_coverage_flags="bb"', |
|||
'gyp_defines': 'sanitizer_coverage=bb', |
|||
}, |
|||
|
|||
'cfi': { |
|||
'gn_args': 'is_cfi=true use_cfi_diag=true', |
|||
'gyp_defines': 'cfi_vptr=1 cfi_diag=1', |
|||
}, |
|||
|
|||
'clang': { |
|||
'gn_args': 'is_clang=true', |
|||
'gyp_defines': 'clang=1', |
|||
}, |
|||
|
|||
'coverage': { |
|||
# TODO(machenbach): Add this to gn. |
|||
'gyp_defines': 'coverage=1', |
|||
}, |
|||
|
|||
'crosscompile': { |
|||
'gyp_crosscompile': True, |
|||
}, |
|||
|
|||
'dcheck_always_on': { |
|||
'gn_args': 'dcheck_always_on=true', |
|||
'gyp_defines': 'dcheck_always_on=1', |
|||
}, |
|||
|
|||
'debug': { |
|||
'gn_args': 'is_debug=true v8_enable_backtrace=true', |
|||
'gyp_defines': 'v8_enable_backtrace=1', |
|||
}, |
|||
|
|||
'debug_bot': { |
|||
'mixins': [ |
|||
'debug', 'static', 'goma', 'v8_enable_slow_dchecks', |
|||
'v8_optimized_debug'], |
|||
}, |
|||
|
|||
'debug_trybot': { |
|||
'mixins': ['debug_bot', 'minimal_symbols'], |
|||
}, |
|||
|
|||
'edge': { |
|||
'gn_args': 'sanitizer_coverage_flags="edge"', |
|||
'gyp_defines': 'sanitizer_coverage=edge', |
|||
}, |
|||
|
|||
'gcc': { |
|||
'gn_args': 'is_clang=false use_sysroot=false', |
|||
'gyp_defines': 'clang=0', |
|||
}, |
|||
|
|||
'gcmole': { |
|||
'gn_args': 'v8_gcmole=true', |
|||
'gyp_defines': 'gcmole=1', |
|||
}, |
|||
|
|||
'gn': {'type': 'gn'}, |
|||
|
|||
'goma': { |
|||
# The MB code will properly escape goma_dir if necessary in the GYP |
|||
# code path; the GN code path needs no escaping. |
|||
'gn_args': 'use_goma=true', |
|||
'gyp_defines': 'use_goma=1', |
|||
}, |
|||
|
|||
'gyp': {'type': 'gyp'}, |
|||
|
|||
'hard_float': { |
|||
'gn_args': 'arm_float_abi="hard"', |
|||
'gyp_defines': 'arm_float_abi=hard', |
|||
}, |
|||
|
|||
'lsan': { |
|||
'gn_args': 'is_lsan=true', |
|||
'gyp_defines': 'lsan=1', |
|||
}, |
|||
|
|||
'minimal_symbols': { |
|||
'gn_args': 'symbol_level=1', |
|||
'gyp_defines': 'fastbuild=1', |
|||
}, |
|||
|
|||
'mips': { |
|||
'gn_args': 'target_cpu="mips"', |
|||
'gyp_defines': 'target_arch=mips', |
|||
}, |
|||
|
|||
'msan': { |
|||
'gn_args': ('is_msan=true msan_track_origins=2 ' |
|||
'use_prebuilt_instrumented_libraries=true'), |
|||
'gyp_defines': ('clang=1 msan=1 msan_track_origins=2 ' |
|||
'use_prebuilt_instrumented_libraries=1'), |
|||
}, |
|||
|
|||
'release': { |
|||
'gn_args': 'is_debug=false', |
|||
}, |
|||
|
|||
'release_bot': { |
|||
'mixins': ['release', 'static', 'goma'], |
|||
}, |
|||
|
|||
'release_trybot': { |
|||
'mixins': ['release_bot', 'minimal_symbols', 'dcheck_always_on'], |
|||
}, |
|||
|
|||
'shared': { |
|||
'gn_args': 'is_component_build=true', |
|||
'gyp_defines': 'component=shared_library', |
|||
}, |
|||
|
|||
'simulate_arm': { |
|||
'gn_args': 'target_cpu="x86" v8_target_cpu="arm"', |
|||
'gyp_defines': 'target_arch=ia32 v8_target_arch=arm', |
|||
}, |
|||
|
|||
'simulate_arm64': { |
|||
'gn_args': 'target_cpu="x64" v8_target_cpu="arm64"', |
|||
'gyp_defines': 'target_arch=x64 v8_target_arch=arm64', |
|||
}, |
|||
|
|||
'simulate_mipsel': { |
|||
'gn_args': 'target_cpu="x86" v8_target_cpu="mipsel"', |
|||
'gyp_defines': 'target_arch=ia32 v8_target_arch=mipsel', |
|||
}, |
|||
|
|||
'simulate_mips64el': { |
|||
'gn_args': 'target_cpu="x64" v8_target_cpu="mips64el"', |
|||
'gyp_defines': 'target_arch=x64 v8_target_arch=mips64el', |
|||
}, |
|||
|
|||
'simulate_ppc': { |
|||
'gn_args': 'target_cpu="x86" v8_target_cpu="ppc"', |
|||
'gyp_defines': 'target_arch=ia32 v8_target_arch=ppc', |
|||
}, |
|||
|
|||
'simulate_ppc64': { |
|||
'gn_args': 'target_cpu="x64" v8_target_cpu="ppc64"', |
|||
'gyp_defines': 'target_arch=x64 v8_target_arch=ppc64', |
|||
}, |
|||
|
|||
'simulate_s390': { |
|||
'gn_args': 'target_cpu="x86" v8_target_cpu="s390"', |
|||
'gyp_defines': 'target_arch=ia32 v8_target_arch=s390', |
|||
}, |
|||
|
|||
'simulate_s390x': { |
|||
'gn_args': 'target_cpu="x64" v8_target_cpu="s390x"', |
|||
'gyp_defines': 'target_arch=x64 v8_target_arch=s390x', |
|||
}, |
|||
|
|||
'simulate_x87': { |
|||
'gn_args': 'target_cpu="x86" v8_target_cpu="x87"', |
|||
'gyp_defines': 'target_arch=ia32 v8_target_arch=x87', |
|||
}, |
|||
|
|||
'static': { |
|||
'gn_args': 'is_component_build=false', |
|||
'gyp_defines': 'component=static_library', |
|||
}, |
|||
|
|||
'swarming': { |
|||
'gn_args': 'v8_test_isolation_mode="prepare"', |
|||
'gyp_defines': 'test_isolation_mode=prepare', |
|||
}, |
|||
|
|||
# TODO(machenbach): Remove the symbolized config after the bots are gone. |
|||
'symbolized': { |
|||
'gn_args': 'symbolized=true', |
|||
'gyp_defines': |
|||
'release_extra_cflags="-fno-inline-functions -fno-inline"', |
|||
}, |
|||
|
|||
'tsan': { |
|||
'gn_args': 'is_tsan=true', |
|||
'gyp_defines': 'clang=1 tsan=1', |
|||
}, |
|||
|
|||
'valgrind': { |
|||
'gn_args': 'v8_has_valgrind=true', |
|||
'gyp_defines': 'has_valgrind=1', |
|||
}, |
|||
|
|||
'v8_no_i18n': { |
|||
'gn_args': 'v8_enable_i18n_support=false', |
|||
'gyp_defines': 'v8_enable_i18n_support=0', |
|||
}, |
|||
|
|||
'v8_enable_disassembler': { |
|||
'gn_args': 'v8_enable_disassembler=true', |
|||
'gyp_defines': 'v8_enable_disassembler=1', |
|||
}, |
|||
|
|||
'v8_enable_slow_dchecks': { |
|||
'gn_args': 'v8_enable_slow_dchecks=true', |
|||
'gyp_defines': 'v8_enable_slow_dchecks=1', |
|||
}, |
|||
|
|||
'v8_enable_verify_predictable': { |
|||
'gn_args': 'v8_enable_verify_predictable=true', |
|||
'gyp_defines': 'v8_enable_verify_predictable=1', |
|||
}, |
|||
|
|||
'v8_enable_vtunejit': { |
|||
'gn_args': 'v8_enable_vtunejit=true', |
|||
'gyp_defines': 'v8_enable_vtunejit=1', |
|||
}, |
|||
|
|||
'v8_full_debug': { |
|||
'gn_args': 'v8_optimized_debug=false', |
|||
'gyp_defines': 'v8_optimized_debug=0', |
|||
}, |
|||
|
|||
'v8_interpreted_regexp': { |
|||
'gn_args': 'v8_interpreted_regexp=true', |
|||
'gyp_defines': 'v8_interpreted_regexp=1', |
|||
}, |
|||
|
|||
'v8_optimized_debug': { |
|||
# This is the default in gn for debug. |
|||
'gyp_defines': 'v8_optimized_debug=1', |
|||
}, |
|||
|
|||
'v8_snapshot_custom': { |
|||
# GN path is relative to project root. |
|||
'gn_args': 'v8_embed_script="test/mjsunit/mjsunit.js"', |
|||
|
|||
# Gyp path is relative to src/v8.gyp. |
|||
'gyp_defines': 'embed_script=../test/mjsunit/mjsunit.js', |
|||
}, |
|||
|
|||
'v8_snapshot_internal': { |
|||
'gn_args': 'v8_use_external_startup_data=false', |
|||
'gyp_defines': 'v8_use_external_startup_data=0', |
|||
}, |
|||
|
|||
'v8_snapshot_none': { |
|||
'gn_args': 'v8_use_snapshot=false', |
|||
'gyp_defines': 'v8_use_snapshot=false', |
|||
}, |
|||
|
|||
'v8_verify_heap': { |
|||
'gn_args': 'v8_enable_verify_heap=true', |
|||
'gyp_defines': 'v8_enable_verify_heap=1', |
|||
}, |
|||
|
|||
'x64': { |
|||
'gn_args': 'target_cpu="x64"', |
|||
'gyp_defines': 'target_arch=x64', |
|||
}, |
|||
|
|||
'x86': { |
|||
'gn_args': 'target_cpu="x86"', |
|||
'gyp_defines': 'target_arch=ia32', |
|||
}, |
|||
}, |
|||
} |
@ -0,0 +1,116 @@ |
|||
// Copyright 2016 the V8 project authors. All rights reserved.
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
|||
// found in the LICENSE file.
|
|||
|
|||
#include "src/api-arguments.h" |
|||
|
|||
#include "src/tracing/trace-event.h" |
|||
#include "src/vm-state-inl.h" |
|||
|
|||
namespace v8 { |
|||
namespace internal { |
|||
|
|||
#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(F) \ |
|||
F(AccessorNameGetterCallback, "get", v8::Value, Object) \ |
|||
F(GenericNamedPropertyQueryCallback, "has", v8::Integer, Object) \ |
|||
F(GenericNamedPropertyDeleterCallback, "delete", v8::Boolean, Object) |
|||
|
|||
#define WRITE_CALL_1_NAME(Function, type, ApiReturn, InternalReturn) \ |
|||
Handle<InternalReturn> PropertyCallbackArguments::Call(Function f, \ |
|||
Handle<Name> name) { \ |
|||
Isolate* isolate = this->isolate(); \ |
|||
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ |
|||
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \ |
|||
isolate, &tracing::TraceEventStatsTable::Function); \ |
|||
VMState<EXTERNAL> state(isolate); \ |
|||
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ |
|||
PropertyCallbackInfo<ApiReturn> info(begin()); \ |
|||
LOG(isolate, \ |
|||
ApiNamedPropertyAccess("interceptor-named-" type, holder(), *name)); \ |
|||
f(v8::Utils::ToLocal(name), info); \ |
|||
return GetReturnValue<InternalReturn>(isolate); \ |
|||
} |
|||
|
|||
FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(WRITE_CALL_1_NAME) |
|||
|
|||
#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME |
|||
#undef WRITE_CALL_1_NAME |
|||
|
|||
#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(F) \ |
|||
F(IndexedPropertyGetterCallback, "get", v8::Value, Object) \ |
|||
F(IndexedPropertyQueryCallback, "has", v8::Integer, Object) \ |
|||
F(IndexedPropertyDeleterCallback, "delete", v8::Boolean, Object) |
|||
|
|||
#define WRITE_CALL_1_INDEX(Function, type, ApiReturn, InternalReturn) \ |
|||
Handle<InternalReturn> PropertyCallbackArguments::Call(Function f, \ |
|||
uint32_t index) { \ |
|||
Isolate* isolate = this->isolate(); \ |
|||
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ |
|||
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \ |
|||
isolate, &tracing::TraceEventStatsTable::Function); \ |
|||
VMState<EXTERNAL> state(isolate); \ |
|||
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ |
|||
PropertyCallbackInfo<ApiReturn> info(begin()); \ |
|||
LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" type, \ |
|||
holder(), index)); \ |
|||
f(index, info); \ |
|||
return GetReturnValue<InternalReturn>(isolate); \ |
|||
} |
|||
|
|||
FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(WRITE_CALL_1_INDEX) |
|||
|
|||
#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX |
|||
#undef WRITE_CALL_1_INDEX |
|||
|
|||
Handle<Object> PropertyCallbackArguments::Call( |
|||
GenericNamedPropertySetterCallback f, Handle<Name> name, |
|||
Handle<Object> value) { |
|||
Isolate* isolate = this->isolate(); |
|||
RuntimeCallTimerScope timer( |
|||
isolate, &RuntimeCallStats::GenericNamedPropertySetterCallback); |
|||
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
|||
isolate, |
|||
&tracing::TraceEventStatsTable::GenericNamedPropertySetterCallback); |
|||
VMState<EXTERNAL> state(isolate); |
|||
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); |
|||
PropertyCallbackInfo<v8::Value> info(begin()); |
|||
LOG(isolate, |
|||
ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); |
|||
f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); |
|||
return GetReturnValue<Object>(isolate); |
|||
} |
|||
|
|||
Handle<Object> PropertyCallbackArguments::Call(IndexedPropertySetterCallback f, |
|||
uint32_t index, |
|||
Handle<Object> value) { |
|||
Isolate* isolate = this->isolate(); |
|||
RuntimeCallTimerScope timer(isolate, |
|||
&RuntimeCallStats::IndexedPropertySetterCallback); |
|||
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
|||
isolate, &tracing::TraceEventStatsTable::IndexedPropertySetterCallback); |
|||
VMState<EXTERNAL> state(isolate); |
|||
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); |
|||
PropertyCallbackInfo<v8::Value> info(begin()); |
|||
LOG(isolate, |
|||
ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index)); |
|||
f(index, v8::Utils::ToLocal(value), info); |
|||
return GetReturnValue<Object>(isolate); |
|||
} |
|||
|
|||
void PropertyCallbackArguments::Call(AccessorNameSetterCallback f, |
|||
Handle<Name> name, Handle<Object> value) { |
|||
Isolate* isolate = this->isolate(); |
|||
RuntimeCallTimerScope timer(isolate, |
|||
&RuntimeCallStats::AccessorNameSetterCallback); |
|||
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
|||
isolate, &tracing::TraceEventStatsTable::AccessorNameSetterCallback); |
|||
VMState<EXTERNAL> state(isolate); |
|||
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); |
|||
PropertyCallbackInfo<void> info(begin()); |
|||
LOG(isolate, |
|||
ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); |
|||
f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); |
|||
} |
|||
|
|||
} // namespace internal
|
|||
} // namespace v8
|
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,64 @@ |
|||
// Copyright 2016 the V8 project authors. All rights reserved.
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
|||
// found in the LICENSE file.
|
|||
|
|||
#include "src/eh-frame.h" |
|||
|
|||
namespace v8 { |
|||
namespace internal { |
|||
|
|||
static const int kR0DwarfCode = 0; |
|||
static const int kFpDwarfCode = 11; |
|||
static const int kSpDwarfCode = 13; |
|||
static const int kLrDwarfCode = 14; |
|||
|
|||
const int EhFrameConstants::kCodeAlignmentFactor = 4; |
|||
const int EhFrameConstants::kDataAlignmentFactor = -4; |
|||
|
|||
void EhFrameWriter::WriteReturnAddressRegisterCode() { |
|||
WriteULeb128(kLrDwarfCode); |
|||
} |
|||
|
|||
void EhFrameWriter::WriteInitialStateInCie() { |
|||
SetBaseAddressRegisterAndOffset(fp, 0); |
|||
RecordRegisterNotModified(lr); |
|||
} |
|||
|
|||
// static
|
|||
int EhFrameWriter::RegisterToDwarfCode(Register name) { |
|||
switch (name.code()) { |
|||
case Register::kCode_fp: |
|||
return kFpDwarfCode; |
|||
case Register::kCode_sp: |
|||
return kSpDwarfCode; |
|||
case Register::kCode_lr: |
|||
return kLrDwarfCode; |
|||
case Register::kCode_r0: |
|||
return kR0DwarfCode; |
|||
default: |
|||
UNIMPLEMENTED(); |
|||
return -1; |
|||
} |
|||
} |
|||
|
|||
#ifdef ENABLE_DISASSEMBLER |
|||
|
|||
// static
|
|||
const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) { |
|||
switch (code) { |
|||
case kFpDwarfCode: |
|||
return "fp"; |
|||
case kSpDwarfCode: |
|||
return "sp"; |
|||
case kLrDwarfCode: |
|||
return "lr"; |
|||
default: |
|||
UNIMPLEMENTED(); |
|||
return nullptr; |
|||
} |
|||
} |
|||
|
|||
#endif |
|||
|
|||
} // namespace internal
|
|||
} // namespace v8
|
File diff suppressed because it is too large
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue