summaryrefslogtreecommitdiff
path: root/runtime/art_method.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2021-11-15 14:02:07 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2021-11-24 14:04:12 +0000
commit58f916cd6ce9eaeba7b4dbb96c3c77d636f64be5 (patch)
tree7186d7b3da40f110f487abcb9574a2f848336b36 /runtime/art_method.h
parent24d589eae75239486b512a8e624aee83bba0c315 (diff)
Replace the nterp threshold with the warmup threshold.
Replace a hardcoded value with one that can be changed at the command line. Test: test.py Change-Id: I638da5b5cc2e56aa0857d2bf0862a2f8c2020949
Diffstat (limited to 'runtime/art_method.h')
-rw-r--r--runtime/art_method.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/art_method.h b/runtime/art_method.h
index a4bb78e34c..b501484bf2 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -76,7 +76,7 @@ class ArtMethod final {
static constexpr uint32_t kRuntimeMethodDexMethodIndex = 0xFFFFFFFF;
ArtMethod() : access_flags_(0), dex_method_index_(0),
- method_index_(0), hotness_count_(interpreter::kNterpHotnessMask) { }
+ method_index_(0), hotness_count_(0) { }
ArtMethod(ArtMethod* src, PointerSize image_pointer_size) {
CopyFrom(src, image_pointer_size);
@@ -684,13 +684,13 @@ class ArtMethod final {
void CopyFrom(ArtMethod* src, PointerSize image_pointer_size)
REQUIRES_SHARED(Locks::mutator_lock_);
- ALWAYS_INLINE void ResetCounter();
+ ALWAYS_INLINE void ResetCounter(uint16_t new_value);
ALWAYS_INLINE void UpdateCounter(int32_t new_samples);
ALWAYS_INLINE void SetHotCounter();
ALWAYS_INLINE bool CounterIsHot();
- ALWAYS_INLINE bool CounterHasReached(uint16_t samples);
+ ALWAYS_INLINE bool CounterHasReached(uint16_t samples, uint16_t threshold);
ALWAYS_INLINE uint16_t GetCounter();
- ALWAYS_INLINE bool CounterHasChanged();
+ ALWAYS_INLINE bool CounterHasChanged(uint16_t threshold);
ALWAYS_INLINE static constexpr uint16_t MaxCounter() {
return std::numeric_limits<decltype(hotness_count_)>::max();