< prev index next >

src/hotspot/share/services/memoryManager.cpp

Print this page

        

*** 208,218 **** // hold the publicly available "last (completed) gc" information. } void GCMemoryManager::gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, bool recordAccumulatedGCTime) { ! assert(_last_gc_stat != NULL && _current_gc_stat != NULL, "Just checking"); if (recordAccumulatedGCTime) { _accumulated_timer.start(); } // _num_collections now increases in gc_end, to count completed collections if (recordGCBeginTime) { --- 208,221 ---- // hold the publicly available "last (completed) gc" information. } void GCMemoryManager::gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, bool recordAccumulatedGCTime) { ! // Inactive memory managers (young, mixed, and concurrent in G1 legacy mode, ! // and incremental in G1 default mode) will not be initialized. ! if (_last_gc_stat == NULL && _current_gc_stat == NULL) return; ! if (recordAccumulatedGCTime) { _accumulated_timer.start(); } // _num_collections now increases in gc_end, to count completed collections if (recordGCBeginTime) {
*** 241,250 **** --- 244,255 ---- void GCMemoryManager::gc_end(bool recordPostGCUsage, bool recordAccumulatedGCTime, bool recordGCEndTime, bool countCollection, GCCause::Cause cause, bool allMemoryPoolsAffected) { + if (_last_gc_stat == NULL && _current_gc_stat == NULL) return; + if (recordAccumulatedGCTime) { _accumulated_timer.stop(); } if (recordGCEndTime) { _current_gc_stat->set_end_time(Management::timestamp());
< prev index next >