[infra] Add TSAN CQ and CI builders with debug/dchecks

Bug: v8:13548
Change-Id: I4d0acf20ec27870540782fc7c2555286b8d7a4c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4066480
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85074}
This commit is contained in:
Al Muthanna Athamina 2022-12-21 15:25:11 +01:00 committed by V8 LUCI CQ
parent dd68531420
commit d7fa9b66dc
10 changed files with 77 additions and 9 deletions

View File

@ -2350,6 +2350,8 @@ action("v8_dump_build_config") {
"v8_control_flow_integrity=$v8_control_flow_integrity",
"v8_target_cpu=\"$v8_target_cpu\"",
"v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack",
"v8_enable_verify_heap=$v8_enable_verify_heap",
"v8_enable_slow_dchecks=$v8_enable_slow_dchecks",
]
if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {

View File

@ -102,6 +102,7 @@
# Sanitizers.
'V8 Linux64 ASAN - builder': 'release_x64_asan',
'V8 Linux64 TSAN - builder': 'release_x64_tsan',
'V8 Linux64 TSAN - debug builder': 'debug_x64_tsan_minimal_symbols',
'V8 Linux64 TSAN - no-concurrent-marking - builder': 'release_x64_tsan_no_cm',
'V8 Linux - arm64 - sim - CFI - builder': 'release_simulate_arm64_cfi',
'V8 Linux - arm64 - sim - MSAN - builder': 'release_simulate_arm64_msan',
@ -257,6 +258,7 @@
'v8_linux_riscv32_compile_rel': 'release_simulate_riscv32',
'v8_linux64_riscv64_compile_rel': 'release_simulate_riscv64',
'v8_linux64_tsan_compile_rel': 'release_x64_tsan_minimal_symbols',
'v8_linux64_tsan_compile_dbg': 'debug_x64_tsan_minimal_symbols',
'v8_linux64_tsan_no_cm_compile_rel': 'release_x64_tsan_no_cm',
'v8_linux64_tsan_isolates_compile_rel':
'release_x64_tsan_minimal_symbols',
@ -599,6 +601,9 @@
'debug_trybot', 'x64', 'v8_enable_dict_property_const_tracking'],
'debug_x64_trybot_custom': [
'debug_trybot', 'x64', 'v8_snapshot_custom'],
'debug_x64_tsan_minimal_symbols': [
'debug_bot_no_slow_dchecks', 'minimal_symbols', 'x64', 'dcheck_always_on',
'tsan', 'v8_disable_verify_heap', 'v8_fast_mksnapshot'],
'full_debug_x64': [
'debug_bot', 'x64', 'v8_full_debug'],
@ -712,6 +717,12 @@
'gn_args': 'is_debug=true v8_enable_backtrace=true',
},
'debug_bot_no_slow_dchecks': {
'mixins': [
'debug', 'shared', 'goma', 'v8_disable_slow_dchecks',
'v8_optimized_debug', 'v8_enable_google_benchmark'],
},
'debug_bot': {
'mixins': [
'debug', 'shared', 'goma', 'v8_enable_slow_dchecks',
@ -934,6 +945,10 @@
'gn_args': 'v8_enable_runtime_call_stats=false',
},
'v8_disable_verify_heap': {
'gn_args': 'v8_enable_verify_heap=false',
},
'v8_expose_memory_corruption_api': {
'gn_args': 'v8_expose_memory_corruption_api=true',
},
@ -946,6 +961,10 @@
'gn_args': 'v8_enable_slow_dchecks=true',
},
'v8_disable_slow_dchecks': {
'gn_args': 'v8_enable_slow_dchecks=false',
},
'v8_enable_javascript_promise_hooks': {
'gn_args': 'v8_enable_javascript_promise_hooks=true',
},
@ -981,6 +1000,10 @@
'gn_args': 'v8_enable_vtunejit=true v8_enable_vtunetracemark=true',
},
'v8_fast_mksnapshot': {
'gn_args': 'v8_enable_fast_mksnapshot=true',
},
'v8_full_debug': {
'gn_args': 'v8_optimized_debug=false',
},

View File

