Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1019:035d2e036a9b
6885041: G1: inconsistent thread dump
Summary: When G1 is enabled, thread dumps are inconsistent as the info for some of the G1 threads is not formatted properly.
Reviewed-by: ysr, johnc
author | tonyp |
---|---|
date | Fri, 02 Oct 2009 16:12:07 -0400 |
parents | 54b3b351d6f9 |
children | ff2402f6a50b |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Oct 05 05:51:22 2009 -0700 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Oct 02 16:12:07 2009 -0400 @@ -2383,27 +2383,18 @@ _hrs->iterate(&blk); } -class PrintOnThreadsClosure : public ThreadClosure { - outputStream* _st; -public: - PrintOnThreadsClosure(outputStream* st) : _st(st) { } - virtual void do_thread(Thread *t) { - t->print_on(_st); - } -}; - void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { if (ParallelGCThreads > 0) { - workers()->print_worker_threads(); - } - st->print("\"G1 concurrent mark GC Thread\" "); - _cmThread->print(); + workers()->print_worker_threads_on(st); + } + + _cmThread->print_on(st); st->cr(); - st->print("\"G1 concurrent refinement GC Threads\" "); - PrintOnThreadsClosure p(st); - _cg1r->threads_do(&p); - st->cr(); - st->print("\"G1 zero-fill GC Thread\" "); + + _cm->print_worker_threads_on(st); + + _cg1r->print_worker_threads_on(st); + _czft->print_on(st); st->cr(); }