Add missing EndTiming in CompileMethod
DCHECK failure when running tests with JIT.
Bug: 17950037
Change-Id: I4f886758b2a9322c2d7a8e8449e84c9a1709c813
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index dd8b4c8..0289b72 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -156,6 +156,7 @@
if (!compiler->CanCompileMethod(method_idx, dex_file, &cu)) {
VLOG(compiler) << cu.instruction_set << ": Cannot compile method : "
<< PrettyMethod(method_idx, dex_file);
+ cu.EndTiming();
return nullptr;
}
@@ -164,6 +165,7 @@
if (cu.mir_graph->SkipCompilation(&skip_message)) {
VLOG(compiler) << cu.instruction_set << ": Skipping method : "
<< PrettyMethod(method_idx, dex_file) << " Reason = " << skip_message;
+ cu.EndTiming();
return nullptr;
}
@@ -175,6 +177,7 @@
if (cu.compiler_driver->ProfilePresent()
&& !cu.mir_graph->MethodIsLeaf()
&& cu.mir_graph->SkipCompilationByName(PrettyMethod(method_idx, dex_file))) {
+ cu.EndTiming();
return nullptr;
}
@@ -203,6 +206,7 @@
if (cu.mir_graph->PuntToInterpreter()) {
VLOG(compiler) << cu.instruction_set << ": Punted method to interpreter: "
<< PrettyMethod(method_idx, dex_file);
+ cu.EndTiming();
return nullptr;
}