diff options
author | 2023-12-14 21:21:45 +0000 | |
---|---|---|
committer | 2023-12-15 06:06:25 +0000 | |
commit | 9fedb9f473fd77f31285203f5baa9533b8e21ce6 (patch) | |
tree | a2d729d072b1cdf01f2293f3e0b2f52bbc6f3291 /compiler/optimizing/optimizing_compiler.cc | |
parent | f3cbdb1a077cccce4867eee74581419414a0d3f9 (diff) |
Revert "Move the construction of ProfilingInfo in the compiler."
This reverts commit d4faa43efb17e75fc99930f798103b29553a6a5e.
Reason for revert: b/316397902 Test [v2/android-virtual-infra/avd/avd_boot_health_check] com.android.devicehealthchecks.SystemCheck#system_tombstone failing
Change-Id: I5daee96d7c00de35fe6f403114c50dc6b6b85080
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 2886e731b5..0069a20a26 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -53,7 +53,6 @@ #include "oat_quick_method_header.h" #include "optimizing/write_barrier_elimination.h" #include "prepare_for_register_allocation.h" -#include "profiling_info_builder.h" #include "reference_type_propagation.h" #include "register_allocator_linear_scan.h" #include "select_generator.h" @@ -836,6 +835,8 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator, jit::Jit* jit = Runtime::Current()->GetJit(); if (jit != nullptr) { ProfilingInfo* info = jit->GetCodeCache()->GetProfilingInfo(method, Thread::Current()); + DCHECK_IMPLIES(compilation_kind == CompilationKind::kBaseline, info != nullptr) + << "Compiling a method baseline should always have a ProfilingInfo"; graph->SetProfilingInfo(info); } @@ -919,20 +920,6 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator, &pass_observer, regalloc_strategy, compilation_stats_.get()); - // If we are compiling baseline and we haven't created a profiling info for - // this method already, do it now. - if (jit != nullptr && - compilation_kind == CompilationKind::kBaseline && - graph->GetProfilingInfo() == nullptr) { - ProfilingInfoBuilder(graph, codegen->GetCompilerOptions(), compilation_stats_.get()).Run(); - // We expect a profiling info to be created and attached to the graph. - // However, we may have run out of memory trying to create it, so in this - // case just abort the compilation. - if (graph->GetProfilingInfo() == nullptr) { - MaybeRecordStat(compilation_stats_.get(), MethodCompilationStat::kJitOutOfMemoryForCommit); - return nullptr; - } - } codegen->Compile(); pass_observer.DumpDisassembly(); |