Disable shared method memory optimization.
While we're waiting for better profiles.
Bug: 225466002
Test: m
(cherry picked from commit 9f466bd54aa6a6c0f12b2a6ccf4d19bc987bcf04)
Merged-In: I0cfdb80346f8ae1f35b289787898c20955c36899
Change-Id: I2209237c70c7c42af850086d2ed756efd2c734ba
diff --git a/runtime/art_method.h b/runtime/art_method.h
index d8bd380..c2de718 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -259,7 +259,9 @@
}
void SetMemorySharedMethod() REQUIRES_SHARED(Locks::mutator_lock_) {
- if (!IsIntrinsic() && !IsAbstract()) {
+ // Disable until we make sure critical code is AOTed.
+ static constexpr bool kEnabledMemorySharedMethod = false;
+ if (kEnabledMemorySharedMethod && !IsIntrinsic() && !IsAbstract()) {
AddAccessFlags(kAccMemorySharedMethod);
SetHotCounter();
}