From f80b64121d2a138c3863898ec14942fe27c0270e Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 26 Jan 2015 13:29:31 -0800 Subject: [PATCH] Add missing EndTiming in CompileMethod DCHECK failure when running tests with JIT. Bug: 17950037 Change-Id: I4f886758b2a9322c2d7a8e8449e84c9a1709c813 --- compiler/dex/frontend.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc index dd8b4c8a3..0289b72f1 100644 --- a/compiler/dex/frontend.cc +++ b/compiler/dex/frontend.cc @@ -156,6 +156,7 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver, 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 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver, 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 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver, 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 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver, if (cu.mir_graph->PuntToInterpreter()) { VLOG(compiler) << cu.instruction_set << ": Punted method to interpreter: " << PrettyMethod(method_idx, dex_file); + cu.EndTiming(); return nullptr; } -- 2.11.0