Commit e6c13851 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[foozzie] Correctness-compare pointer compression build

This adds a fake toolchain for pointer compression, used for
correctness fuzzing. The toolchain enables us to have an extra build
with inverse pointer-compression defaults side-by-side.

The extra build is used similarly to existing x64/x86 comparisons,
except that we now compare builds with different compile-time flags.

Change-Id: I75491371262204b86eaa006ca8d04848f49121ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1829275Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64123}
parent 43cc21a1
......@@ -202,6 +202,15 @@ declare_args() {
v8_enable_regexp_interpreter_threaded_dispatch = true
}
# 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
}
# Derived defaults.
if (v8_enable_verify_heap == "") {
v8_enable_verify_heap = v8_enable_debugging_features
......@@ -4085,6 +4094,7 @@ group("v8_clusterfuzz") {
":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
":d8(//build/toolchain/linux:clang_x86)",
":d8(//build/toolchain/linux:clang_x86_v8_arm)",
":d8(tools/clusterfuzz/toolchain:clang_x64_pointer_compression)",
]
}
}
......
# Copyright 2019 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.
import("//build/toolchain/gcc_toolchain.gni")
# Fake toolchain to enable build output for a pointer-compression-comparison
# build in a nested build sub-directory. We toggle pointer compression when
# this toolchain is used in v8/BUILD.gn.
clang_toolchain("clang_x64_pointer_compression") {
toolchain_args = {
current_cpu = "x64"
current_os = "linux"
}
}
......@@ -213,14 +213,15 @@ def parse_args():
assert os.path.exists(options.first_d8)
assert os.path.exists(options.second_d8)
# Ensure we make a sane comparison.
if (options.first_d8 == options.second_d8 and
options.first_config == options.second_config):
parser.error('Need either executable or config difference.')
# Infer architecture from build artifacts.
options.first_arch = infer_arch(options.first_d8)
options.second_arch = infer_arch(options.second_d8)
# Ensure we make a sane comparison.
if (options.first_arch == options.second_arch and
options.first_config == options.second_config):
parser.error('Need either arch or config difference.')
assert options.first_arch in SUPPORTED_ARCHS
assert options.second_arch in SUPPORTED_ARCHS
assert options.first_config in CONFIGS
......
......@@ -38,7 +38,7 @@ class ConfigTest(unittest.TestCase):
return 0.5
self.assertEqual(
[
'--first-config=ignition',
'--first-config=ignition_no_ic',
'--second-config=ignition_turbo',
'--second-d8=d8',
'--second-config-extra-flags=--stress-scavenge=100',
......
......@@ -11,16 +11,18 @@ FOOZZIE_EXPERIMENTS = [
[10, 'ignition', 'jitless', 'd8'],
[10, 'ignition', 'slow_path', 'd8'],
[5, 'ignition', 'slow_path_opt', 'd8'],
[26, 'ignition', 'ignition_turbo', 'd8'],
[25, 'ignition', 'ignition_turbo', 'd8'],
[2, 'ignition_no_ic', 'ignition_turbo', 'd8'],
[2, 'ignition', 'ignition_turbo_no_ic', 'd8'],
[18, 'ignition', 'ignition_turbo_opt', 'd8'],
[15, 'ignition', 'ignition_turbo_opt', 'd8'],
[2, 'ignition_no_ic', 'ignition_turbo_opt', 'd8'],
[5, 'ignition_turbo_opt', 'ignition_turbo_opt', 'clang_x86/d8'],
[5, 'ignition_turbo', 'ignition_turbo', 'clang_x86/d8'],
[5, 'ignition', 'ignition', 'clang_x86/d8'],
[5, 'ignition', 'ignition', 'clang_x64_v8_arm64/d8'],
[5, 'ignition', 'ignition', 'clang_x86_v8_arm/d8'],
[4, 'ignition_turbo_opt', 'ignition_turbo_opt', 'clang_x64_pointer_compression/d8'],
[5, 'ignition_turbo', 'ignition_turbo', 'clang_x64_pointer_compression/d8'],
[4, 'ignition_turbo_opt', 'ignition_turbo_opt', 'clang_x86/d8'],
[4, 'ignition_turbo', 'ignition_turbo', 'clang_x86/d8'],
[4, 'ignition', 'ignition', 'clang_x86/d8'],
[4, 'ignition', 'ignition', 'clang_x64_v8_arm64/d8'],
[4, 'ignition', 'ignition', 'clang_x86_v8_arm/d8'],
]
# Additional flag experiments. List of tuples like
......
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