Don't use ScopedObjectAccess in Heap::DumpSpaces
ScopedObjectAccess does not work well if the mutator lock is
excusively held while in a suspend thread state. This caused
deadlocks and DCHECK failures.
Bug: 27493316
(cherry picked from commit 03d21bc5bed887243ff6ce3531179185ffd3532c)
Change-Id: I5d67f74fc7082761e45dc1d7778b0ea7fceaaf8f
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index dba9dd7..f204b28 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -443,7 +443,7 @@
static Bin BinTypeForNativeRelocationType(NativeObjectRelocationType type);
- uintptr_t NativeOffsetInImage(void* obj);
+ uintptr_t NativeOffsetInImage(void* obj) SHARED_REQUIRES(Locks::mutator_lock_);
// Location of where the object will be when the image is loaded at runtime.
template <typename T>