From 389a64732076afed0462790836e024badf7bf333 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Tue, 14 Dec 2021 18:54:06 +0000 Subject: Dexpreopt standalone system server jars. Standalone system server jars are dynamically loaded by system server using a `PathClassLoader` whose parent is `SYSTEMSERVERCLASSPATH`. They are listed in `PRODUCT_STANDALONE_SYSTEM_SERVER_JARS` and `PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in Makefile. We need to dexpreopt them to achieve better performance. Bug: 203198541 Test: m nothing Test: - 1. Add a standalone system server jar (e.g., by patching aosp/1906158) 2. Build a system image. 3. See the odex and vdex files generated in $ANDROID_PRODUCT_OUT/system/framework/oat/ 4. Flash the image to a device. 5. Run `atest art_standalone_dexpreopt_tests`. Change-Id: I358a62d34989c5c8eba12e18fe6167e0b72ff69d --- java/systemserver_classpath_fragment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/systemserver_classpath_fragment.go') diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go index 2ec33a422..fa61ea68c 100644 --- a/java/systemserver_classpath_fragment.go +++ b/java/systemserver_classpath_fragment.go @@ -60,7 +60,7 @@ func (p *platformSystemServerClasspathModule) GenerateAndroidBuildActions(ctx an classpathJars := configuredJarListToClasspathJars(ctx, configuredJars, p.classpathType) standaloneConfiguredJars := p.standaloneConfiguredJars(ctx) standaloneClasspathJars := configuredJarListToClasspathJars(ctx, standaloneConfiguredJars, STANDALONE_SYSTEMSERVER_JARS) - configuredJars = configuredJars.AppendList(standaloneConfiguredJars) + configuredJars = configuredJars.AppendList(&standaloneConfiguredJars) classpathJars = append(classpathJars, standaloneClasspathJars...) p.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars, classpathJars) } @@ -122,7 +122,7 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo classpathJars := configuredJarListToClasspathJars(ctx, configuredJars, s.classpathType) standaloneConfiguredJars := s.standaloneConfiguredJars(ctx) standaloneClasspathJars := configuredJarListToClasspathJars(ctx, standaloneConfiguredJars, STANDALONE_SYSTEMSERVER_JARS) - configuredJars = configuredJars.AppendList(standaloneConfiguredJars) + configuredJars = configuredJars.AppendList(&standaloneConfiguredJars) classpathJars = append(classpathJars, standaloneClasspathJars...) s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars, classpathJars) -- cgit v1.2.3-59-g8ed1b