@ -672,6 +672,18 @@
{'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2},
],
},
'v8_linux64_tsan_dbg': {
'swarming_dimensions' : {
'os': 'Ubuntu-18.04',
},
'tests': [
{'name': 'benchmarks', 'shards': 2},
{'name': 'mozilla', 'shards': 4},
{'name': 'test262', 'variant': 'default', 'shards': 5},
{'name': 'v8testing', 'shards': 12},
{'name': 'v8testing', 'variant': 'extra', 'shards': 10},
],
},
'v8_linux64_tsan_no_cm_rel': {
'swarming_dimensions' : {
'os': 'Ubuntu-18.04',
@ -1671,6 +1683,18 @@
{'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2},
],
},
'V8 Linux64 TSAN - debug': {
'swarming_dimensions' : {
'os': 'Ubuntu-18.04',
},
'tests': [
{'name': 'benchmarks', 'shards': 2},
{'name': 'mozilla', 'shards': 4},
{'name': 'test262', 'variant': 'default', 'shards': 5},
{'name': 'v8testing', 'shards': 12},
{'name': 'v8testing', 'variant': 'extra', 'shards': 10},
],
},
'V8 Linux64 TSAN - stress-incremental-marking': {
'swarming_dimensions' : {
'os': 'Ubuntu-18.04',

View File

@ -90,16 +90,8 @@ TEST_MAP = {
ModeConfig = namedtuple(
'ModeConfig', 'label flags timeout_scalefactor status_mode')
DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"]
RELEASE_FLAGS = ["--nohard-abort"]
DEBUG_MODE = ModeConfig(
label='debug',
flags=DEBUG_FLAGS,
timeout_scalefactor=4,
status_mode="debug",
)
RELEASE_MODE = ModeConfig(
label='release',
flags=RELEASE_FLAGS,
@ -390,9 +382,22 @@ class BaseTestRunner(object):
print(">>> Latest GN build found: %s" % latest_config)
return os.path.join(DEFAULT_OUT_GN, latest_config)
def _custom_debug_mode(self):
custom_debug_flags = ["--nohard-abort"]
if self.build_config.verify_heap:
custom_debug_flags += ["--verify-heap"]
if self.build_config.slow_dchecks:
custom_debug_flags += ["--enable-slow-asserts"]
return ModeConfig(
label='debug',
flags=custom_debug_flags,
timeout_scalefactor=4,
status_mode="debug",
)
def _process_default_options(self):
if self.build_config.is_debug:
self.mode_options = DEBUG_MODE
self.mode_options = self._custom_debug_mode()
elif self.build_config.dcheck_always_on:
self.mode_options = TRY_RELEASE_MODE
else:

View File

@ -44,6 +44,8 @@ class BuildConfig(object):
# TODO(machenbach): We only have ubsan not ubsan_vptr.
self.ubsan_vptr = build_config['is_ubsan_vptr']
self.verify_csa = build_config['v8_enable_verify_csa']
self.verify_heap = build_config['v8_enable_verify_heap']
self.slow_dchecks = build_config['v8_enable_slow_dchecks']
self.lite_mode = build_config['v8_enable_lite_mode']
self.pointer_compression = build_config['v8_enable_pointer_compression']
self.pointer_compression_shared_cage = build_config[
@ -152,6 +154,8 @@ class BuildConfig(object):
'third_party_heap',
'webassembly',
'dict_property_const_tracking',
'verify_heap',
'slow_dchecks',
]
detected_options = [attr for attr in attrs if getattr(self, attr, False)]
return '\n'.join(detected_options)

View File

@ -20,6 +20,8 @@
"v8_enable_conservative_stack_scanning": false,
"v8_enable_concurrent_marking": true,
"v8_enable_verify_csa": false,
"v8_enable_verify_heap": false,
"v8_enable_slow_dchecks": false,
"v8_enable_lite_mode": false,
"v8_enable_pointer_compression": true,
"v8_enable_pointer_compression_shared_cage": true,

View File

@ -20,6 +20,8 @@
"v8_enable_conservative_stack_scanning": false,
"v8_enable_concurrent_marking": true,
"v8_enable_verify_csa": false,
"v8_enable_verify_heap": false,
"v8_enable_slow_dchecks": false,
"v8_enable_lite_mode": false,
"v8_enable_pointer_compression": false,
"v8_enable_pointer_compression_shared_cage": false,

View File

@ -20,6 +20,8 @@
"v8_enable_conservative_stack_scanning": false,
"v8_enable_concurrent_marking": true,
"v8_enable_verify_csa": false,
"v8_enable_verify_heap": false,
"v8_enable_slow_dchecks": false,
"v8_enable_lite_mode": false,
"v8_enable_pointer_compression": true,
"v8_enable_pointer_compression_shared_cage": true,

View File

@ -20,6 +20,8 @@
"v8_enable_conservative_stack_scanning": false,
"v8_enable_concurrent_marking": true,
"v8_enable_verify_csa": false,
"v8_enable_verify_heap": false,
"v8_enable_slow_dchecks": false,
"v8_enable_lite_mode": false,
"v8_enable_pointer_compression": true,
"v8_enable_pointer_compression_shared_cage": true,

View File

@ -20,6 +20,8 @@
"v8_enable_conservative_stack_scanning": false,
"v8_enable_concurrent_marking": true,
"v8_enable_verify_csa": false,
"v8_enable_verify_heap": false,
"v8_enable_slow_dchecks": false,
"v8_enable_lite_mode": false,
"v8_enable_pointer_compression": true,
"v8_enable_pointer_compression_shared_cage": true,