summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
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.