Implement first kind of polymorphic inlining.
Add HClassTableGet to fetch an ArtMethod from the vtable or imt,
and compare it to the only method the profiling saw.
Change-Id: I76afd3689178f10e3be048aa3ac9a97c6f63295d
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 64b2c89..a6909d8 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -737,8 +737,16 @@
if (ContainsPc(method->GetEntryPointFromQuickCompiledCode())) {
return false;
}
- MutexLock mu(self, lock_);
+
+ // Compiling requires a profiling info object to notify compilation. Create
+ // one if it hasn't been done before.
ProfilingInfo* info = method->GetProfilingInfo(sizeof(void*));
+ if (info == nullptr) {
+ ProfilingInfo::Create(self, method, /* retry_allocation */ true);
+ }
+
+ MutexLock mu(self, lock_);
+ info = method->GetProfilingInfo(sizeof(void*));
if (info == nullptr || info->IsMethodBeingCompiled()) {
return false;
}