< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
@@ -3990,18 +3990,21 @@
return false;
}
_gc_timer_stw->register_gc_start();
- GCIdMark gc_id_mark;
- _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start());
SvcGCMarker sgcm(SvcGCMarker::MINOR);
ResourceMark rm;
wait_for_root_region_scanning();
+ bool should_start_conc_mark = fasle;
+ {
+ GCIdMark gc_id_mark;
+ _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start());
+
G1Log::update_level();
print_heap_before_gc();
trace_heap_before_gc(_gc_tracer_stw);
verify_region_sets_optional();
@@ -4020,11 +4023,11 @@
assert(!collector_state()->mark_in_progress() || collector_state()->gcs_are_young(), "sanity");
// Record whether this pause is an initial mark. When the current
// thread has completed its logging output and it's safe to signal
// the CM thread, the flag's value in the policy has been reset.
- bool should_start_conc_mark = collector_state()->during_initial_mark_pause();
+ should_start_conc_mark = collector_state()->during_initial_mark_pause();
// Inner scope for scope based logging, timers, and stats collection
{
EvacuationInfo evacuation_info;
@@ -4344,10 +4347,11 @@
_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.
+ }
if (should_start_conc_mark) {
// CAUTION: after the doConcurrentMark() call below,
// the concurrent marking thread(s) could be running
// concurrently with us. Make sure that anything after
< prev index next >