diff options
author | 2023-04-26 15:08:50 +0100 | |
---|---|---|
committer | 2023-04-26 15:29:40 +0000 | |
commit | 8890cdfd96cebe59b62dd010747f9babb8fa005c (patch) | |
tree | ef08bb62c09e56ea3226dd0745957a21bb788a58 | |
parent | b0cf71e984edb63e1bd1a6caf051eb394223fd40 (diff) |
Add some logging around runtime images.
To better diagnose problems.
Test: test.py
Bug: 260557058
Change-Id: I8672b9e42f43a3c8937f191658859f340059d057
-rw-r--r-- | runtime/gc/heap.cc | 9 | ||||
-rw-r--r-- | runtime/oat_file_manager.cc | 3 |
2 files changed, 11 insertions, 1 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); } diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc index 32de17486e..25ebaff7d5 100644 --- a/runtime/oat_file_manager.cc +++ b/runtime/oat_file_manager.cc @@ -278,7 +278,8 @@ std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat( image_space = gc::space::ImageSpace::CreateFromAppImage( art_file.c_str(), oat_file.get(), &error_msg); if (image_space == nullptr) { - VLOG(image) << "Could not load runtime generated app image: " << error_msg; + (OS::FileExists(art_file.c_str()) ? LOG_STREAM(INFO) : VLOG_STREAM(image)) + << "Could not load runtime generated app image: " << error_msg; } } } |