summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2021-11-06 13:58:31 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2021-11-10 09:19:19 +0000
commit61673dc4bdee2fa4770ee72fbc347cca595dd231 (patch)
tree4a3a3f1b712e72bc7b9be3c84c5c79ce3588bdbf /runtime/class_linker.cc
parentf726d20976dff58db4e0111860f6b23b77be61a7 (diff)
Reland "Change hotness counting."
This reverts commit ce131feb7c60ffdf28c315c5d67f9cac33a077ce. Bug: 203810169 Test: test.py Test: health/microbench/startup/hscapps/compile-speed-profile/open-clock Reason for revert: Kept logic from before on what methods to save in the profile. Change-Id: Id67cd47a9fe31b4c6b154db20f632015238016d2
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 7bdf70ffd9..6dbb3ff70a 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1956,6 +1956,9 @@ bool ClassLinker::AddImageSpace(
const dex::CodeItem* code_item = method.GetDexFile()->GetCodeItem(
reinterpret_cast32<uint32_t>(method.GetDataPtrSize(image_pointer_size_)));
method.SetCodeItem(code_item);
+ // The hotness counter may have changed since we compiled the image, so
+ // reset it with the runtime value.
+ method.ResetCounter();
}
// Set image methods' entry point that point to the interpreter bridge to the
// nterp entry point.