Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: tools/run_perf.py

Issue 953893002: Prepare v8 android perf runner for external startup data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index 63c9148515c9380604bc2ee973fe3f0ddb27078e..12a1c0d556d6aaec20b96ce877689c71d3c0fa1d 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -533,7 +533,7 @@ class AndroidPlatform(Platform): # pragma: no cover
logging.info("adb -s %s %s" % (str(self.device), cmd))
return self.adb.SendCommand(cmd, timeout_time=60)
- def _PushFile(self, host_dir, file_name, target_rel="."):
+ def _PushFile(self, host_dir, file_name, target_rel=".", only_existing=True):
vogelheim 2015/02/24 13:31:25 Maybe it's just me, but I was confused by the para
file_on_host = os.path.join(host_dir, file_name)
file_on_device_tmp = os.path.join(
AndroidPlatform.DEVICE_DIR, "_tmp_", file_name)
@@ -541,6 +541,12 @@ class AndroidPlatform(Platform): # pragma: no cover
AndroidPlatform.DEVICE_DIR, target_rel, file_name)
folder_on_device = os.path.dirname(file_on_device)
+ # Only attempt to push files that exist.
+ if not os.path.exists(file_on_host):
+ if only_existing:
+ logging.critical('Missing file on host: %s' % file_on_host)
+ return
+
# Only push files not yet pushed in one execution.
if file_on_host in self.pushed:
return
@@ -568,6 +574,12 @@ class AndroidPlatform(Platform): # pragma: no cover
bench_abs = suite_dir
self._PushFile(self.shell_dir, node.binary)
+
+ # Push external startup data. Backwards compatible for revisions where
+ # these files didn't exist.
+ self._PushFile(self.shell_dir, "natives_blob.bin", only_existing=False)
+ self._PushFile(self.shell_dir, "snapshot_blob.bin", only_existing=False)
+
if isinstance(node, Runnable):
self._PushFile(bench_abs, node.main, bench_rel)
for resource in node.resources:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698