< prev index next >

src/share/vm/gc/g1/concurrentMark.cpp

Print this page

        

*** 434,443 **** --- 434,444 ---- _has_overflown(false), _concurrent(false), _has_aborted(false), _restart_for_overflow(false), _concurrent_marking_in_progress(false), + _concurrent_marking_from_roots(false), // _verbose_level set below _init_times(), _remark_times(), _remark_mark_times(), _remark_weak_ref_times(),
*** 1001,1018 **** --- 1002,1033 ---- // mainly used for sanity checking. root_regions()->scan_finished(); } } + void ConcurrentMark::register_mark_from_roots_phase_start() { + _concurrent_marking_from_roots = true; + _g1h->gc_timer_cm()->register_gc_concurrent_start("Concurrent Mark"); + } + + void ConcurrentMark::register_mark_from_roots_phase_end() { + _concurrent_marking_from_roots = false; + if (!has_aborted()) { + _g1h->gc_timer_cm()->register_gc_concurrent_end(); + } + } + void ConcurrentMark::markFromRoots() { // we might be tempted to assert that: // assert(asynch == !SafepointSynchronize::is_at_safepoint(), // "inconsistent argument?"); // However that wouldn't be right, because it's possible that // a safepoint is indeed in progress as a younger generation // stop-the-world GC happens even as we mark in this generation. + register_mark_from_roots_phase_start(); + _restart_for_overflow = false; // _g1h has _n_par_threads _parallel_marking_threads = calc_parallel_marking_threads(); assert(parallel_marking_threads() <= max_parallel_marking_threads(),
*** 1025,1034 **** --- 1040,1052 ---- set_concurrency_and_phase(active_workers, true /* concurrent */); CMConcurrentMarkingTask markingTask(this, cmThread()); _parallel_workers->set_active_workers(active_workers); _parallel_workers->run_task(&markingTask); + + register_mark_from_roots_phase_end(); + print_stats(); } void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) { // world is stopped at this checkpoint
< prev index next >