Commit 9095b279 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[build] Enable slow-fast-switch feature on a subset of bots

This prefixes the flag to be more uniform with existing flags and makes
it available as a gn argument.

The switch feature is enabled on a subset of bots, the linux64 release
trybot and all sanitizers. Note, this doesn't switch to slow paths -
it just allows to use the runtime flag on those bots.

Bug: v8:7120
Change-Id: I706a7a9bd503c13d5432cac9a13a909f4f32a0a7
Reviewed-on: https://chromium-review.googlesource.com/798412Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49739}
parent abe77c57
...@@ -89,6 +89,9 @@ declare_args() { ...@@ -89,6 +89,9 @@ declare_args() {
# Sets -dV8_CONCURRENT_MARKING # Sets -dV8_CONCURRENT_MARKING
v8_enable_concurrent_marking = true v8_enable_concurrent_marking = true
# Sets -dV8_ENABLE_SLOWFAST_SWITCH
v8_enable_slow_fast_switch = ""
# Build the snapshot with unwinding information for perf. # Build the snapshot with unwinding information for perf.
# Sets -dV8_USE_SNAPSHOT_WITH_UNWINDING_INFO. # Sets -dV8_USE_SNAPSHOT_WITH_UNWINDING_INFO.
v8_perf_prof_unwinding_info = false v8_perf_prof_unwinding_info = false
...@@ -149,6 +152,9 @@ if (v8_enable_disassembler == "") { ...@@ -149,6 +152,9 @@ if (v8_enable_disassembler == "") {
if (v8_enable_trace_maps == "") { if (v8_enable_trace_maps == "") {
v8_enable_trace_maps = is_debug v8_enable_trace_maps = is_debug
} }
if (v8_enable_slow_fast_switch == "") {
v8_enable_slow_fast_switch = is_debug
}
if (v8_enable_v8_checks == "") { if (v8_enable_v8_checks == "") {
v8_enable_v8_checks = is_debug v8_enable_v8_checks = is_debug
} }
...@@ -275,6 +281,9 @@ config("features") { ...@@ -275,6 +281,9 @@ config("features") {
if (v8_enable_trace_feedback_updates) { if (v8_enable_trace_feedback_updates) {
defines += [ "V8_TRACE_FEEDBACK_UPDATES" ] defines += [ "V8_TRACE_FEEDBACK_UPDATES" ]
} }
if (v8_enable_slow_fast_switch) {
defines += [ "V8_ENABLE_SLOWFAST_SWITCH" ]
}
if (v8_enable_v8_checks) { if (v8_enable_v8_checks) {
defines += [ "V8_ENABLE_CHECKS" ] defines += [ "V8_ENABLE_CHECKS" ]
} }
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
'v8_linux_gcc_rel': 'gn_release_x86_gcc_minimal_symbols', 'v8_linux_gcc_rel': 'gn_release_x86_gcc_minimal_symbols',
'v8_linux_shared_compile_rel': 'gn_release_x86_shared_verify_heap', 'v8_linux_shared_compile_rel': 'gn_release_x86_shared_verify_heap',
'v8_linux64_gcc_compile_dbg': 'gn_debug_x64_gcc', 'v8_linux64_gcc_compile_dbg': 'gn_debug_x64_gcc',
'v8_linux64_rel_ng': 'gn_release_x64_trybot', 'v8_linux64_rel_ng': 'gn_release_x64_test_features_trybot',
'v8_linux64_verify_csa_rel_ng': 'gn_release_x64_verify_csa', 'v8_linux64_verify_csa_rel_ng': 'gn_release_x64_verify_csa',
'v8_linux64_gyp_rel_ng': 'gyp_release_x64', 'v8_linux64_gyp_rel_ng': 'gyp_release_x64',
'v8_linux64_asan_rel_ng': 'gn_release_x64_asan_minimal_symbols', 'v8_linux64_asan_rel_ng': 'gn_release_x64_asan_minimal_symbols',
...@@ -428,6 +428,8 @@ ...@@ -428,6 +428,8 @@
'gn', 'release_bot', 'x64', 'minimal_symbols', 'swarming'], 'gn', 'release_bot', 'x64', 'minimal_symbols', 'swarming'],
'gn_release_x64_trybot': [ 'gn_release_x64_trybot': [
'gn', 'release_trybot', 'x64', 'swarming'], 'gn', 'release_trybot', 'x64', 'swarming'],
'gn_release_x64_test_features_trybot': [
'gn', 'release_trybot', 'x64', 'swarming', 'v8_enable_slow_fast_switch'],
'gn_release_x64_tsan': [ 'gn_release_x64_tsan': [
'gn', 'release_bot', 'x64', 'tsan', 'swarming'], 'gn', 'release_bot', 'x64', 'tsan', 'swarming'],
'gn_release_x64_tsan_concurrent_marking': [ 'gn_release_x64_tsan_concurrent_marking': [
...@@ -555,6 +557,7 @@ ...@@ -555,6 +557,7 @@
}, },
'asan': { 'asan': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': 'is_asan=true', 'gn_args': 'is_asan=true',
'gyp_defines': 'clang=1 asan=1', 'gyp_defines': 'clang=1 asan=1',
}, },
...@@ -565,12 +568,14 @@ ...@@ -565,12 +568,14 @@
}, },
'cfi': { 'cfi': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': ('is_cfi=true use_cfi_cast=true use_cfi_diag=true ' 'gn_args': ('is_cfi=true use_cfi_cast=true use_cfi_diag=true '
'use_cfi_recover=false'), 'use_cfi_recover=false'),
'gyp_defines': 'cfi_vptr=1 cfi_diag=1', 'gyp_defines': 'cfi_vptr=1 cfi_diag=1',
}, },
'cfi_clusterfuzz': { 'cfi_clusterfuzz': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': ('is_cfi=true use_cfi_cast=true use_cfi_diag=true ' 'gn_args': ('is_cfi=true use_cfi_cast=true use_cfi_diag=true '
'use_cfi_recover=true'), 'use_cfi_recover=true'),
'gyp_defines': 'cfi_vptr=1 cfi_diag=1', 'gyp_defines': 'cfi_vptr=1 cfi_diag=1',
...@@ -647,6 +652,7 @@ ...@@ -647,6 +652,7 @@
}, },
'lsan': { 'lsan': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': 'is_lsan=true', 'gn_args': 'is_lsan=true',
'gyp_defines': 'lsan=1', 'gyp_defines': 'lsan=1',
}, },
...@@ -662,11 +668,13 @@ ...@@ -662,11 +668,13 @@
}, },
'msan': { 'msan': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': ('is_msan=true msan_track_origins=2 ' 'gn_args': ('is_msan=true msan_track_origins=2 '
'use_prebuilt_instrumented_libraries=true'), 'use_prebuilt_instrumented_libraries=true'),
}, },
'msan_no_origins': { 'msan_no_origins': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': ('is_msan=true msan_track_origins=0 ' 'gn_args': ('is_msan=true msan_track_origins=0 '
'use_prebuilt_instrumented_libraries=true'), 'use_prebuilt_instrumented_libraries=true'),
}, },
...@@ -756,11 +764,13 @@ ...@@ -756,11 +764,13 @@
}, },
'tsan': { 'tsan': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': 'is_tsan=true', 'gn_args': 'is_tsan=true',
'gyp_defines': 'clang=1 tsan=1', 'gyp_defines': 'clang=1 tsan=1',
}, },
'ubsan_vptr': { 'ubsan_vptr': {
'mixins': ['v8_enable_slow_fast_switch'],
# TODO(krasin): Remove is_ubsan_no_recover=true when # TODO(krasin): Remove is_ubsan_no_recover=true when
# https://llvm.org/bugs/show_bug.cgi?id=25569 is fixed and just use # https://llvm.org/bugs/show_bug.cgi?id=25569 is fixed and just use
# ubsan_vptr instead. # ubsan_vptr instead.
...@@ -768,6 +778,7 @@ ...@@ -768,6 +778,7 @@
}, },
'ubsan_vptr_recover': { 'ubsan_vptr_recover': {
'mixins': ['v8_enable_slow_fast_switch'],
# Ubsan vptr with recovery. # Ubsan vptr with recovery.
'gn_args': 'is_ubsan_vptr=true is_ubsan_no_recover=false', 'gn_args': 'is_ubsan_vptr=true is_ubsan_no_recover=false',
}, },
...@@ -782,6 +793,7 @@ ...@@ -782,6 +793,7 @@
}, },
'v8_correctness_fuzzer': { 'v8_correctness_fuzzer': {
'mixins': ['v8_enable_slow_fast_switch'],
'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true', 'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true',
}, },
...@@ -795,6 +807,10 @@ ...@@ -795,6 +807,10 @@
'gyp_defines': 'v8_enable_slow_dchecks=1', 'gyp_defines': 'v8_enable_slow_dchecks=1',
}, },
'v8_enable_slow_fast_switch': {
'gn_args': 'v8_enable_slow_fast_switch=true',
},
'v8_enable_verify_predictable': { 'v8_enable_verify_predictable': {
'gn_args': 'v8_enable_verify_predictable=true', 'gn_args': 'v8_enable_verify_predictable=true',
'gyp_defines': 'v8_enable_verify_predictable=1', 'gyp_defines': 'v8_enable_verify_predictable=1',
......
...@@ -3273,7 +3273,7 @@ class TypedElementsAccessor ...@@ -3273,7 +3273,7 @@ class TypedElementsAccessor
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
DisallowJavascriptExecution no_js(isolate); DisallowJavascriptExecution no_js(isolate);
#if defined(DEBUG) || defined(ENABLE_SLOWFAST_SWITCH) #if defined(V8_ENABLE_SLOWFAST_SWITCH)
if (isolate->force_slow_path()) return true; if (isolate->force_slow_path()) return true;
#endif #endif
......
...@@ -2613,7 +2613,7 @@ bool Object::IterationHasObservableEffects() { ...@@ -2613,7 +2613,7 @@ bool Object::IterationHasObservableEffects() {
JSArray* array = JSArray::cast(this); JSArray* array = JSArray::cast(this);
Isolate* isolate = array->GetIsolate(); Isolate* isolate = array->GetIsolate();
#if defined(DEBUG) || defined(ENABLE_SLOWFAST_SWITCH) #if defined(V8_ENABLE_SLOWFAST_SWITCH)
if (isolate->force_slow_path()) return true; if (isolate->force_slow_path()) return true;
#endif #endif
......
...@@ -134,7 +134,7 @@ bool RegExpUtils::IsUnmodifiedRegExp(Isolate* isolate, Handle<Object> obj) { ...@@ -134,7 +134,7 @@ bool RegExpUtils::IsUnmodifiedRegExp(Isolate* isolate, Handle<Object> obj) {
// TODO(ishell): Update this check once map changes for constant field // TODO(ishell): Update this check once map changes for constant field
// tracking are landing. // tracking are landing.
#if defined(DEBUG) || defined(ENABLE_SLOWFAST_SWITCH) #if defined(V8_ENABLE_SLOWFAST_SWITCH)
if (isolate->force_slow_path()) return false; if (isolate->force_slow_path()) return false;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment