Loading dexpreopt/config.go +5 −11 Original line number Diff line number Diff line Loading @@ -80,9 +80,7 @@ type GlobalConfig struct { // Only used for boot image DirtyImageObjects android.OptionalPath // path to a dirty-image-objects file PreloadedClasses android.OptionalPath // path to a preloaded-classes file BootImageProfiles android.Paths // path to a boot-image-profile.txt file UseProfileForBootImage bool // whether a profile should be used to compile the boot image BootFlags string // extra flags to pass to dex2oat for the boot image Dex2oatImageXmx string // max heap size for dex2oat for the boot image Dex2oatImageXms string // initial heap size for dex2oat for the boot image Loading Loading @@ -183,7 +181,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Copies of entries in GlobalConfig that are not constructable without extra parameters. They will be // used to construct the real value manually below. DirtyImageObjects string PreloadedClasses string BootImageProfiles []string Tools struct { Loading @@ -206,7 +203,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Construct paths that require a PathContext. config.GlobalConfig.DirtyImageObjects = android.OptionalPathForPath(constructPath(ctx, config.DirtyImageObjects)) config.GlobalConfig.PreloadedClasses = android.OptionalPathForPath(constructPath(ctx, config.PreloadedClasses)) config.GlobalConfig.BootImageProfiles = constructPaths(ctx, config.BootImageProfiles) config.GlobalConfig.Tools.Profman = constructPath(ctx, config.Tools.Profman) Loading Loading @@ -321,9 +317,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { CpuVariant: nil, InstructionSetFeatures: nil, DirtyImageObjects: android.OptionalPath{}, PreloadedClasses: android.OptionalPath{}, BootImageProfiles: nil, UseProfileForBootImage: false, BootFlags: "", Dex2oatImageXmx: "", Dex2oatImageXms: "", Loading java/dexpreopt_bootjars.go +1 −3 Original line number Diff line number Diff line Loading @@ -286,8 +286,6 @@ func buildBootImageRuleForArch(ctx android.SingletonContext, image *bootImage, if profile != nil { cmd.FlagWithArg("--compiler-filter=", "speed-profile") cmd.FlagWithInput("--profile-file=", profile) } else if global.PreloadedClasses.Valid() { cmd.FlagWithInput("--image-classes=", global.PreloadedClasses.Path()) } if global.DirtyImageObjects.Valid() { Loading Loading @@ -374,7 +372,7 @@ Rebuild with ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" to see func bootImageProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath { global := dexpreoptGlobalConfig(ctx) if !global.UseProfileForBootImage || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { return nil } return ctx.Config().Once(bootImageProfileRuleKey, func() interface{} { Loading java/dexpreopt_bootjars_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ func TestDexpreoptBootJars(t *testing.T) { bootArt := dexpreoptBootJars.Output("boot.art") expectedInputs := []string{ "dex_bootjars/boot.prof", "dex_bootjars_input/foo.jar", "dex_bootjars_input/bar.jar", "dex_bootjars_input/baz.jar", Loading java/dexpreopt_config.go +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ func dexpreoptGlobalConfigRaw(ctx android.PathContext) globalConfigAndRaw { // Nope, return a config with preopting disabled return globalConfigAndRaw{dexpreopt.GlobalConfig{ DisablePreopt: true, DisableGenerateProfile: true, }, nil} }) }).(globalConfigAndRaw) Loading Loading
dexpreopt/config.go +5 −11 Original line number Diff line number Diff line Loading @@ -80,9 +80,7 @@ type GlobalConfig struct { // Only used for boot image DirtyImageObjects android.OptionalPath // path to a dirty-image-objects file PreloadedClasses android.OptionalPath // path to a preloaded-classes file BootImageProfiles android.Paths // path to a boot-image-profile.txt file UseProfileForBootImage bool // whether a profile should be used to compile the boot image BootFlags string // extra flags to pass to dex2oat for the boot image Dex2oatImageXmx string // max heap size for dex2oat for the boot image Dex2oatImageXms string // initial heap size for dex2oat for the boot image Loading Loading @@ -183,7 +181,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Copies of entries in GlobalConfig that are not constructable without extra parameters. They will be // used to construct the real value manually below. DirtyImageObjects string PreloadedClasses string BootImageProfiles []string Tools struct { Loading @@ -206,7 +203,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Construct paths that require a PathContext. config.GlobalConfig.DirtyImageObjects = android.OptionalPathForPath(constructPath(ctx, config.DirtyImageObjects)) config.GlobalConfig.PreloadedClasses = android.OptionalPathForPath(constructPath(ctx, config.PreloadedClasses)) config.GlobalConfig.BootImageProfiles = constructPaths(ctx, config.BootImageProfiles) config.GlobalConfig.Tools.Profman = constructPath(ctx, config.Tools.Profman) Loading Loading @@ -321,9 +317,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { CpuVariant: nil, InstructionSetFeatures: nil, DirtyImageObjects: android.OptionalPath{}, PreloadedClasses: android.OptionalPath{}, BootImageProfiles: nil, UseProfileForBootImage: false, BootFlags: "", Dex2oatImageXmx: "", Dex2oatImageXms: "", Loading
java/dexpreopt_bootjars.go +1 −3 Original line number Diff line number Diff line Loading @@ -286,8 +286,6 @@ func buildBootImageRuleForArch(ctx android.SingletonContext, image *bootImage, if profile != nil { cmd.FlagWithArg("--compiler-filter=", "speed-profile") cmd.FlagWithInput("--profile-file=", profile) } else if global.PreloadedClasses.Valid() { cmd.FlagWithInput("--image-classes=", global.PreloadedClasses.Path()) } if global.DirtyImageObjects.Valid() { Loading Loading @@ -374,7 +372,7 @@ Rebuild with ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" to see func bootImageProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath { global := dexpreoptGlobalConfig(ctx) if !global.UseProfileForBootImage || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { return nil } return ctx.Config().Once(bootImageProfileRuleKey, func() interface{} { Loading
java/dexpreopt_bootjars_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ func TestDexpreoptBootJars(t *testing.T) { bootArt := dexpreoptBootJars.Output("boot.art") expectedInputs := []string{ "dex_bootjars/boot.prof", "dex_bootjars_input/foo.jar", "dex_bootjars_input/bar.jar", "dex_bootjars_input/baz.jar", Loading
java/dexpreopt_config.go +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ func dexpreoptGlobalConfigRaw(ctx android.PathContext) globalConfigAndRaw { // Nope, return a config with preopting disabled return globalConfigAndRaw{dexpreopt.GlobalConfig{ DisablePreopt: true, DisableGenerateProfile: true, }, nil} }) }).(globalConfigAndRaw) Loading