equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
34 case StartsHumongousTag: |
34 case StartsHumongousTag: |
35 case ContinuesHumongousTag: |
35 case ContinuesHumongousTag: |
36 case OldTag: |
36 case OldTag: |
37 case ArchiveTag: |
37 case ArchiveTag: |
38 return true; |
38 return true; |
|
39 default: |
|
40 return false; |
39 } |
41 } |
40 return false; |
|
41 } |
42 } |
42 |
43 |
43 const char* HeapRegionType::get_str() const { |
44 const char* HeapRegionType::get_str() const { |
44 hrt_assert_is_valid(_tag); |
45 hrt_assert_is_valid(_tag); |
45 switch (_tag) { |
46 switch (_tag) { |
48 case SurvTag: return "SURV"; |
49 case SurvTag: return "SURV"; |
49 case StartsHumongousTag: return "HUMS"; |
50 case StartsHumongousTag: return "HUMS"; |
50 case ContinuesHumongousTag: return "HUMC"; |
51 case ContinuesHumongousTag: return "HUMC"; |
51 case OldTag: return "OLD"; |
52 case OldTag: return "OLD"; |
52 case ArchiveTag: return "ARC"; |
53 case ArchiveTag: return "ARC"; |
|
54 default: |
|
55 ShouldNotReachHere(); |
|
56 return NULL; // keep some compilers happy |
53 } |
57 } |
54 ShouldNotReachHere(); |
|
55 // keep some compilers happy |
|
56 return NULL; |
|
57 } |
58 } |
58 |
59 |
59 const char* HeapRegionType::get_short_str() const { |
60 const char* HeapRegionType::get_short_str() const { |
60 hrt_assert_is_valid(_tag); |
61 hrt_assert_is_valid(_tag); |
61 switch (_tag) { |
62 switch (_tag) { |
64 case SurvTag: return "S"; |
65 case SurvTag: return "S"; |
65 case StartsHumongousTag: return "HS"; |
66 case StartsHumongousTag: return "HS"; |
66 case ContinuesHumongousTag: return "HC"; |
67 case ContinuesHumongousTag: return "HC"; |
67 case OldTag: return "O"; |
68 case OldTag: return "O"; |
68 case ArchiveTag: return "A"; |
69 case ArchiveTag: return "A"; |
|
70 default: |
|
71 ShouldNotReachHere(); |
|
72 return NULL; // keep some compilers happy |
69 } |
73 } |
70 ShouldNotReachHere(); |
|
71 // keep some compilers happy |
|
72 return NULL; |
|
73 } |
74 } |
74 |
75 |
75 G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() { |
76 G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() { |
76 hrt_assert_is_valid(_tag); |
77 hrt_assert_is_valid(_tag); |
77 switch (_tag) { |
78 switch (_tag) { |
80 case SurvTag: return G1HeapRegionTraceType::Survivor; |
81 case SurvTag: return G1HeapRegionTraceType::Survivor; |
81 case StartsHumongousTag: return G1HeapRegionTraceType::StartsHumongous; |
82 case StartsHumongousTag: return G1HeapRegionTraceType::StartsHumongous; |
82 case ContinuesHumongousTag: return G1HeapRegionTraceType::ContinuesHumongous; |
83 case ContinuesHumongousTag: return G1HeapRegionTraceType::ContinuesHumongous; |
83 case OldTag: return G1HeapRegionTraceType::Old; |
84 case OldTag: return G1HeapRegionTraceType::Old; |
84 case ArchiveTag: return G1HeapRegionTraceType::Archive; |
85 case ArchiveTag: return G1HeapRegionTraceType::Archive; |
|
86 default: |
|
87 ShouldNotReachHere(); |
|
88 return G1HeapRegionTraceType::Free; // keep some compilers happy |
85 } |
89 } |
86 ShouldNotReachHere(); |
|
87 // keep some compilers happy |
|
88 return G1HeapRegionTraceType::Free; |
|
89 } |
90 } |