diff options
| author | 2017-06-10 13:24:45 +0000 | |
|---|---|---|
| committer | 2017-06-10 13:24:48 +0000 | |
| commit | fbb22de21c30b1233aa32b56b0c92b2bd0ec2b47 (patch) | |
| tree | c4dca0c88a5526fceb057e7255f614c1c8a9a2c0 /runtime/jit/jit_code_cache.cc | |
| parent | f052aa7268f656f97099185ac6b51eeacd78a97d (diff) | |
| parent | 88f50b13aca3b29b4be144b2b8c14bc95506d240 (diff) | |
Merge "Don't reset to a level above warmup threshold."
Diffstat (limited to 'runtime/jit/jit_code_cache.cc')
| -rw-r--r-- | runtime/jit/jit_code_cache.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index 6d20b49c37..2744c4f24a 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc @@ -536,7 +536,10 @@ static void ClearMethodCounter(ArtMethod* method, bool was_warm) { } // We reset the counter to 1 so that the profile knows that the method was executed at least once. // This is required for layout purposes. - method->SetCounter(1); + // We also need to make sure we'll pass the warmup threshold again, so we set to 0 if + // the warmup threshold is 1. + uint16_t jit_warmup_threshold = Runtime::Current()->GetJITOptions()->GetWarmupThreshold(); + method->SetCounter(std::min(jit_warmup_threshold - 1, 1)); } uint8_t* JitCodeCache::CommitCodeInternal(Thread* self, |