From 18a79c5a0f7da462e64162b0d9ba1ef99d8f1a5f Mon Sep 17 00:00:00 2001 From: Matt Gilbride Date: Mon, 17 Mar 2025 11:50:10 +0000 Subject: Add `art-profile-extra` for manual profile entries Creates a new file and corresponding genrule to combine it with the main `art-profile` for system services. `art-profile` is maintained by automated tooling, but we now have at least one case (`CtsDynamicInstrumentationManagerTest`) that relies on certain code in system server being AOT compiled. It is also considered generally useful to have a way to add entries manually, independent of automated tooling. `art-profile-extra` is created so we can maintain those manual entries. The `art-profile-combined` genrule concatenates `art-profile` and `art-profile-extra` into one file for use by ART to execute AOT compilation. The current entry `ActivityManagerService$LocalService->checkContentProviderAccess` is referenced by `CtsDynamicInstrumentationManagerTest`. Said method is redundant with `art-profile`, but putting it in `-extra` prevents said automated tooling fom potentially breaking a CTS test. Bug: 333751994 Test: TH Flag: EXEMPT no behavior change intended Change-Id: I1ef9739afc24765f760ba566b95064eca2ef74a4 --- services/Android.bp | 13 +++++++++---- services/art-profile-extra | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 services/art-profile-extra diff --git a/services/Android.bp b/services/Android.bp index efd35ce8f1a3..8657bfc79316 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -181,7 +181,7 @@ art_profile_java_defaults { conditions_default: { dex_preopt: { app_image: true, - profile: "art-profile", + profile: ":art-profile-combined", }, }, }, @@ -391,9 +391,14 @@ platform_compat_config { src: ":services", } -filegroup { - name: "art-profile", - srcs: ["art-profile"], +genrule { + name: "art-profile-combined", + srcs: [ + "art-profile", + "art-profile-extra", + ], + out: ["art-profile-combined"], + cmd: "cat $(location art-profile) $(location art-profile-extra) > $(location art-profile-combined)", } // API stub diff --git a/services/art-profile-extra b/services/art-profile-extra new file mode 100644 index 000000000000..54362411e5ea --- /dev/null +++ b/services/art-profile-extra @@ -0,0 +1 @@ +HSPLcom/android/server/am/ActivityManagerService$LocalService;->checkContentProviderAccess(Ljava/lang/String;I)Ljava/lang/String; -- cgit v1.2.3-59-g8ed1b