Add RosAlloc stats dump.
For better understanding of the RosAlloc space.
(cherrypick commit 565c2d9bce43c430d4267c82f5702160d971e712)
Bug: 27744947
Bug: 9986565
Change-Id: I8309761a68fbc143bbcd8458a9194085aace7c3e
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index b12cb5b..1fa2d1a 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -928,6 +928,9 @@
void LogFragmentationAllocFailure(std::ostream& os, size_t failed_alloc_bytes)
REQUIRES(!bulk_free_lock_, !lock_);
+ void DumpStats(std::ostream& os)
+ REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_) REQUIRES(!bulk_free_lock_);
+
private:
friend std::ostream& operator<<(std::ostream& os, const RosAlloc::PageMapKind& rhs);