< prev index next >
src/share/vm/gc_implementation/g1/concurrentMark.cpp
Print this page
rev 7184 : 6979279
rev 7185 : [mq]: rev1
@@ -658,11 +658,10 @@
gclog_or_tty->print_cr("CM Sleep Factor %1.4lf", sleep_factor());
gclog_or_tty->print_cr("CL Marking Task Overhead %1.4lf", cleanup_task_overhead());
gclog_or_tty->print_cr("CL Sleep Factor %1.4lf", cleanup_sleep_factor());
#endif
- guarantee(parallel_marking_threads() > 0, "peace of mind");
_parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads",
_max_parallel_marking_threads, false, true);
if (_parallel_workers == NULL) {
vm_exit_during_initialization("Failed necessary allocation.");
} else {
@@ -1223,16 +1222,12 @@
assert(parallel_marking_threads() <= max_parallel_marking_threads(),
"Maximum number of marking threads exceeded");
uint active_workers = MAX2(1U, parallel_marking_threads());
CMRootRegionScanTask task(this);
- if (use_parallel_marking_threads()) {
- _parallel_workers->set_active_workers((int) active_workers);
+ _parallel_workers->set_active_workers(active_workers);
_parallel_workers->run_task(&task);
- } else {
- task.work(0);
- }
// It's possible that has_aborted() is true here without actually
// aborting the survivor scan earlier. This is OK as it's
// mainly used for sanity checking.
root_regions()->scan_finished();
@@ -1259,19 +1254,15 @@
// Parallel task terminator is set in "set_concurrency_and_phase()"
set_concurrency_and_phase(active_workers, true /* concurrent */);
CMConcurrentMarkingTask markingTask(this, cmThread());
- if (use_parallel_marking_threads()) {
- _parallel_workers->set_active_workers((int)active_workers);
+ _parallel_workers->set_active_workers(active_workers);
// Don't set _n_par_threads because it affects MT in process_roots()
// and the decisions on that MT processing is made elsewhere.
assert(_parallel_workers->active_workers() > 0, "Should have been set");
_parallel_workers->run_task(&markingTask);
- } else {
- markingTask.work(0);
- }
print_stats();
}
// Helper class to get rid of some boilerplate code.
class G1CMTraceTime : public GCTraceTime {
@@ -3339,13 +3330,11 @@
cmThread()->vtime_accum(),
cmThread()->vtime_mark_accum());
}
void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
- if (use_parallel_marking_threads()) {
_parallel_workers->print_worker_threads_on(st);
- }
}
void ConcurrentMark::print_on_error(outputStream* st) const {
st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT,
p2i(_prevMarkBitMap), p2i(_nextMarkBitMap));
< prev index next >