Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1755:8e5955ddf8e4
6978300: G1: debug builds crash if ParallelGCThreads==0
Reviewed-by: tonyp, ysr
author | jcoomes |
---|---|
date | Wed, 25 Aug 2010 14:39:55 -0700 |
parents | b63010841f78 |
children | 8b10f48633dc |
comparison
equal
deleted
inserted
replaced
1754:e967bad2a9ab | 1755:8e5955ddf8e4 |
---|---|
2751 | 2751 |
2752 void G1CollectedHeap::print_taskqueue_stats(outputStream* const st) const { | 2752 void G1CollectedHeap::print_taskqueue_stats(outputStream* const st) const { |
2753 print_taskqueue_stats_hdr(st); | 2753 print_taskqueue_stats_hdr(st); |
2754 | 2754 |
2755 TaskQueueStats totals; | 2755 TaskQueueStats totals; |
2756 const int n = MAX2(workers()->total_workers(), 1); | 2756 const int n = workers() != NULL ? workers()->total_workers() : 1; |
2757 for (int i = 0; i < n; ++i) { | 2757 for (int i = 0; i < n; ++i) { |
2758 st->print("%3d ", i); task_queue(i)->stats.print(st); st->cr(); | 2758 st->print("%3d ", i); task_queue(i)->stats.print(st); st->cr(); |
2759 totals += task_queue(i)->stats; | 2759 totals += task_queue(i)->stats; |
2760 } | 2760 } |
2761 st->print_raw("tot "); totals.print(st); st->cr(); | 2761 st->print_raw("tot "); totals.print(st); st->cr(); |
2762 | 2762 |
2763 DEBUG_ONLY(totals.verify()); | 2763 DEBUG_ONLY(totals.verify()); |
2764 } | 2764 } |
2765 | 2765 |
2766 void G1CollectedHeap::reset_taskqueue_stats() { | 2766 void G1CollectedHeap::reset_taskqueue_stats() { |
2767 const int n = MAX2(workers()->total_workers(), 1); | 2767 const int n = workers() != NULL ? workers()->total_workers() : 1; |
2768 for (int i = 0; i < n; ++i) { | 2768 for (int i = 0; i < n; ++i) { |
2769 task_queue(i)->stats.reset(); | 2769 task_queue(i)->stats.reset(); |
2770 } | 2770 } |
2771 } | 2771 } |
2772 #endif // TASKQUEUE_STATS | 2772 #endif // TASKQUEUE_STATS |