Include a new heap summary line in the SIGQUIT output.
Looks like this:
Heap: 87% free, 4MB/32MB; 6327 objects
While I'm here, fix another long-standing TODO to make PrettySize have the
usual google3 behavior. (I took the specific thresholds from Chromium.)
Also distinguish between the more general "Dump" member functions and the
specific SIGQUIT-related ones by consistently calling the latter DumpForSigQuit.
Change-Id: I76e783adc18dd089bac9b348f53dc9860a0fe4b9
diff --git a/src/runtime.cc b/src/runtime.cc
index 77c887e..947eec5 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -745,13 +745,13 @@
#undef REGISTER
}
-void Runtime::Dump(std::ostream& os) {
- // TODO: dump other runtime statistics?
+void Runtime::DumpForSigQuit(std::ostream& os) {
GetClassLinker()->DumpForSigQuit(os);
GetInternTable()->DumpForSigQuit(os);
+ GetHeap()->DumpForSigQuit(os);
os << "\n";
- thread_list_->Dump(os);
+ thread_list_->DumpForSigQuit(os);
}
void Runtime::DumpLockHolders(std::ostream& os) {