Commit b3002837 authored by prasadv's avatar prasadv Committed by Commit bot

Make perf try jobs for win x64 build x64 binaries.

Perf try jobs running on Win x64 bisect bots should build and run tests on x64 binaries.

BUG=462639

Review URL: https://codereview.chromium.org/961193002

Cr-Commit-Position: refs/heads/master@{#318570}
parent 918b8195
...@@ -1178,7 +1178,12 @@ class BisectPerformanceMetrics(object): ...@@ -1178,7 +1178,12 @@ class BisectPerformanceMetrics(object):
build_success = self._DownloadAndUnzipBuild( build_success = self._DownloadAndUnzipBuild(
revision, depot, build_type='Release', create_patch=create_patch) revision, depot, build_type='Release', create_patch=create_patch)
else: else:
# Build locally. # Print the current environment set on the machine.
print 'Full Environment:'
for key, value in sorted(os.environ.items()):
print '%s: %s' % (key, value)
# Print the environment before proceeding with compile.
sys.stdout.flush()
build_success = self.builder.Build(depot, self.opts) build_success = self.builder.Build(depot, self.opts)
os.chdir(cwd) os.chdir(cwd)
return build_success return build_success
...@@ -2635,9 +2640,9 @@ class BisectOptions(object): ...@@ -2635,9 +2640,9 @@ class BisectOptions(object):
help='The target build architecture. Choices are "ia32" ' help='The target build architecture. Choices are "ia32" '
'(default), "x64" or "arm".') '(default), "x64" or "arm".')
group.add_argument('--target_build_type', default='Release', group.add_argument('--target_build_type', default='Release',
choices=['Release', 'Debug'], choices=['Release', 'Debug', 'Release_x64'],
help='The target build type. Choices are "Release" ' help='The target build type. Choices are "Release" '
'(default), or "Debug".') '(default), Release_x64 or "Debug".')
group.add_argument('--builder_type', default=fetch_build.PERF_BUILDER, group.add_argument('--builder_type', default=fetch_build.PERF_BUILDER,
choices=[fetch_build.PERF_BUILDER, choices=[fetch_build.PERF_BUILDER,
fetch_build.FULL_BUILDER, ''], fetch_build.FULL_BUILDER, ''],
...@@ -2731,6 +2736,8 @@ class BisectOptions(object): ...@@ -2731,6 +2736,8 @@ class BisectOptions(object):
raise RuntimeError('Invalid metric specified: [%s]' % opts.metric) raise RuntimeError('Invalid metric specified: [%s]' % opts.metric)
opts.metric = metric_values opts.metric = metric_values
if opts.target_arch == 'x64' and opts.target_build_type == 'Release':
opts.target_build_type = 'Release_x64'
opts.repeat_test_count = min(max(opts.repeat_test_count, 1), 100) opts.repeat_test_count = min(max(opts.repeat_test_count, 1), 100)
opts.max_time_minutes = min(max(opts.max_time_minutes, 1), 60) opts.max_time_minutes = min(max(opts.max_time_minutes, 1), 60)
opts.truncate_percent = min(max(opts.truncate_percent, 0), 25) opts.truncate_percent = min(max(opts.truncate_percent, 0), 25)
......
...@@ -43,7 +43,7 @@ class Builder(object): ...@@ -43,7 +43,7 @@ class Builder(object):
if opts.goma_dir: if opts.goma_dir:
opts.goma_dir = opts.goma_dir.encode('string_escape') opts.goma_dir = opts.goma_dir.encode('string_escape')
SetBuildSystemDefault(opts.build_preference, opts.use_goma, SetBuildSystemDefault(opts.build_preference, opts.use_goma,
opts.goma_dir) opts.goma_dir, opts.target_arch)
else: else:
if not opts.build_preference: if not opts.build_preference:
if 'ninja' in os.getenv('GYP_GENERATORS', default=''): if 'ninja' in os.getenv('GYP_GENERATORS', default=''):
...@@ -191,13 +191,16 @@ class AndroidChromeBuilder(AndroidBuilder): ...@@ -191,13 +191,16 @@ class AndroidChromeBuilder(AndroidBuilder):
return AndroidBuilder._GetTargets(self) + ['chrome_apk'] return AndroidBuilder._GetTargets(self) + ['chrome_apk']
def SetBuildSystemDefault(build_system, use_goma, goma_dir): def SetBuildSystemDefault(build_system, use_goma, goma_dir, target_arch='ia32'):
"""Sets up any environment variables needed to build with the specified build """Sets up any environment variables needed to build with the specified build
system. system.
Args: Args:
build_system: A string specifying build system. Currently only 'ninja' or build_system: A string specifying build system. Currently only 'ninja' or
'make' are supported. 'make' are supported.
use_goma: Determines whether to GOMA for compile.
goma_dir: GOMA directory path.
target_arch: The target build architecture, ia32 or x64. Default is ia32.
""" """
if build_system == 'ninja': if build_system == 'ninja':
gyp_var = os.getenv('GYP_GENERATORS', default='') gyp_var = os.getenv('GYP_GENERATORS', default='')
...@@ -224,6 +227,9 @@ def SetBuildSystemDefault(build_system, use_goma, goma_dir): ...@@ -224,6 +227,9 @@ def SetBuildSystemDefault(build_system, use_goma, goma_dir):
if goma_dir: if goma_dir:
os.environ['GYP_DEFINES'] += ' gomadir=%s' % goma_dir os.environ['GYP_DEFINES'] += ' gomadir=%s' % goma_dir
# Produce 64 bit chromium binaries when target architecure is set to x64.
if target_arch == 'x64':
os.environ['GYP_DEFINES'] += ' target_arch=%s' % target_arch
def SetupPlatformBuildEnvironment(opts): def SetupPlatformBuildEnvironment(opts):
"""Performs any platform-specific setup. """Performs any platform-specific setup.
......
...@@ -31,6 +31,7 @@ PLATFORM_BOT_MAP = { ...@@ -31,6 +31,7 @@ PLATFORM_BOT_MAP = {
'linux': ['linux_perf_bisect'], 'linux': ['linux_perf_bisect'],
'mac': ['mac_perf_bisect', 'mac_10_9_perf_bisect'], 'mac': ['mac_perf_bisect', 'mac_10_9_perf_bisect'],
'win': ['win_perf_bisect', 'win_8_perf_bisect', 'win_xp_perf_bisect'], 'win': ['win_perf_bisect', 'win_8_perf_bisect', 'win_xp_perf_bisect'],
'winx64': ['win_x64_perf_bisect'],
'android': [ 'android': [
'android_gn_perf_bisect', 'android_gn_perf_bisect',
'android_nexus4_perf_bisect', 'android_nexus4_perf_bisect',
......
# Config based on http://crbug.com/444762.
config = {
'command': 'python tools/perf/run_benchmark -v --browser=release dromaeo.domcorequery',
'good_revision': '309431',
'bad_revision': '309442',
'metric': 'dom/dom',
'repeat_count': '5',
'max_time_minutes': '5',
'truncate_percent': '20',
'builder_type': 'perf',
'target_arch': 'x64',
}
# Workaround git try issue, see crbug.com/257689
# This config just runs the kraken test once.
config = {
"command": "python tools/perf/run_benchmark -v --browser=release kraken",
"max_time_minutes": "10",
"repeat_count": "1",
"target_arch": "x64",
"truncate_percent": "0"
}
# Workaround git try issue, see crbug.com/257689
...@@ -117,16 +117,22 @@ class PossibleTrybotBrowser(possible_browser.PossibleBrowser): ...@@ -117,16 +117,22 @@ class PossibleTrybotBrowser(possible_browser.PossibleBrowser):
if arg.startswith('--browser='): if arg.startswith('--browser='):
if self._target_os == 'android': if self._target_os == 'android':
arguments[index] = '--browser=android-chrome-shell' arguments[index] = '--browser=android-chrome-shell'
elif 'x64' in self._buildername:
arguments[index] = '--browser=release_x64'
else: else:
arguments[index] = '--browser=release' arguments[index] = '--browser=release'
command = ' '.join(arguments) command = ' '.join(arguments)
# Set target architecture to build 32 or 64 bit binaries.
target_arch = 'x64' if 'x64' in self._buildername else 'ia32'
# Add the correct command to the config file and commit it. # Add the correct command to the config file and commit it.
config = { config = {
'command': command, 'command': command,
'repeat_count': '1', 'repeat_count': '1',
'max_time_minutes': '120', 'max_time_minutes': '120',
'truncate_percent': '0', 'truncate_percent': '0',
'target_arch': target_arch,
} }
try: try:
config_file = open(cfg_file_path, 'w') config_file = open(cfg_file_path, 'w')
......
...@@ -208,6 +208,7 @@ class TrybotBrowserFinderTest(unittest.TestCase): ...@@ -208,6 +208,7 @@ class TrybotBrowserFinderTest(unittest.TestCase):
'--browser=android-chrome-shell sunspider",\n' '--browser=android-chrome-shell sunspider",\n'
' "max_time_minutes": "120",\n' ' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n' ' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n' ' "truncate_percent": "0"\n'
'}'), config) '}'), config)
...@@ -220,6 +221,20 @@ class TrybotBrowserFinderTest(unittest.TestCase): ...@@ -220,6 +221,20 @@ class TrybotBrowserFinderTest(unittest.TestCase):
'--browser=release sunspider",\n' '--browser=release sunspider",\n'
' "max_time_minutes": "120",\n' ' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n' ' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n'
'}'), config)
def test_config_win_x64(self):
config = self._GetConfigForBrowser(
'trybot-win-x64', 'currentwork', 'tools/run-perf-test.cfg')
self.assertEquals(
('config = {\n'
' "command": "python tools\\\\perf\\\\run_benchmark '
'--browser=release_x64 sunspider",\n'
' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n'
' "target_arch": "x64",\n'
' "truncate_percent": "0"\n' ' "truncate_percent": "0"\n'
'}'), config) '}'), config)
...@@ -232,5 +247,6 @@ class TrybotBrowserFinderTest(unittest.TestCase): ...@@ -232,5 +247,6 @@ class TrybotBrowserFinderTest(unittest.TestCase):
'--browser=release sunspider",\n' '--browser=release sunspider",\n'
' "max_time_minutes": "120",\n' ' "max_time_minutes": "120",\n'
' "repeat_count": "1",\n' ' "repeat_count": "1",\n'
' "target_arch": "ia32",\n'
' "truncate_percent": "0"\n' ' "truncate_percent": "0"\n'
'}'), config) '}'), config)
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