Move the profiling info out of ArtMethod.
Instead, keep a map in JitCodeCache.
Bug: 112676029
Test: test.py
Change-Id: I5ab769a9b7b3214af7832478d1b06c9e9adbf8b8
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc
index b421079..37265ec 100644
--- a/compiler/optimizing/code_generator_x86_64.cc
+++ b/compiler/optimizing/code_generator_x86_64.cc
@@ -1416,8 +1416,9 @@
}
if (GetGraph()->IsCompilingBaseline() && !Runtime::Current()->IsAotCompiler()) {
- ScopedObjectAccess soa(Thread::Current());
- ProfilingInfo* info = GetGraph()->GetArtMethod()->GetProfilingInfo(kRuntimePointerSize);
+ ScopedProfilingInfoUse spiu(
+ Runtime::Current()->GetJit(), GetGraph()->GetArtMethod(), Thread::Current());
+ ProfilingInfo* info = spiu.GetProfilingInfo();
if (info != nullptr) {
uint64_t address = reinterpret_cast64<uint64_t>(info);
NearLabel done;
@@ -2689,8 +2690,9 @@
if (!instruction->GetLocations()->Intrinsified() &&
GetGraph()->IsCompilingBaseline() &&
!Runtime::Current()->IsAotCompiler()) {
- ScopedObjectAccess soa(Thread::Current());
- ProfilingInfo* info = GetGraph()->GetArtMethod()->GetProfilingInfo(kRuntimePointerSize);
+ ScopedProfilingInfoUse spiu(
+ Runtime::Current()->GetJit(), GetGraph()->GetArtMethod(), Thread::Current());
+ ProfilingInfo* info = spiu.GetProfilingInfo();
if (info != nullptr) {
InlineCache* cache = info->GetInlineCache(instruction->GetDexPc());
uint64_t address = reinterpret_cast64<uint64_t>(cache);