Commit a2bea453 authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

Orderfile: better pregenerated profile handling.

Use pregenerated profiles for system health orderfiles, and
avoid compiling if they are being used.

Change-Id: Ib386bcd227e4f3ee4892d50ea2ec41085497f41b
Reviewed-on: https://chromium-review.googlesource.com/c/1332299
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607544}
parent 57f1e049
......@@ -707,7 +707,11 @@ class OrderfileGenerator(object):
self._options.max_load, self._options.use_goma,
self._options.goma_dir, self._options.system_health_orderfile,
self._options.monochrome)
self._compiler.CompileChromeApk(True)
if not self._options.pregenerated_profiles:
# If there are pregenerated profiles, the instrumented build should
# not be changed to avoid invalidating the pregenerated profile
# offsets.
self._compiler.CompileChromeApk(True)
self._GenerateAndProcessProfile()
self._MaybeArchiveOrderfile(self._GetUnpatchedOrderfileFilename())
profile_uploaded = True
......
......@@ -299,6 +299,10 @@ class AndroidProfileTool(object):
Raises:
NoProfileDataError: No data was found on the device.
"""
if self._pregenerated_profiles:
logging.info('Using pregenerated profiles instead of running profile')
logging.info('Profile files: %s', '\n'.join(self._pregenerated_profiles))
return self._pregenerated_profiles
self._SetUpDeviceFolders()
self._RunCommand(['tools/perf/run_benchmark',
'--device={}'.format(self._device.serial),
......
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