From 78d51b00de7f563386b0907f4ae7b313203c36f1 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 24 Jun 2020 16:33:31 -0700 Subject: [PATCH] Only look for profiles when we have a profile dir Right now, it's looking for *.prof files at the top of the source directory. For devices that don't specify the profile dir (everything on AOSP, etc), this saves a couple percent of the globs that we check during every build (and would re-execute if you add or remove files from the top directory) Bug: 159845846 Test: treehugger Change-Id: I10d43422a2b5ae25e6557d435ecc89fe43536dd7 --- java/dexpreopt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 7f1afd667..f1b717874 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -173,7 +173,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo profileBootListing = android.ExistentPathForSource(ctx, ctx.ModuleDir(), String(d.dexpreoptProperties.Dex_preopt.Profile)+"-boot") profileIsTextListing = true - } else { + } else if global.ProfileDir != "" { profileClassListing = android.ExistentPathForSource(ctx, global.ProfileDir, ctx.ModuleName()+".prof") }