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_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc
index ccb0609..5c6f835 100644
--- a/compiler/optimizing/code_generator_arm_vixl.cc
+++ b/compiler/optimizing/code_generator_arm_vixl.cc
@@ -2104,8 +2104,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) {
uint32_t address = reinterpret_cast32<uint32_t>(info);
vixl::aarch32::Label done;
@@ -3434,8 +3435,9 @@
GetGraph()->IsCompilingBaseline() &&
!Runtime::Current()->IsAotCompiler()) {
DCHECK(!instruction->GetEnvironment()->IsFromInlinedInvoke());
- 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());
uint32_t address = reinterpret_cast32<uint32_t>(cache);