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/gc/heap.h b/runtime/gc/heap.h
index 1c2b7ef..7d2441b 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -518,8 +518,9 @@
void PreGcVerification(collector::GarbageCollector* gc);
void PreSweepingGcVerification(collector::GarbageCollector* gc)
+ EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);
+ void PostGcVerification(collector::GarbageCollector* gc)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void PostGcVerification(collector::GarbageCollector* gc);
// Update the watermark for the native allocated bytes based on the current number of native
// bytes allocated and the target utilization ratio.