diff options
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/collector/mark_sweep.cc | 1 | ||||
-rw-r--r-- | runtime/gc/gc_cause.cc | 2 | ||||
-rw-r--r-- | runtime/gc/heap.cc | 8 | ||||
-rw-r--r-- | runtime/gc/space/bump_pointer_space.cc | 4 | ||||
-rw-r--r-- | runtime/gc/space/space.cc | 24 | ||||
-rw-r--r-- | runtime/gc/space/zygote_space.cc | 3 |
6 files changed, 23 insertions, 19 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc index 83da0639ea..ad3bb11d80 100644 --- a/runtime/gc/collector/mark_sweep.cc +++ b/runtime/gc/collector/mark_sweep.cc @@ -813,6 +813,7 @@ void MarkSweep::ScanGrayObjects(bool paused, uint8_t minimum_age) { break; default: LOG(FATAL) << "Unreachable"; + UNREACHABLE(); } TimingLogger::ScopedTiming t(name, GetTimings()); ScanObjectVisitor visitor(this); diff --git a/runtime/gc/gc_cause.cc b/runtime/gc/gc_cause.cc index f0e1512adf..6be683df48 100644 --- a/runtime/gc/gc_cause.cc +++ b/runtime/gc/gc_cause.cc @@ -35,8 +35,8 @@ const char* PrettyCause(GcCause cause) { case kGcCauseTrim: return "HeapTrim"; default: LOG(FATAL) << "Unreachable"; + UNREACHABLE(); } - return ""; } std::ostream& operator<<(std::ostream& os, const GcCause& gc_cause) { diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index bceac4403d..c0008aac84 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -1325,8 +1325,9 @@ mirror::Object* Heap::AllocateInternalWithGc(Thread* self, AllocatorType allocat // Throw OOM by default. break; default: { - LOG(FATAL) << "Unimplemented homogeneous space compaction result " - << static_cast<size_t>(result); + UNIMPLEMENTED(FATAL) << "homogeneous space compaction result: " + << static_cast<size_t>(result); + UNREACHABLE(); } } // Always print that we ran homogeneous space compation since this can cause jank. @@ -1761,7 +1762,8 @@ void Heap::ChangeCollector(CollectorType collector_type) { break; } default: { - LOG(FATAL) << "Unimplemented"; + UNIMPLEMENTED(FATAL); + UNREACHABLE(); } } if (IsGcConcurrent()) { diff --git a/runtime/gc/space/bump_pointer_space.cc b/runtime/gc/space/bump_pointer_space.cc index 8f42642b17..0a55b52c08 100644 --- a/runtime/gc/space/bump_pointer_space.cc +++ b/runtime/gc/space/bump_pointer_space.cc @@ -201,8 +201,8 @@ void BumpPointerSpace::Walk(ObjectCallback* callback, void* arg) { } accounting::ContinuousSpaceBitmap::SweepCallback* BumpPointerSpace::GetSweepCallback() { - LOG(FATAL) << "Unimplemented"; - return nullptr; + UNIMPLEMENTED(FATAL); + UNREACHABLE(); } uint64_t BumpPointerSpace::GetBytesAllocated() { diff --git a/runtime/gc/space/space.cc b/runtime/gc/space/space.cc index bff28f6d19..b233805e4c 100644 --- a/runtime/gc/space/space.cc +++ b/runtime/gc/space/space.cc @@ -39,33 +39,33 @@ std::ostream& operator<<(std::ostream& os, const Space& space) { } DlMallocSpace* Space::AsDlMallocSpace() { - LOG(FATAL) << "Unreachable"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } RosAllocSpace* Space::AsRosAllocSpace() { - LOG(FATAL) << "Unreachable"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } ZygoteSpace* Space::AsZygoteSpace() { - LOG(FATAL) << "Unreachable"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } BumpPointerSpace* Space::AsBumpPointerSpace() { - LOG(FATAL) << "Unreachable"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } AllocSpace* Space::AsAllocSpace() { - LOG(FATAL) << "Unimplemented"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } ContinuousMemMapAllocSpace* Space::AsContinuousMemMapAllocSpace() { - LOG(FATAL) << "Unimplemented"; - return nullptr; + UNIMPLEMENTED(FATAL) << "Unreachable"; + UNREACHABLE(); } DiscontinuousSpace::DiscontinuousSpace(const std::string& name, diff --git a/runtime/gc/space/zygote_space.cc b/runtime/gc/space/zygote_space.cc index 51d84f5acb..9de0548561 100644 --- a/runtime/gc/space/zygote_space.cc +++ b/runtime/gc/space/zygote_space.cc @@ -58,7 +58,8 @@ ZygoteSpace* ZygoteSpace::Create(const std::string& name, MemMap* mem_map, } void ZygoteSpace::Clear() { - LOG(FATAL) << "Unimplemented"; + UNIMPLEMENTED(FATAL); + UNREACHABLE(); } ZygoteSpace::ZygoteSpace(const std::string& name, MemMap* mem_map, size_t objects_allocated) |