[go: nahoru, domu]

Add support and config files for PGO and Lacros Arm64

Adding required changes to infra to support and use lacros arm64
profiles.

Bug: 1417071
Change-Id: Ic6cea7df6684210e6364fb9b4a95212366c75420
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4431779
Reviewed-by: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Jeff Yoon <jeffyoon@google.com>
Cr-Commit-Position: refs/heads/main@{#1132127}
diff --git a/DEPS b/DEPS
index fd9d36c4..2248fc3 100644
--- a/DEPS
+++ b/DEPS
@@ -5022,6 +5022,17 @@
     ],
   },
   {
+    'name': 'Fetch PGO profiles for lacros arm64',
+    'pattern': '.',
+    'condition': 'checkout_pgo_profiles and checkout_lacros_sdk',
+    'action': [ 'python3',
+                'src/tools/update_pgo_profiles.py',
+                '--target=lacros-arm64',
+                'update',
+                '--gs-url-base=chromium-optimization-profiles/pgo_profiles',
+    ],
+  },
+  {
     'name': 'Fetch PGO profiles for V8 builtins',
     'pattern': '.',
     # Always download profiles on Android builds. The GN arg `is_official_build`
diff --git a/build/config/compiler/pgo/BUILD.gn b/build/config/compiler/pgo/BUILD.gn
index 1a4548e..f2c61c21 100644
--- a/build/config/compiler/pgo/BUILD.gn
+++ b/build/config/compiler/pgo/BUILD.gn
@@ -85,6 +85,8 @@
       inputs = [ "//chrome/build/lacros64.pgo.txt" ]
     } else if (_pgo_target == "lacros-arm") {
       inputs = [ "//chrome/build/lacros-arm.pgo.txt" ]
+    } else if (_pgo_target == "lacros-arm64") {
+      inputs = [ "//chrome/build/lacros-arm64.pgo.txt" ]
     }
 
     if (_pgo_target != "" && pgo_data_path == "") {
diff --git a/chrome/build/lacros-arm64.pgo.txt b/chrome/build/lacros-arm64.pgo.txt
new file mode 100644
index 0000000..9a4bc78
--- /dev/null
+++ b/chrome/build/lacros-arm64.pgo.txt
@@ -0,0 +1 @@
+chrome-chromeos-arm64-generic-main-1681689459-17b02088ef9c3aaed27dc7508042f32f355c55ee.profdata
\ No newline at end of file
diff --git a/tools/update_pgo_profiles.py b/tools/update_pgo_profiles.py
index a22f5dd..2e5c818 100755
--- a/tools/update_pgo_profiles.py
+++ b/tools/update_pgo_profiles.py
@@ -133,7 +133,14 @@
       '--target',
       required=True,
       choices=[
-          'win32', 'win64', 'mac', 'mac-arm', 'linux', 'lacros64', 'lacros-arm'
+          'win32',
+          'win64',
+          'mac',
+          'mac-arm',
+          'linux',
+          'lacros64',
+          'lacros-arm',
+          'lacros-arm64',
       ],
       help='Identifier of a specific target platform + architecture.')
   subparsers = parser.add_subparsers()