2796 // thread has completed its logging output and it's safe to signal
2797 // the CM thread, the flag's value in the policy has been reset.
2798 bool should_start_conc_mark = collector_state()->in_initial_mark_gc();
2799
2800 // Inner scope for scope based logging, timers, and stats collection
2801 {
2802 EvacuationInfo evacuation_info;
2803
2804 if (collector_state()->in_initial_mark_gc()) {
2805 // We are about to start a marking cycle, so we increment the
2806 // full collection counter.
2807 increment_old_marking_cycles_started();
2808 _cm->gc_tracer_cm()->set_gc_cause(gc_cause());
2809 }
2810
2811 _gc_tracer_stw->report_yc_type(collector_state()->yc_type());
2812
2813 GCTraceCPUTime tcpu;
2814
2815 G1HeapVerifier::G1VerifyType verify_type;
2816 FormatBuffer<> gc_string("Pause ");
2817 if (collector_state()->in_initial_mark_gc()) {
2818 gc_string.append("Initial Mark");
2819 verify_type = G1HeapVerifier::G1VerifyInitialMark;
2820 } else if (collector_state()->in_young_only_phase()) {
2821 gc_string.append("Young");
2822 verify_type = G1HeapVerifier::G1VerifyYoungOnly;
2823 } else {
2824 gc_string.append("Mixed");
2825 verify_type = G1HeapVerifier::G1VerifyMixed;
2826 }
2827 GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true);
2828
2829 uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
2830 workers()->active_workers(),
2831 Threads::number_of_non_daemon_threads());
2832 active_workers = workers()->update_active_workers(active_workers);
2833 log_info(gc,task)("Using %u workers of %u for evacuation", active_workers, workers()->total_workers());
2834
2835 TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
2836 TraceMemoryManagerStats tms(&_memory_manager, gc_cause());
2837
2838 G1HeapTransition heap_transition(this);
2839 size_t heap_used_bytes_before_gc = used();
2840
2841 // Don't dynamically change the number of GC threads this early. A value of
2842 // 0 is used to indicate serial work. When parallel work is done,
2843 // it will be set.
2844
|
2796 // thread has completed its logging output and it's safe to signal
2797 // the CM thread, the flag's value in the policy has been reset.
2798 bool should_start_conc_mark = collector_state()->in_initial_mark_gc();
2799
2800 // Inner scope for scope based logging, timers, and stats collection
2801 {
2802 EvacuationInfo evacuation_info;
2803
2804 if (collector_state()->in_initial_mark_gc()) {
2805 // We are about to start a marking cycle, so we increment the
2806 // full collection counter.
2807 increment_old_marking_cycles_started();
2808 _cm->gc_tracer_cm()->set_gc_cause(gc_cause());
2809 }
2810
2811 _gc_tracer_stw->report_yc_type(collector_state()->yc_type());
2812
2813 GCTraceCPUTime tcpu;
2814
2815 G1HeapVerifier::G1VerifyType verify_type;
2816 FormatBuffer<> gc_string("Pause Young ");
2817 if (collector_state()->in_initial_mark_gc()) {
2818 gc_string.append("(Concurrent Start)");
2819 verify_type = G1HeapVerifier::G1VerifyConcurrentStart;
2820 } else if (collector_state()->in_young_only_phase()) {
2821 if (collector_state()->in_young_gc_before_mixed()) {
2822 gc_string.append("(Prepare Mixed)");
2823 } else {
2824 gc_string.append("(Normal)");
2825 }
2826 verify_type = G1HeapVerifier::G1VerifyYoungNormal;
2827 } else {
2828 gc_string.append("(Mixed)");
2829 verify_type = G1HeapVerifier::G1VerifyMixed;
2830 }
2831 GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true);
2832
2833 uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
2834 workers()->active_workers(),
2835 Threads::number_of_non_daemon_threads());
2836 active_workers = workers()->update_active_workers(active_workers);
2837 log_info(gc,task)("Using %u workers of %u for evacuation", active_workers, workers()->total_workers());
2838
2839 TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
2840 TraceMemoryManagerStats tms(&_memory_manager, gc_cause());
2841
2842 G1HeapTransition heap_transition(this);
2843 size_t heap_used_bytes_before_gc = used();
2844
2845 // Don't dynamically change the number of GC threads this early. A value of
2846 // 0 is used to indicate serial work. When parallel work is done,
2847 // it will be set.
2848
|