Fix mac trace processor shell (#30334)
The PR: * reverts mac trace_processor_shell to an old good revision * update the logic to skip re-downloading of trace_processor_shell The changes binary_deps.json can be dropped in next chromium rebases if the perf tests are stable with the updated revisions.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
index 012009994d3f523cca2abc742df20d479e6f8341..12df9dca5b71c98c4eb136d046fa0102b291044f 100644
|
||||
index 012009994d3f523cca2abc742df20d479e6f8341..f8c7de8d24a633f371e7e5bf032bd12cb8ecb744 100644
|
||||
--- a/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
+++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
@@ -5,8 +5,8 @@
|
||||
@@ -13,3 +13,14 @@ index 012009994d3f523cca2abc742df20d479e6f8341..12df9dca5b71c98c4eb136d046fa0102
|
||||
},
|
||||
"linux_arm": {
|
||||
"hash": "da83ac6def03d2e2a0eced37271a34bb4c33d046",
|
||||
@@ -17,8 +17,8 @@
|
||||
"full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/881ad50c05049ca13d4b34e4f92f4167de5ac52a/trace_processor_shell"
|
||||
},
|
||||
"mac_arm64": {
|
||||
- "hash": "101268b449e75f13cc33a020af146dd9e0bb10d8",
|
||||
- "full_remote_path": "perfetto-luci-artifacts/cca1748cb16b9dc0cac21515813c3855a983917d/mac-arm64/trace_processor_shell"
|
||||
+ "hash": "c4cbe25a9fe094edad2ce3262e356181880123a1",
|
||||
+ "full_remote_path": "perfetto-luci-artifacts/9815af2d8502b7e2f835132fdfa13810349e2a19/mac-arm64/trace_processor_shell"
|
||||
},
|
||||
"linux": {
|
||||
"hash": "da59658d12c39e37a3ab55d5dfe1f8dd52f5d1e0",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps_manager.py b/tools/perf/core/perfetto_binary_roller/binary_deps_manager.py
|
||||
index 1619dcb78a5262e9de6cefa6644012281eca136c..8fb2b953ee2f529577a97a80a4e6db580d02a435 100644
|
||||
--- a/tools/perf/core/perfetto_binary_roller/binary_deps_manager.py
|
||||
+++ b/tools/perf/core/perfetto_binary_roller/binary_deps_manager.py
|
||||
@@ -229,9 +229,11 @@ def FetchHostBinary(binary_name):
|
||||
expected_hash = config[binary_name][platform]['hash']
|
||||
filename = posixpath.basename(remote_path)
|
||||
local_path = os.path.join(LOCAL_STORAGE_FOLDER, filename)
|
||||
- cloud_storage.Get(bucket, remote_path, local_path)
|
||||
- if cloud_storage.CalculateHash(local_path) != expected_hash:
|
||||
- raise RuntimeError('The downloaded binary has wrong hash.')
|
||||
+ if not os.path.exists(local_path) or cloud_storage.CalculateHash(
|
||||
+ local_path) != expected_hash:
|
||||
+ cloud_storage.Get(bucket, remote_path, local_path)
|
||||
+ if cloud_storage.CalculateHash(local_path) != expected_hash:
|
||||
+ raise RuntimeError('The downloaded binary has wrong hash.')
|
||||
mode = os.stat(local_path).st_mode
|
||||
os.chmod(local_path, mode | stat.S_IXUSR)
|
||||
return local_path
|
||||
@@ -226,14 +226,6 @@ class RunableConfiguration:
|
||||
assert bench_out_dir
|
||||
return custom_handler(bench_out_dir)
|
||||
|
||||
# Optimize redownloading trace_processor_shell: if the file exists use it.
|
||||
is_win = sys.platform == 'win32'
|
||||
trace_processor_path = os.path.join(
|
||||
path_util.GetChromiumPerfDir(), 'core', 'perfetto_binary_roller', 'bin',
|
||||
'trace_processor_shell' + ('.exe' if is_win else ''))
|
||||
if os.path.isfile(trace_processor_path):
|
||||
args.append(f'--trace-processor-path={trace_processor_path}')
|
||||
|
||||
if self.common_options.verbose:
|
||||
args.extend(['--show-stdout', '--verbose'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user