73 _old_generation_too_full_to_scavenge, |
75 _old_generation_too_full_to_scavenge, |
74 _adaptive_size_policy, |
76 _adaptive_size_policy, |
75 |
77 |
76 _g1_inc_collection_pause, |
78 _g1_inc_collection_pause, |
77 _g1_humongous_allocation, |
79 _g1_humongous_allocation, |
78 |
|
79 _last_ditch_collection, |
|
80 |
80 |
81 _dcmd_gc_run, |
81 _dcmd_gc_run, |
82 |
82 |
83 _last_gc_cause |
83 _last_gc_cause |
84 }; |
84 }; |
104 // _tenured_generation_full or _cms_generation_full for full tenured generations |
104 // _tenured_generation_full or _cms_generation_full for full tenured generations |
105 // _adaptive_size_policy for a full collection after a young GC |
105 // _adaptive_size_policy for a full collection after a young GC |
106 // _allocation_failure is the generic cause a collection which could result |
106 // _allocation_failure is the generic cause a collection which could result |
107 // in the collection of the tenured generation if there is not enough space |
107 // in the collection of the tenured generation if there is not enough space |
108 // in the tenured generation to support a young GC. |
108 // in the tenured generation to support a young GC. |
109 // _last_ditch_collection is a collection done to include SoftReferences. |
|
110 return (cause == GCCause::_tenured_generation_full || |
109 return (cause == GCCause::_tenured_generation_full || |
111 cause == GCCause::_cms_generation_full || |
110 cause == GCCause::_cms_generation_full || |
112 cause == GCCause::_adaptive_size_policy || |
111 cause == GCCause::_adaptive_size_policy || |
113 cause == GCCause::_allocation_failure || |
112 cause == GCCause::_allocation_failure); |
114 cause == GCCause::_last_ditch_collection); |
|
115 } |
113 } |
116 |
114 |
117 // Causes for collection of the young generation |
115 // Causes for collection of the young generation |
118 inline static bool is_allocation_failure_gc(GCCause::Cause cause) { |
116 inline static bool is_allocation_failure_gc(GCCause::Cause cause) { |
119 // _allocation_failure is the generic cause a collection for allocation failure |
117 // _allocation_failure is the generic cause a collection for allocation failure |
120 // _adaptive_size_policy is for a collecton done before a full GC |
118 // _adaptive_size_policy is for a collecton done before a full GC |
121 // _last_ditch_collection is a collection done to include SoftReferences. |
|
122 return (cause == GCCause::_allocation_failure || |
119 return (cause == GCCause::_allocation_failure || |
123 cause == GCCause::_adaptive_size_policy || |
120 cause == GCCause::_adaptive_size_policy); |
124 cause == GCCause::_last_ditch_collection); |
|
125 } |
121 } |
126 |
122 |
127 // Return a string describing the GCCause. |
123 // Return a string describing the GCCause. |
128 static const char* to_string(GCCause::Cause cause); |
124 static const char* to_string(GCCause::Cause cause); |
129 }; |
125 }; |