57 _allocation_failure,
58
59 /* implementation specific */
60
61 _tenured_generation_full,
62 _metadata_GC_threshold,
63
64 _cms_generation_full,
65 _cms_initial_mark,
66 _cms_final_remark,
67 _cms_concurrent_mark,
68
69 _old_generation_expanded_on_last_scavenge,
70 _old_generation_too_full_to_scavenge,
71 _adaptive_size_policy,
72
73 _g1_inc_collection_pause,
74 _g1_humongous_allocation,
75
76 _last_ditch_collection,
77 _last_gc_cause
78 };
79
80 inline static bool is_user_requested_gc(GCCause::Cause cause) {
81 return (cause == GCCause::_java_lang_system_gc ||
82 cause == GCCause::_jvmti_force_gc);
83 }
84
85 inline static bool is_serviceability_requested_gc(GCCause::Cause
86 cause) {
87 return (cause == GCCause::_jvmti_force_gc ||
88 cause == GCCause::_heap_inspection ||
89 cause == GCCause::_heap_dump);
90 }
91
92 // Return a string describing the GCCause.
93 static const char* to_string(GCCause::Cause cause);
94 };
95
96 // Helper class for doing logging that includes the GC Cause
97 // as a string.
98 class GCCauseString : StackObj {
99 private:
100 static const int _length = 128;
101 char _buffer[_length];
102 int _position;
|
57 _allocation_failure,
58
59 /* implementation specific */
60
61 _tenured_generation_full,
62 _metadata_GC_threshold,
63
64 _cms_generation_full,
65 _cms_initial_mark,
66 _cms_final_remark,
67 _cms_concurrent_mark,
68
69 _old_generation_expanded_on_last_scavenge,
70 _old_generation_too_full_to_scavenge,
71 _adaptive_size_policy,
72
73 _g1_inc_collection_pause,
74 _g1_humongous_allocation,
75
76 _last_ditch_collection,
77
78 _dcmd_gc_run,
79
80 _last_gc_cause
81 };
82
83 inline static bool is_user_requested_gc(GCCause::Cause cause) {
84 return (cause == GCCause::_java_lang_system_gc ||
85 cause == GCCause::_dcmd_gc_run);
86 }
87
88 inline static bool is_serviceability_requested_gc(GCCause::Cause
89 cause) {
90 return (cause == GCCause::_jvmti_force_gc ||
91 cause == GCCause::_heap_inspection ||
92 cause == GCCause::_heap_dump);
93 }
94
95 // Return a string describing the GCCause.
96 static const char* to_string(GCCause::Cause cause);
97 };
98
99 // Helper class for doing logging that includes the GC Cause
100 // as a string.
101 class GCCauseString : StackObj {
102 private:
103 static const int _length = 128;
104 char _buffer[_length];
105 int _position;
|