ART: Log information when skipping method during compilation
Add a reason for skipping a method to the log.
Change-Id: I3b31ee64cce6b531b25397f646cdfee650704ad6
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index b8d190a..c02d089 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -897,8 +897,8 @@
// Check early if we should skip this compilation if the profiler is enabled.
if (cu.compiler_driver->ProfilePresent()) {
std::string methodname = PrettyMethod(method_idx, dex_file);
- if (cu.mir_graph->SkipCompilation(methodname)) {
- return NULL;
+ if (cu.mir_graph->SkipCompilationByName(methodname)) {
+ return nullptr;
}
}
@@ -908,13 +908,16 @@
// TODO(Arm64): Remove this when we are able to compile everything.
if (!CanCompileMethod(method_idx, dex_file, cu)) {
- VLOG(compiler) << "Cannot compile method : " << PrettyMethod(method_idx, dex_file);
+ VLOG(compiler) << cu.instruction_set << ": Cannot compile method : "
+ << PrettyMethod(method_idx, dex_file);
return nullptr;
}
cu.NewTimingSplit("MIROpt:CheckFilters");
- if (cu.mir_graph->SkipCompilation()) {
- VLOG(compiler) << "Skipping method : " << PrettyMethod(method_idx, dex_file);
+ std::string skip_message;
+ if (cu.mir_graph->SkipCompilation(&skip_message)) {
+ VLOG(compiler) << cu.instruction_set << ": Skipping method : "
+ << PrettyMethod(method_idx, dex_file) << " Reason = " << skip_message;
return nullptr;
}
@@ -945,7 +948,9 @@
CompiledMethod* result = NULL;
if (cu.mir_graph->PuntToInterpreter()) {
- return NULL;
+ VLOG(compiler) << cu.instruction_set << ": Punted method to interpreter: "
+ << PrettyMethod(method_idx, dex_file);
+ return nullptr;
}
cu.cg->Materialize();
@@ -955,9 +960,9 @@
cu.NewTimingSplit("Cleanup");
if (result) {
- VLOG(compiler) << "Compiled " << PrettyMethod(method_idx, dex_file);
+ VLOG(compiler) << cu.instruction_set << ": Compiled " << PrettyMethod(method_idx, dex_file);
} else {
- VLOG(compiler) << "Deferred " << PrettyMethod(method_idx, dex_file);
+ VLOG(compiler) << cu.instruction_set << ": Deferred " << PrettyMethod(method_idx, dex_file);
}
if (cu.enable_debug & (1 << kDebugShowMemoryUsage)) {