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.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));