diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-10-20 17:18:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-10-20 17:18:51 +0000 |
commit | 1c1786f193323d3bd706463894001117f3471595 (patch) | |
tree | dfa9fcb41713e84353f7595ef0fc199a193e0450 | |
parent | fb686fb9a86f0b5fe70f49f2a3c5f49186df862f (diff) | |
parent | 2fdeecb890a353d3f17407cc1cb015e0a65c2220 (diff) | |
download | art-1c1786f193323d3bd706463894001117f3471595.zip art-1c1786f193323d3bd706463894001117f3471595.tar.gz art-1c1786f193323d3bd706463894001117f3471595.tar.bz2 |
Merge "Rosalloc should print unreachable page map type"
-rw-r--r-- | runtime/gc/allocator/rosalloc.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/runtime/gc/allocator/rosalloc.cc b/runtime/gc/allocator/rosalloc.cc index 0cea89d..a3da532 100644 --- a/runtime/gc/allocator/rosalloc.cc +++ b/runtime/gc/allocator/rosalloc.cc @@ -264,7 +264,7 @@ void* RosAlloc::AllocPages(Thread* self, size_t num_pages, uint8_t page_map_type } break; default: - LOG(FATAL) << "Unreachable - page map type: " << page_map_type; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_type); break; } if (kIsDebugBuild) { @@ -499,7 +499,7 @@ size_t RosAlloc::FreeInternal(Thread* self, void* ptr) { case kPageMapLargeObject: return FreePages(self, ptr, false); case kPageMapLargeObjectPart: - LOG(FATAL) << "Unreachable - page map type: " << page_map_[pm_idx]; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); return 0; case kPageMapRunPart: { // Find the beginning of the run. @@ -514,11 +514,11 @@ size_t RosAlloc::FreeInternal(Thread* self, void* ptr) { break; case kPageMapReleased: case kPageMapEmpty: - LOG(FATAL) << "Unreachable - page map type: " << page_map_[pm_idx]; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); return 0; } default: - LOG(FATAL) << "Unreachable - page map type: " << page_map_[pm_idx]; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); return 0; } } @@ -1189,7 +1189,7 @@ size_t RosAlloc::BulkFree(Thread* self, void** ptrs, size_t num_ptrs) { freed_bytes += FreePages(self, ptr, false); continue; } else { - LOG(FATAL) << "Unreachable - page map type: " << page_map_entry; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_entry); } } else { // Read the page map entries with a lock. @@ -1215,7 +1215,7 @@ size_t RosAlloc::BulkFree(Thread* self, void** ptrs, size_t num_ptrs) { freed_bytes += FreePages(self, ptr, false); continue; } else { - LOG(FATAL) << "Unreachable - page map type: " << page_map_entry; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_entry); } } DCHECK(run != nullptr); @@ -1477,7 +1477,7 @@ size_t RosAlloc::UsableSize(void* ptr) { return IndexToBracketSize(idx); } default: { - LOG(FATAL) << "Unreachable - page map type: " << page_map_[pm_idx]; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); break; } } @@ -1593,7 +1593,7 @@ void RosAlloc::InspectAll(void (*handler)(void* start, void* end, size_t used_by break; } case kPageMapLargeObjectPart: - LOG(FATAL) << "Unreachable - page map type: " << pm; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm); break; case kPageMapRun: { // The start of a run. @@ -1613,10 +1613,10 @@ void RosAlloc::InspectAll(void (*handler)(void* start, void* end, size_t used_by break; } case kPageMapRunPart: - LOG(FATAL) << "Unreachable - page map type: " << pm; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm); break; default: - LOG(FATAL) << "Unreachable - page map type: " << pm; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm); break; } } @@ -1929,7 +1929,7 @@ void RosAlloc::Verify() { break; } case kPageMapLargeObjectPart: - LOG(FATAL) << "Unreachable - page map type: " << pm << std::endl << DumpPageMap(); + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm) << std::endl << DumpPageMap(); break; case kPageMapRun: { // The start of a run. @@ -1957,7 +1957,7 @@ void RosAlloc::Verify() { case kPageMapRunPart: // Fall-through. default: - LOG(FATAL) << "Unreachable - page map type: " << pm << std::endl << DumpPageMap(); + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm) << std::endl << DumpPageMap(); break; } } @@ -2146,7 +2146,7 @@ size_t RosAlloc::ReleasePages() { ++i; break; // Skip. default: - LOG(FATAL) << "Unreachable - page map type: " << pm; + LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(pm); break; } } |