summaryrefslogtreecommitdiff
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-04-26 15:08:50 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2023-04-26 15:29:40 +0000
commit8890cdfd96cebe59b62dd010747f9babb8fa005c (patch)
treeef08bb62c09e56ea3226dd0745957a21bb788a58 /runtime/gc/heap.cc
parentb0cf71e984edb63e1bd1a6caf051eb394223fd40 (diff)
Add some logging around runtime images.
To better diagnose problems. Test: test.py Bug: 260557058 Change-Id: I8672b9e42f43a3c8937f191658859f340059d057
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 776695dba9..f27bddb361 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3630,6 +3630,15 @@ collector::GcType Heap::WaitForGcToCompleteLocked(GcCause cause, Thread* self) {
void Heap::DumpForSigQuit(std::ostream& os) {
os << "Heap: " << GetPercentFree() << "% free, " << PrettySize(GetBytesAllocated()) << "/"
<< PrettySize(GetTotalMemory()) << "; " << GetObjectsAllocated() << " objects\n";
+ {
+ os << "Image spaces:\n";
+ ScopedObjectAccess soa(Thread::Current());
+ for (const auto& space : continuous_spaces_) {
+ if (space->IsImageSpace()) {
+ os << space->GetName() << "\n";
+ }
+ }
+ }
DumpGcPerformanceInfo(os);
}