From f6d4668c42933e2f85ddbc94e276c49db4e2b1dd Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 28 Feb 2017 17:41:45 +0000 Subject: Improvements in the Inliner. - Change from a depth limit to a total number of HInstructions inlined limit. Remove the dex2oat depth limit argument. - Add more stats to diagnose reasons for not inlining. - Clean up logging to easily parse output. Individual Ritz benchmarks improve from 3 to 10%. No change in other heuristics. There was already an instruction budget. Note that the instruction budget is rarely hit in the "apps" I've tried with. Compile-times improve from 5 to 15%. Code size go from 4% increase (Gms) to 1% decrease (Docs). bug:35724239 test: test-art-host test-art-target Change-Id: I5a35c4bd826cf21fead77859709553c5b57608d6 --- compiler/optimizing/optimizing_compiler_stats.h | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'compiler/optimizing/optimizing_compiler_stats.h') diff --git a/compiler/optimizing/optimizing_compiler_stats.h b/compiler/optimizing/optimizing_compiler_stats.h index ae9a8119a7..a211c5472a 100644 --- a/compiler/optimizing/optimizing_compiler_stats.h +++ b/compiler/optimizing/optimizing_compiler_stats.h @@ -69,6 +69,23 @@ enum MethodCompilationStat { kExplicitNullCheckGenerated, kSimplifyIf, kInstructionSunk, + kNotInlinedUnresolvedEntrypoint, + kNotInlinedDexCache, + kNotInlinedStackMaps, + kNotInlinedEnvironmentBudget, + kNotInlinedInstructionBudget, + kNotInlinedLoopWithoutExit, + kNotInlinedIrreducibleLoop, + kNotInlinedAlwaysThrows, + kNotInlinedInfiniteLoop, + kNotInlinedTryCatch, + kNotInlinedRegisterAllocator, + kNotInlinedCannotBuild, + kNotInlinedNotVerified, + kNotInlinedCodeItem, + kNotInlinedWont, + kNotInlinedRecursiveBudget, + kNotInlinedProxy, kLastStat }; @@ -168,6 +185,23 @@ class OptimizingCompilerStats { case kExplicitNullCheckGenerated: name = "ExplicitNullCheckGenerated"; break; case kSimplifyIf: name = "SimplifyIf"; break; case kInstructionSunk: name = "InstructionSunk"; break; + case kNotInlinedUnresolvedEntrypoint: name = "NotInlinedUnresolvedEntrypoint"; break; + case kNotInlinedDexCache: name = "NotInlinedDexCache"; break; + case kNotInlinedStackMaps: name = "NotInlinedStackMaps"; break; + case kNotInlinedEnvironmentBudget: name = "NotInlinedEnvironmentBudget"; break; + case kNotInlinedInstructionBudget: name = "NotInlinedInstructionBudget"; break; + case kNotInlinedLoopWithoutExit: name = "NotInlinedLoopWithoutExit"; break; + case kNotInlinedIrreducibleLoop: name = "NotInlinedIrreducibleLoop"; break; + case kNotInlinedAlwaysThrows: name = "NotInlinedAlwaysThrows"; break; + case kNotInlinedInfiniteLoop: name = "NotInlinedInfiniteLoop"; break; + case kNotInlinedTryCatch: name = "NotInlinedTryCatch"; break; + case kNotInlinedRegisterAllocator: name = "NotInlinedRegisterAllocator"; break; + case kNotInlinedCannotBuild: name = "NotInlinedCannotBuild"; break; + case kNotInlinedNotVerified: name = "NotInlinedNotVerified"; break; + case kNotInlinedCodeItem: name = "NotInlinedCodeItem"; break; + case kNotInlinedWont: name = "NotInlinedWont"; break; + case kNotInlinedRecursiveBudget: name = "NotInlinedRecursiveBudget"; break; + case kNotInlinedProxy: name = "NotInlinedProxy"; break; case kLastStat: LOG(FATAL) << "invalid stat " -- cgit v1.2.3-59-g8ed1b