equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2011, 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. |
90 default: |
90 default: |
91 return "unknown GCCause"; |
91 return "unknown GCCause"; |
92 } |
92 } |
93 ShouldNotReachHere(); |
93 ShouldNotReachHere(); |
94 } |
94 } |
95 |
|
96 #ifndef PRODUCT |
|
97 |
|
98 bool GCCause::is_for_full_collection(GCCause::Cause cause) { |
|
99 bool result; |
|
100 |
|
101 // There are more GCCause::Cause types than listed here. |
|
102 // For brevity, we list only those that cause full collections. |
|
103 switch (cause) { |
|
104 case _allocation_failure: |
|
105 case _tenured_generation_full: |
|
106 case _permanent_generation_full: |
|
107 case _cms_generation_full: |
|
108 case _last_ditch_collection: |
|
109 result = true; |
|
110 break; |
|
111 |
|
112 default: |
|
113 result = false; |
|
114 break; |
|
115 } |
|
116 return result; |
|
117 } |
|
118 |
|
119 #endif // PRODUCT |
|