提交 e49da34b 编写于 作者: J jcoomes

6978300: G1: debug builds crash if ParallelGCThreads==0

Reviewed-by: tonyp, ysr
上级 0807c46f
......@@ -2753,7 +2753,7 @@ void G1CollectedHeap::print_taskqueue_stats(outputStream* const st) const {
print_taskqueue_stats_hdr(st);
TaskQueueStats totals;
const int n = MAX2(workers()->total_workers(), 1);
const int n = workers() != NULL ? workers()->total_workers() : 1;
for (int i = 0; i < n; ++i) {
st->print("%3d ", i); task_queue(i)->stats.print(st); st->cr();
totals += task_queue(i)->stats;
......@@ -2764,7 +2764,7 @@ void G1CollectedHeap::print_taskqueue_stats(outputStream* const st) const {
}
void G1CollectedHeap::reset_taskqueue_stats() {
const int n = MAX2(workers()->total_workers(), 1);
const int n = workers() != NULL ? workers()->total_workers() : 1;
for (int i = 0; i < n; ++i) {
task_queue(i)->stats.reset();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册