Make the baseline threshold based on -Xjitthreshold.
Also remove handling of now unused -Xjitosrtreshold.
Test: test.py
Change-Id: Ib808373c58cacede2a8fa71ea6c69a4456cedbb5
diff --git a/runtime/jit/profiling_info.h b/runtime/jit/profiling_info.h
index e658717..ed0847c 100644
--- a/runtime/jit/profiling_info.h
+++ b/runtime/jit/profiling_info.h
@@ -108,11 +108,11 @@
}
void ResetCounter() {
- baseline_hotness_count_ = interpreter::kTieredHotnessMask;
+ baseline_hotness_count_ = GetOptimizeThreshold();
}
bool CounterHasChanged() const {
- return baseline_hotness_count_ != interpreter::kTieredHotnessMask;
+ return baseline_hotness_count_ != GetOptimizeThreshold();
}
uint16_t GetBaselineHotnessCount() const {
@@ -122,6 +122,8 @@
private:
ProfilingInfo(ArtMethod* method, const std::vector<uint32_t>& entries);
+ static uint16_t GetOptimizeThreshold();
+
// Hotness count for methods compiled with the JIT baseline compiler. Once
// a threshold is hit (currentily the maximum value of uint16_t), we will
// JIT compile optimized the method.