src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 5685 : 8028128: Add a type safe alternative for working with counter based data
Reviewed-by:

*** 54,63 **** --- 54,64 ---- #include "memory/generationSpec.hpp" #include "memory/referenceProcessor.hpp" #include "oops/oop.inline.hpp" #include "oops/oop.pcgc.inline.hpp" #include "runtime/vmThread.hpp" + #include "utilities/ticks.hpp" size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0; // turn it on so that the contents of the young list (scan-only / // to-be-collected) are printed at "strategic" points before / during
*** 1282,1292 **** if (GC_locker::check_active_before_gc()) { return false; } STWGCTimer* gc_timer = G1MarkSweep::gc_timer(); ! gc_timer->register_gc_start(os::elapsed_counter()); SerialOldTracer* gc_tracer = G1MarkSweep::gc_tracer(); gc_tracer->report_gc_start(gc_cause(), gc_timer->gc_start()); SvcGCMarker sgcm(SvcGCMarker::FULL); --- 1283,1293 ---- if (GC_locker::check_active_before_gc()) { return false; } STWGCTimer* gc_timer = G1MarkSweep::gc_timer(); ! gc_timer->register_gc_start(); SerialOldTracer* gc_tracer = G1MarkSweep::gc_tracer(); gc_tracer->report_gc_start(gc_cause(), gc_timer->gc_start()); SvcGCMarker sgcm(SvcGCMarker::FULL);
*** 1550,1560 **** print_heap_after_gc(); trace_heap_after_gc(gc_tracer); post_full_gc_dump(gc_timer); ! gc_timer->register_gc_end(os::elapsed_counter()); gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); } return true; } --- 1551,1561 ---- print_heap_after_gc(); trace_heap_after_gc(gc_tracer); post_full_gc_dump(gc_timer); ! gc_timer->register_gc_end(); gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); } return true; }
*** 2480,2490 **** // and it's waiting for a full GC to finish will be woken up. It is // waiting in VM_G1IncCollectionPause::doit_epilogue(). FullGCCount_lock->notify_all(); } ! void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) { _concurrent_cycle_started = true; _gc_timer_cm->register_gc_start(start_time); _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start()); trace_heap_before_gc(_gc_tracer_cm); --- 2481,2491 ---- // and it's waiting for a full GC to finish will be woken up. It is // waiting in VM_G1IncCollectionPause::doit_epilogue(). FullGCCount_lock->notify_all(); } ! void G1CollectedHeap::register_concurrent_cycle_start(const Ticks& start_time) { _concurrent_cycle_started = true; _gc_timer_cm->register_gc_start(start_time); _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start()); trace_heap_before_gc(_gc_tracer_cm);
*** 2494,2504 **** if (_concurrent_cycle_started) { if (_cm->has_aborted()) { _gc_tracer_cm->report_concurrent_mode_failure(); } ! _gc_timer_cm->register_gc_end(os::elapsed_counter()); _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions()); _concurrent_cycle_started = false; } } --- 2495,2505 ---- if (_concurrent_cycle_started) { if (_cm->has_aborted()) { _gc_tracer_cm->report_concurrent_mode_failure(); } ! _gc_timer_cm->register_gc_end(); _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions()); _concurrent_cycle_started = false; } }
*** 3885,3895 **** if (GC_locker::check_active_before_gc()) { return false; } ! _gc_timer_stw->register_gc_start(os::elapsed_counter()); _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start()); SvcGCMarker sgcm(SvcGCMarker::MINOR); ResourceMark rm; --- 3886,3896 ---- if (GC_locker::check_active_before_gc()) { return false; } ! _gc_timer_stw->register_gc_start(); _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start()); SvcGCMarker sgcm(SvcGCMarker::MINOR); ResourceMark rm;
*** 4263,4273 **** // before any GC notifications are raised. g1mm()->update_sizes(); _gc_tracer_stw->report_evacuation_info(&evacuation_info); _gc_tracer_stw->report_tenuring_threshold(_g1_policy->tenuring_threshold()); ! _gc_timer_stw->register_gc_end(os::elapsed_counter()); _gc_tracer_stw->report_gc_end(_gc_timer_stw->gc_end(), _gc_timer_stw->time_partitions()); } // It should now be safe to tell the concurrent mark thread to start // without its logging output interfering with the logging output // that came from the pause. --- 4264,4274 ---- // before any GC notifications are raised. g1mm()->update_sizes(); _gc_tracer_stw->report_evacuation_info(&evacuation_info); _gc_tracer_stw->report_tenuring_threshold(_g1_policy->tenuring_threshold()); ! _gc_timer_stw->register_gc_end(); _gc_tracer_stw->report_gc_end(_gc_timer_stw->gc_end(), _gc_timer_stw->time_partitions()); } // It should now be safe to tell the concurrent mark thread to start // without its logging output interfering with the logging output // that came from the pause.