summaryrefslogtreecommitdiff
path: root/runtime/jit/jit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/jit/jit.cc')
-rw-r--r--runtime/jit/jit.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index a757960e3e6..813430f0bb7 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -717,12 +717,15 @@ void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_
void Jit::MethodEntered(Thread* thread, ArtMethod* method) {
Runtime* runtime = Runtime::Current();
if (UNLIKELY(runtime->UseJitCompilation() && runtime->GetJit()->JitAtFirstUse())) {
- // The compiler requires a ProfilingInfo object.
- ProfilingInfo::Create(thread,
- method->GetInterfaceMethodIfProxy(kRuntimePointerSize),
- /* retry_allocation */ true);
- JitCompileTask compile_task(method, JitCompileTask::kCompile);
- compile_task.Run(thread);
+ ArtMethod* np_method = method->GetInterfaceMethodIfProxy(kRuntimePointerSize);
+ if (np_method->IsCompilable()) {
+ if (!np_method->IsNative()) {
+ // The compiler requires a ProfilingInfo object for non-native methods.
+ ProfilingInfo::Create(thread, np_method, /* retry_allocation */ true);
+ }
+ JitCompileTask compile_task(method, JitCompileTask::kCompile);
+ compile_task.Run(thread);
+ }
return;
}