summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-11-24 10:50:11 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2023-11-24 13:21:12 +0000
commit8ffa25947213bca36b0d39e94e037d9231f77441 (patch)
treefc80954dc3dafe2751f109c339c988e8a574fbb5
parentc0eceac192ecc628be22df5fd5484bcc50591737 (diff)
Increase the hotness lookup threshold.
Looking up method/field/string/class from nterp has a big cost, so adjust the treshold accordingly. Reduces jank on compose view scrolling for 20 seconds: - For Go Mokey: - Before: ~300 frames drawn / ~30% janky frames - After: ~400 frames drawn / ~22% janky frames - For Pixel 8 pro: - Before: ~2300 frames drawn / ~3% janky frames - After: ~2400 frames drawn / ~1% janky frames Test: test.py Bug: 313040662 Change-Id: Icf9c2a85f0a7b7633dddd3a28d44068111e01e35
-rw-r--r--runtime/interpreter/mterp/nterp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/interpreter/mterp/nterp.cc b/runtime/interpreter/mterp/nterp.cc
index ddd5912f49..668289a37d 100644
--- a/runtime/interpreter/mterp/nterp.cc
+++ b/runtime/interpreter/mterp/nterp.cc
@@ -118,7 +118,7 @@ void CheckNterpAsmConstants() {
inline void UpdateHotness(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_) {
// The hotness we will add to a method when we perform a
// field/method/class/string lookup.
- constexpr uint16_t kNterpHotnessLookup = 0xf;
+ constexpr uint16_t kNterpHotnessLookup = 0xff;
method->UpdateCounter(kNterpHotnessLookup);
}