diff options
author | 2021-11-12 14:23:27 +0000 | |
---|---|---|
committer | 2021-11-12 16:55:59 +0000 | |
commit | fa73acca98ddcad8cf208e9a8bce714744b70a6c (patch) | |
tree | f60d3973546560fe5835f0e5069bf2d9aa1c6dc3 /compiler/optimizing | |
parent | 3fa6e46c0f379a35d51e37b9253c1d7369e3158f (diff) |
Disaggregate kNotInlined MethodCompilationStats
There were some stats that were used in more than one place, making the actual reason indistinguishable between those cases.
Change-Id: I0d42abdb2e69396991b6408cfea5396f6df2dda7
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/inliner.cc | 10 | ||||
-rw-r--r-- | compiler/optimizing/optimizing_compiler_stats.h | 7 |
2 files changed, 10 insertions, 7 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 8d0258db97..a40218d7a0 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -755,7 +755,7 @@ bool HInliner::TryInlineMonomorphicCall( dex::TypeIndex class_index = FindClassIndexIn( GetMonomorphicType(classes), caller_compilation_unit_); if (!class_index.IsValid()) { - LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedDexCache) + LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedDexCacheInaccessibleToCaller) << "Call to " << ArtMethod::PrettyMethod(invoke_instruction->GetResolvedMethod()) << " from inline cache is not inlined because its class is not" << " accessible to the caller"; @@ -1342,7 +1342,7 @@ bool HInliner::IsInliningAllowed(ArtMethod* method, const CodeItemDataAccessor& } if (!method->IsCompilable()) { - LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedNotVerified) + LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedNotCompilable) << "Method " << method->PrettyMethod() << " has soft failures un-handled by the compiler, so it cannot be inlined"; return false; @@ -1374,7 +1374,7 @@ bool HInliner::IsInliningSupported(const HInvoke* invoke_instruction, } if (accessor.TriesSize() != 0) { - LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedTryCatch) + LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedTryCatchCallee) << "Method " << method->PrettyMethod() << " is not inlined because of try block"; return false; } @@ -1383,7 +1383,7 @@ bool HInliner::IsInliningSupported(const HInvoke* invoke_instruction, invoke_instruction->AsInvokeStaticOrDirect()->IsStaticWithImplicitClinitCheck()) { // Case of a static method that cannot be inlined because it implicitly // requires an initialization check of its declaring class. - LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedDexCache) + LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedDexCacheClinitCheck) << "Method " << method->PrettyMethod() << " is not inlined because it is static and requires a clinit" << " check that cannot be emitted due to Dex cache limitations"; @@ -1811,7 +1811,7 @@ bool HInliner::CanInlineBody(const HGraph* callee_graph, if (predecessor->GetLastInstruction()->IsThrow()) { if (target_block->IsTryBlock()) { // TODO(ngeoffray): Support adding HTryBoundary in Hgraph::InlineInto. - LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedTryCatch) + LOG_FAIL(stats_, MethodCompilationStat::kNotInlinedTryCatchCaller) << "Method " << resolved_method->PrettyMethod() << " could not be inlined because one branch always throws and" << " caller is in a try/catch block"; diff --git a/compiler/optimizing/optimizing_compiler_stats.h b/compiler/optimizing/optimizing_compiler_stats.h index 622fec3521..a68a0be393 100644 --- a/compiler/optimizing/optimizing_compiler_stats.h +++ b/compiler/optimizing/optimizing_compiler_stats.h @@ -82,7 +82,8 @@ enum class MethodCompilationStat { kInstructionSunk, kNotInlinedUnresolvedEntrypoint, kNotInlinedBss, - kNotInlinedDexCache, + kNotInlinedDexCacheInaccessibleToCaller, + kNotInlinedDexCacheClinitCheck, kNotInlinedStackMaps, kNotInlinedEnvironmentBudget, kNotInlinedInstructionBudget, @@ -90,9 +91,11 @@ enum class MethodCompilationStat { kNotInlinedIrreducibleLoop, kNotInlinedAlwaysThrows, kNotInlinedInfiniteLoop, - kNotInlinedTryCatch, + kNotInlinedTryCatchCaller, + kNotInlinedTryCatchCallee, kNotInlinedRegisterAllocator, kNotInlinedCannotBuild, + kNotInlinedNotCompilable, kNotInlinedNotVerified, kNotInlinedCodeItem, kNotInlinedWont, |