diff options
author | 2016-08-10 16:06:07 +0000 | |
---|---|---|
committer | 2016-08-10 16:06:07 +0000 | |
commit | f2b1529b0988a1722b718fee6911e0030e95c9b6 (patch) | |
tree | 48653046837d7ac34d707fb8eea37eb79fb3a889 | |
parent | 066187de25e3fd2ae86bad812f514e16793caae7 (diff) | |
parent | 87de9cfefddfeef9b139e90adf372e3566be3afc (diff) |
Merge "ART: Fix JIT profile saver"
-rw-r--r-- | runtime/jit/profile_saver.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/jit/profile_saver.cc b/runtime/jit/profile_saver.cc index 5a469e51b4..b35c958b0b 100644 --- a/runtime/jit/profile_saver.cc +++ b/runtime/jit/profile_saver.cc @@ -176,14 +176,13 @@ void ProfileSaver::NotifyJitActivityInternal() { MutexLock wait_mutex(Thread::Current(), wait_lock_); if ((NanoTime() - last_time_ns_saver_woke_up_) > MsToNs(options_.GetMinSavePeriodMs())) { WakeUpSaver(); + } else if (jit_activity_notifications_ > options_.GetMaxNotificationBeforeWake()) { + // Make sure to wake up the saver if we see a spike in the number of notifications. + // This is a precaution to avoid losing a big number of methods in case + // this is a spike with no jit after. + total_number_of_hot_spikes_++; + WakeUpSaver(); } - } else if (jit_activity_notifications_ > options_.GetMaxNotificationBeforeWake()) { - // Make sure to wake up the saver if we see a spike in the number of notifications. - // This is a precaution to avoid "loosing" a big number of methods in case - // this is a spike with no jit after. - total_number_of_hot_spikes_++; - MutexLock wait_mutex(Thread::Current(), wait_lock_); - WakeUpSaver(); } } |