Fix object identity hash.
The object identity hash is now stored in the monitor word after
being computed. Hashes are computed by a pseudo random number
generator.
When we write the image, we eagerly compute object hashes to
prevent pages getting dirtied.
Bug: 8981901
Change-Id: Ic8edacbacb0afc7055fd740a52444929f88ed564
diff --git a/runtime/runtime.h b/runtime/runtime.h
index b6429b6..77da098 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -331,7 +331,8 @@
// Sweep system weaks, the system weak is deleted if the visitor return nullptr. Otherwise, the
// system weak is updated to be the visitor's returned value.
- void SweepSystemWeaks(RootVisitor* visitor, void* arg);
+ void SweepSystemWeaks(RootVisitor* visitor, void* arg)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Returns a special method that calls into a trampoline for runtime method resolution
mirror::ArtMethod* GetResolutionMethod() const {