summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/quick_compiler.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-12-11 14:01:12 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-12-11 14:01:12 +0000
commit66278646b5b332142d1474703ac7d945dfbf7c78 (patch)
treeeedcbf057dabe78c46e63c645ff833a657a7187d /compiler/dex/quick/quick_compiler.cc
parent919b6d5fc9b18dd7c00f5fa8eb90411b2ca8998b (diff)
parent2306ae0d412cc53cbf64877e4a8c37292dd907d8 (diff)
Merge "Revert "Enable profiled guided compilation in dex2oat""
Diffstat (limited to 'compiler/dex/quick/quick_compiler.cc')
-rw-r--r--compiler/dex/quick/quick_compiler.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 3260a7a050..05dde9f649 100644
--- a/compiler/dex/quick/quick_compiler.cc
+++ b/compiler/dex/quick/quick_compiler.cc
@@ -780,6 +780,14 @@ CompiledMethod* QuickCompiler::Compile(const DexFile::CodeItem* code_item,
PassDriverMEOpts pass_driver(GetPreOptPassManager(), GetPostOptPassManager(), &cu);
pass_driver.Launch();
+ /* For non-leaf methods check if we should skip compilation when the profiler is enabled. */
+ if (cu.compiler_driver->ProfilePresent()
+ && !cu.mir_graph->MethodIsLeaf()
+ && cu.mir_graph->SkipCompilationByName(PrettyMethod(method_idx, dex_file))) {
+ cu.EndTiming();
+ return nullptr;
+ }
+
if (cu.enable_debug & (1 << kDebugDumpCheckStats)) {
cu.mir_graph->DumpCheckStats();
}