OSDN Git Service

Don't allow JIT to compile native methods
authorMathieu Chartier <mathieuc@google.com>
Sat, 9 May 2015 00:05:01 +0000 (17:05 -0700)
committerMathieu Chartier <mathieuc@google.com>
Sat, 9 May 2015 00:08:04 +0000 (17:08 -0700)
Change-Id: I12722309ba52c430e23ab862b29f7a48383f00d2

runtime/jit/jit_instrumentation.cc

index e2f9cec..3232674 100644 (file)
@@ -77,7 +77,7 @@ void JitInstrumentationCache::AddSamples(Thread* self, mirror::ArtMethod* method
   ScopedObjectAccessUnchecked soa(self);
   // Since we don't have on-stack replacement, some methods can remain in the interpreter longer
   // than we want resulting in samples even after the method is compiled.
-  if (method->IsClassInitializer() ||
+  if (method->IsClassInitializer() || method->IsNative() ||
       Runtime::Current()->GetJit()->GetCodeCache()->ContainsMethod(method)) {
     return;
   }