Skip to content

Commit

Permalink
Remove the syzygy optimization code.
Browse files Browse the repository at this point in the history
BUG=651078

Review-Url: https://codereview.chromium.org/2420943002
Cr-Commit-Position: refs/heads/master@{#425775}
  • Loading branch information
sebmarchand authored and Commit bot committed Oct 17, 2016
1 parent d9dc272 commit dc24dfd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 101 deletions.
3 changes: 1 addition & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ if (is_win) {
]
}

# TODO(sebmarchand): Remove this once we stop supporting Syzygy (M54+).
group("All_syzygy") {
if (is_syzyasan || syzygy_optimize) {
if (is_syzyasan) {
deps = [
"//chrome/installer/mini_installer:mini_installer",
"//chrome/installer/mini_installer:mini_installer_syzygy",
Expand Down
7 changes: 0 additions & 7 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ declare_args() {
}
}

declare_args() {
# Generate Syzygy optimized binaries. Syzygy optimize mode is a profile
# guided optimization that reorders code for better locality.
syzygy_optimize = is_win && target_cpu == "x86" && is_official_build &&
!is_clang && !is_win_fastlink && !is_syzyasan
}

declare_args() {
# Whether to use the gold linker from binutils instead of lld or bfd.
use_gold = !use_lld && !(is_chromecast && is_linux &&
Expand Down
51 changes: 0 additions & 51 deletions build/win/syzygy/syzygy.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,6 @@ assert(is_win)
# Where the output binaries will be placed.
syzygy_dest_dir = "$root_out_dir/syzygy"

# Generates a Syzygy optimize target.
#
# binary_name (required)
# Name of the binary to be instrumented, with no extension or path. This
# binary_name is assumed to be in the output directory and must be
# generated by a dependency of this target.
#
# deps (required)
# Normal meaning.
#
# data_deps
# Normal meaning.
template("syzygy_optimize") {
action(target_name) {
if (defined(invoker.visibility)) {
visibility = invoker.visibility
}
script = "//build/win/syzygy/reorder.py"

binary_name = invoker.binary_name
input_dll = "$root_out_dir/$binary_name"
input_pdb = "$root_out_dir/$binary_name.pdb"

inputs = [
input_dll,
#input_pdb,
]

outputs = [
"$syzygy_dest_dir/$binary_name",
"$syzygy_dest_dir/$binary_name.pdb",
]

args = [
"--input_executable",
rebase_path(input_dll, root_build_dir),
"--input_symbol",
rebase_path(input_pdb, root_build_dir),
"--destination_dir",
rebase_path(syzygy_dest_dir, root_build_dir),
]

forward_variables_from(invoker,
[
"deps",
"data_deps",
"public_deps",
])
}
}

# Instruments a binary with SyzyAsan.
#
# binary_name (required)
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/mini_installer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ generate_mini_installer("mini_installer") {
chrome_dll_target = "//chrome:main_dll"
}

if (syzygy_optimize || is_syzyasan) {
if (is_syzyasan) {
generate_mini_installer("mini_installer_syzygy") {
out_dir = "$root_out_dir/syzygy/"
chrome_dll_file = "$root_out_dir/syzygy/chrome.dll"
Expand Down
18 changes: 3 additions & 15 deletions chrome/tools/build/win/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -438,25 +438,13 @@ FILES = [
# Syzygy modified binaries and related files. Only add to this section if you
# know what you're doing! The build configuration has to be modified to run
# Syzygy on the target in question before adding a staging dependency here!
{
'filename': 'chrome.dll-order.json',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'chrome_child.dll-order.json',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'syzygy/chrome.dll',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
'archive': 'syzygy/chrome.dll',
'filegroup': ['symsrc'],
'optional': ['dev'],
'optional': ['dev', 'official'],
},
{
'filename': 'syzygy/chrome_child.dll',
Expand All @@ -480,14 +468,14 @@ FILES = [
'buildtype': ['dev', 'official'],
'archive': 'syzygy/mini_installer.exe',
'filegroup': ['symsrc'],
'optional': ['dev'],
'optional': ['dev', 'official'],
},
{
'filename': 'syzygy/chrome.packed.7z',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
'archive': 'syzygy/chrome.packed.7z',
'optional': ['dev'],
'optional': ['dev', 'official'],
},
{
'filename': 'syzygy/syzyasan_rtl.dll',
Expand Down
26 changes: 1 addition & 25 deletions chrome/tools/build/win/syzygy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,10 @@ import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/win/syzygy/syzygy.gni")

assert(!syzygy_optimize || !is_syzyasan,
"Don't do both syzygy_optimize and is_syzyasan")

# Where the output binaries will be placed.
syzygy_dest_dir = "$root_out_dir/syzygy"

if (syzygy_optimize) {
syzygy_optimize("chrome_dll_syzygy") {
binary_name = "chrome.dll"
deps = [
"//chrome:main_dll",
]
if (is_multi_dll_chrome) {
data_deps = [
":chrome_child_dll_syzygy",
]
}
}
if (is_multi_dll_chrome) {
# Also instrument chrome_child.dll.
syzygy_optimize("chrome_child_dll_syzygy") {
binary_name = "chrome_child.dll"
deps = [
"//chrome:chrome_child",
]
}
}
} else if (is_syzyasan) {
if (is_syzyasan) {
syzygy_asan("chrome_dll_syzygy") {
binary_name = "chrome.dll"
dest_dir = syzygy_dest_dir
Expand Down

0 comments on commit dc24dfd

Please sign in to comment.