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
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 8d0258d..a40218d 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -755,7 +755,7 @@
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 @@
}
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 @@
}
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 @@
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 @@
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 622fec3..a68a0be 100644
--- a/compiler/optimizing/optimizing_compiler_stats.h
+++ b/compiler/optimizing/optimizing_compiler_stats.h
@@ -82,7 +82,8 @@
kInstructionSunk,
kNotInlinedUnresolvedEntrypoint,
kNotInlinedBss,
- kNotInlinedDexCache,
+ kNotInlinedDexCacheInaccessibleToCaller,
+ kNotInlinedDexCacheClinitCheck,
kNotInlinedStackMaps,
kNotInlinedEnvironmentBudget,
kNotInlinedInstructionBudget,
@@ -90,9 +91,11 @@
kNotInlinedIrreducibleLoop,
kNotInlinedAlwaysThrows,
kNotInlinedInfiniteLoop,
- kNotInlinedTryCatch,
+ kNotInlinedTryCatchCaller,
+ kNotInlinedTryCatchCallee,
kNotInlinedRegisterAllocator,
kNotInlinedCannotBuild,
+ kNotInlinedNotCompilable,
kNotInlinedNotVerified,
kNotInlinedCodeItem,
kNotInlinedWont,