summaryrefslogtreecommitdiff
path: root/runtime/jit/jit.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-11-30 09:16:37 +0000
committer android-build-merger <android-build-merger@google.com> 2017-11-30 09:16:37 +0000
commit61bca574a474c26e302bdbc0b23d3c311d218fc6 (patch)
treecbcfcee8846c8f9298b64f52e3523d2268e179ca /runtime/jit/jit.cc
parentda1ea1403227713c81e53e5334106f89d20767ed (diff)
parent8f8bd8bfce0f2433bc66ac90a471e5f58cd2e2cc (diff)
Merge "Revert "Revert "Revert "JIT JNI stubs.""""
am: 8f8bd8bfce Change-Id: Ie74a0ae3c130a4bde4fec8f92373d5a9df17663b
Diffstat (limited to 'runtime/jit/jit.cc')
-rw-r--r--runtime/jit/jit.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 0d95bc6e64..953e195480 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -643,7 +643,7 @@ void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_
return;
}
- if (method->IsClassInitializer() || !method->IsCompilable()) {
+ if (method->IsClassInitializer() || method->IsNative() || !method->IsCompilable()) {
// We do not want to compile such methods.
return;
}
@@ -659,8 +659,7 @@ void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_
count *= priority_thread_weight_;
}
int32_t new_count = starting_count + count; // int32 here to avoid wrap-around;
- // Note: Native method have no "warm" state or profiling info.
- if (LIKELY(!method->IsNative()) && starting_count < warm_method_threshold_) {
+ if (starting_count < warm_method_threshold_) {
if ((new_count >= warm_method_threshold_) &&
(method->GetProfilingInfo(kRuntimePointerSize) == nullptr)) {
bool success = ProfilingInfo::Create(self, method, /* retry_allocation */ false);
@@ -697,7 +696,6 @@ void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_
// If the samples don't contain any back edge, we don't increment the hotness.
return;
}
- DCHECK(!method->IsNative()); // No back edges reported for native methods.
if ((new_count >= osr_method_threshold_) && !code_cache_->IsOsrCompiled(method)) {
DCHECK(thread_pool_ != nullptr);
thread_pool_->AddTask(self, new JitCompileTask(method, JitCompileTask::kCompileOsr));