Revert "android: Avoid installing the browser every run"
This reverts commit b61c95f8faabcea9440edbd43006d2406d1175d2.
Reason for revert: I didn't realize that the catapult CL was reverted: https://crrev.com/c/5951223
Original change's description:
> android: Avoid installing the browser every run
>
> In generate_profile.py, allow run_benchmark to install the browser on
> the first run on android. On subsequent runs, pass a new flag so that
> run_benchmark skips browser installation. This should speed up
> generate_profile.py by 20+ minutes (1+ minutes for each of 20+
> benchmarks).
>
> Bug: 374787804
> Change-Id: I145d7c22b1e6d3b1be26e5ad132271f22380f494
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949707
> Auto-Submit: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1372018}
Bug: 374787804
Change-Id: I1b5f7ab6ecdd43dadc038a42c935c4e1926f5284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954086
Auto-Submit: Peter Wen <wnwen@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1372027}
diff --git a/tools/pgo/generate_profile.py b/tools/pgo/generate_profile.py
index 43b5606e..d204dcb4 100755
--- a/tools/pgo/generate_profile.py
+++ b/tools/pgo/generate_profile.py
@@ -42,10 +42,6 @@
_ANDROID_SETTINGS = android_browser_backend_settings.ANDROID_BACKEND_SETTINGS
-# This is mutable, set to True on the first benchmark run and used to avoid
-# re-installing the browser on subsequent benchmark runs.
-_android_browser_installed = False
-
# See https://crbug.com/373822787 for how this value was calculated.
_ANDROID_64_BLOCK_COUNT_THRESHOLD = 2200000000
@@ -265,8 +261,6 @@
def run_benchmark(benchmark_args: List[str], args: OptionsNamespace):
'''Puts profdata in {profiledir}/{args[0]}.profdata'''
- global _android_browser_installed
-
_LOGGER.info(f"Running benchmark: {' '.join(benchmark_args)}")
# Include the first 2 args since per-story benchmarks use [name, --story=s].
@@ -315,10 +309,6 @@
f'--fetch-data-path-device={args.android_device_path}',
f'--fetch-data-path-local={profraw_path}',
]
- if _android_browser_installed:
- cmd += ['--assume-browser-already-installed']
- else:
- _android_browser_installed = True
_LOGGER.debug(
f"Running benchmark on Android with command: {' '.join(cmd)}")
else: