< prev index next >

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

Print this page
rev 11935 : [mq]: 8165292-gc-task-logging-spams-log


1018   // assert(asynch == !SafepointSynchronize::is_at_safepoint(),
1019   //        "inconsistent argument?");
1020   // However that wouldn't be right, because it's possible that
1021   // a safepoint is indeed in progress as a younger generation
1022   // stop-the-world GC happens even as we mark in this generation.
1023 
1024   _restart_for_overflow = false;
1025 
1026   // _g1h has _n_par_threads
1027   _parallel_marking_threads = calc_parallel_marking_threads();
1028   assert(parallel_marking_threads() <= max_parallel_marking_threads(),
1029     "Maximum number of marking threads exceeded");
1030 
1031   uint active_workers = MAX2(1U, parallel_marking_threads());
1032   assert(active_workers > 0, "Should have been set");
1033 
1034   // Setting active workers is not guaranteed since fewer
1035   // worker threads may currently exist and more may not be
1036   // available.
1037   active_workers = _parallel_workers->update_active_workers(active_workers);


1038   // Parallel task terminator is set in "set_concurrency_and_phase()"
1039   set_concurrency_and_phase(active_workers, true /* concurrent */);
1040 
1041   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1042   _parallel_workers->run_task(&markingTask);
1043   print_stats();
1044 }
1045 
1046 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1047   // world is stopped at this checkpoint
1048   assert(SafepointSynchronize::is_at_safepoint(),
1049          "world should be stopped");
1050 
1051   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1052 
1053   // If a full collection has happened, we shouldn't do this.
1054   if (has_aborted()) {
1055     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1056     return;
1057   }




1018   // assert(asynch == !SafepointSynchronize::is_at_safepoint(),
1019   //        "inconsistent argument?");
1020   // However that wouldn't be right, because it's possible that
1021   // a safepoint is indeed in progress as a younger generation
1022   // stop-the-world GC happens even as we mark in this generation.
1023 
1024   _restart_for_overflow = false;
1025 
1026   // _g1h has _n_par_threads
1027   _parallel_marking_threads = calc_parallel_marking_threads();
1028   assert(parallel_marking_threads() <= max_parallel_marking_threads(),
1029     "Maximum number of marking threads exceeded");
1030 
1031   uint active_workers = MAX2(1U, parallel_marking_threads());
1032   assert(active_workers > 0, "Should have been set");
1033 
1034   // Setting active workers is not guaranteed since fewer
1035   // worker threads may currently exist and more may not be
1036   // available.
1037   active_workers = _parallel_workers->update_active_workers(active_workers);
1038   log_info(gc, task)("Using %u workers of %u for marking", active_workers, _parallel_workers->total_workers());
1039 
1040   // Parallel task terminator is set in "set_concurrency_and_phase()"
1041   set_concurrency_and_phase(active_workers, true /* concurrent */);
1042 
1043   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1044   _parallel_workers->run_task(&markingTask);
1045   print_stats();
1046 }
1047 
1048 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1049   // world is stopped at this checkpoint
1050   assert(SafepointSynchronize::is_at_safepoint(),
1051          "world should be stopped");
1052 
1053   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1054 
1055   // If a full collection has happened, we shouldn't do this.
1056   if (has_aborted()) {
1057     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1058     return;
1059   }


< prev index next >