diff options
| author | Jiakai Zhang <jiakaiz@google.com> | 2023-11-09 16:47:04 +0000 |
|---|---|---|
| committer | Jiakai Zhang <jiakaiz@google.com> | 2023-11-09 16:50:58 +0000 |
| commit | 2398442ec0d272bb7d6505593b9041dbcee2e188 (patch) | |
| tree | e5b81dae41fdc88163d2649ff2ad01ce1b1e8c0c /dexpreopt | |
| parent | 04445d54430b41905c7ccc013286269bcf75a5f9 (diff) | |
Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage.
OnlyPreoptBootImageAndSystemServer was for making the eng build faster.
This change makes it even faster.
Bug: 309011617
Test: Presubmit
Change-Id: If9001e99593b57deafa7b56f0ca6b3d4d80f56d3
Diffstat (limited to 'dexpreopt')
| -rw-r--r-- | dexpreopt/config.go | 80 | ||||
| -rw-r--r-- | dexpreopt/dexpreopt.go | 7 |
2 files changed, 41 insertions, 46 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go index ba41f4a66..c871e85bf 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -32,7 +32,7 @@ type GlobalConfig struct { DisablePreoptBootImages bool // disable prepot for boot images DisablePreoptModules []string // modules with preopt disabled by product-specific config - OnlyPreoptBootImageAndSystemServer bool // only preopt jars in the boot image or system server + OnlyPreoptArtBootImage bool // only preopt jars in the ART boot image PreoptWithUpdatableBcp bool // If updatable boot jars are included in dexpreopt or not. @@ -691,45 +691,45 @@ func (s *globalSoongConfigSingleton) MakeVars(ctx android.MakeVarsContext) { func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig { return &GlobalConfig{ - DisablePreopt: false, - DisablePreoptModules: nil, - OnlyPreoptBootImageAndSystemServer: false, - HasSystemOther: false, - PatternsOnSystemOther: nil, - DisableGenerateProfile: false, - ProfileDir: "", - BootJars: android.EmptyConfiguredJarList(), - ApexBootJars: android.EmptyConfiguredJarList(), - ArtApexJars: android.EmptyConfiguredJarList(), - TestOnlyArtBootImageJars: android.EmptyConfiguredJarList(), - SystemServerJars: android.EmptyConfiguredJarList(), - SystemServerApps: nil, - ApexSystemServerJars: android.EmptyConfiguredJarList(), - StandaloneSystemServerJars: android.EmptyConfiguredJarList(), - ApexStandaloneSystemServerJars: android.EmptyConfiguredJarList(), - SpeedApps: nil, - PreoptFlags: nil, - DefaultCompilerFilter: "", - SystemServerCompilerFilter: "", - GenerateDMFiles: false, - NoDebugInfo: false, - DontResolveStartupStrings: false, - AlwaysSystemServerDebugInfo: false, - NeverSystemServerDebugInfo: false, - AlwaysOtherDebugInfo: false, - NeverOtherDebugInfo: false, - IsEng: false, - SanitizeLite: false, - DefaultAppImages: false, - Dex2oatXmx: "", - Dex2oatXms: "", - EmptyDirectory: "empty_dir", - CpuVariant: nil, - InstructionSetFeatures: nil, - BootImageProfiles: nil, - BootFlags: "", - Dex2oatImageXmx: "", - Dex2oatImageXms: "", + DisablePreopt: false, + DisablePreoptModules: nil, + OnlyPreoptArtBootImage: false, + HasSystemOther: false, + PatternsOnSystemOther: nil, + DisableGenerateProfile: false, + ProfileDir: "", + BootJars: android.EmptyConfiguredJarList(), + ApexBootJars: android.EmptyConfiguredJarList(), + ArtApexJars: android.EmptyConfiguredJarList(), + TestOnlyArtBootImageJars: android.EmptyConfiguredJarList(), + SystemServerJars: android.EmptyConfiguredJarList(), + SystemServerApps: nil, + ApexSystemServerJars: android.EmptyConfiguredJarList(), + StandaloneSystemServerJars: android.EmptyConfiguredJarList(), + ApexStandaloneSystemServerJars: android.EmptyConfiguredJarList(), + SpeedApps: nil, + PreoptFlags: nil, + DefaultCompilerFilter: "", + SystemServerCompilerFilter: "", + GenerateDMFiles: false, + NoDebugInfo: false, + DontResolveStartupStrings: false, + AlwaysSystemServerDebugInfo: false, + NeverSystemServerDebugInfo: false, + AlwaysOtherDebugInfo: false, + NeverOtherDebugInfo: false, + IsEng: false, + SanitizeLite: false, + DefaultAppImages: false, + Dex2oatXmx: "", + Dex2oatXms: "", + EmptyDirectory: "empty_dir", + CpuVariant: nil, + InstructionSetFeatures: nil, + BootImageProfiles: nil, + BootFlags: "", + Dex2oatImageXmx: "", + Dex2oatImageXms: "", } } diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index 29ae188cd..c13e14ad2 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -124,12 +124,7 @@ func dexpreoptDisabled(ctx android.PathContext, global *GlobalConfig, module *Mo return true } - // If OnlyPreoptBootImageAndSystemServer=true and module is not in boot class path skip - // Also preopt system server jars since selinux prevents system server from loading anything from - // /data. If we don't do this they will need to be extracted which is not favorable for RAM usage - // or performance. If PreoptExtractedApk is true, we ignore the only preopt boot image options. - if global.OnlyPreoptBootImageAndSystemServer && !global.BootJars.ContainsJar(module.Name) && - !global.AllSystemServerJars(ctx).ContainsJar(module.Name) && !module.PreoptExtractedApk { + if global.OnlyPreoptArtBootImage && !module.PreoptExtractedApk { return true } |
