< prev index next >
src/share/vm/gc/g1/heapRegionType.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -34,12 +34,13 @@
case StartsHumongousTag:
case ContinuesHumongousTag:
case OldTag:
case ArchiveTag:
return true;
- }
+ default:
return false;
+ }
}
const char* HeapRegionType::get_str() const {
hrt_assert_is_valid(_tag);
switch (_tag) {
@@ -48,14 +49,14 @@
case SurvTag: return "SURV";
case StartsHumongousTag: return "HUMS";
case ContinuesHumongousTag: return "HUMC";
case OldTag: return "OLD";
case ArchiveTag: return "ARC";
- }
+ default:
ShouldNotReachHere();
- // keep some compilers happy
- return NULL;
+ return NULL; // keep some compilers happy
+ }
}
const char* HeapRegionType::get_short_str() const {
hrt_assert_is_valid(_tag);
switch (_tag) {
@@ -64,14 +65,14 @@
case SurvTag: return "S";
case StartsHumongousTag: return "HS";
case ContinuesHumongousTag: return "HC";
case OldTag: return "O";
case ArchiveTag: return "A";
- }
+ default:
ShouldNotReachHere();
- // keep some compilers happy
- return NULL;
+ return NULL; // keep some compilers happy
+ }
}
G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() {
hrt_assert_is_valid(_tag);
switch (_tag) {
@@ -80,10 +81,10 @@
case SurvTag: return G1HeapRegionTraceType::Survivor;
case StartsHumongousTag: return G1HeapRegionTraceType::StartsHumongous;
case ContinuesHumongousTag: return G1HeapRegionTraceType::ContinuesHumongous;
case OldTag: return G1HeapRegionTraceType::Old;
case ArchiveTag: return G1HeapRegionTraceType::Archive;
- }
+ default:
ShouldNotReachHere();
- // keep some compilers happy
- return G1HeapRegionTraceType::Free;
+ return G1HeapRegionTraceType::Free; // keep some compilers happy
+ }
}
< prev index next >