From e710242b5c42477c2bf4d6f34581cc608bff0fc8 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 24 Jul 2019 13:19:29 +0100 Subject: Add support for generating boot profiles. Test: /system/etc/boot-image.bprof is generated Test: /system/framework/services.bprof is generated Bug: 119800099 Change-Id: I50f0b665ff104feca4a26dd229625f00013db251 --- java/dexpreopt.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/dexpreopt.go') diff --git a/java/dexpreopt.go b/java/dexpreopt.go index ed12fe6d2..6214dac44 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -143,6 +143,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo strippedDexJarFile := android.PathForModuleOut(ctx, "dexpreopt", dexJarFile.Base()) var profileClassListing android.OptionalPath + var profileBootListing android.OptionalPath profileIsTextListing := false if BoolDefault(d.dexpreoptProperties.Dex_preopt.Profile_guided, true) { // If dex_preopt.profile_guided is not set, default it based on the existence of the @@ -150,6 +151,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo if String(d.dexpreoptProperties.Dex_preopt.Profile) != "" { profileClassListing = android.OptionalPathForPath( android.PathForModuleSrc(ctx, String(d.dexpreoptProperties.Dex_preopt.Profile))) + profileBootListing = android.ExistentPathForSource(ctx, + ctx.ModuleDir(), String(d.dexpreoptProperties.Dex_preopt.Profile)+"-boot") profileIsTextListing = true } else { profileClassListing = android.ExistentPathForSource(ctx, @@ -169,6 +172,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo ProfileClassListing: profileClassListing, ProfileIsTextListing: profileIsTextListing, + ProfileBootListing: profileBootListing, EnforceUsesLibraries: d.enforceUsesLibs, PresentOptionalUsesLibraries: d.optionalUsesLibs, -- cgit v1.2.3-59-g8ed1b