999 ParallelTaskTerminator::print_termination_counts(); |
999 ParallelTaskTerminator::print_termination_counts(); |
1000 #endif |
1000 #endif |
1001 |
1001 |
1002 gc_epilogue(true); |
1002 gc_epilogue(true); |
1003 |
1003 |
1004 // Abandon concurrent refinement. This must happen last: in the |
1004 // Discard all rset updates |
1005 // dirty-card logging system, some cards may be dirty by weak-ref |
1005 JavaThread::dirty_card_queue_set().abandon_logs(); |
1006 // processing, and may be enqueued. But the whole card table is |
|
1007 // dirtied, so this should abandon those logs, and set "do_traversal" |
|
1008 // to true. |
|
1009 concurrent_g1_refine()->set_pya_restart(); |
|
1010 assert(!G1DeferredRSUpdate |
1006 assert(!G1DeferredRSUpdate |
1011 || (G1DeferredRSUpdate && (dirty_card_queue_set().completed_buffers_num() == 0)), "Should not be any"); |
1007 || (G1DeferredRSUpdate && (dirty_card_queue_set().completed_buffers_num() == 0)), "Should not be any"); |
1012 assert(regions_accounted_for(), "Region leakage!"); |
1008 assert(regions_accounted_for(), "Region leakage!"); |
1013 } |
1009 } |
1014 |
1010 |
1519 |
1515 |
1520 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon, |
1516 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon, |
1521 SATB_Q_FL_lock, |
1517 SATB_Q_FL_lock, |
1522 0, |
1518 0, |
1523 Shared_SATB_Q_lock); |
1519 Shared_SATB_Q_lock); |
1524 if (G1RSBarrierUseQueue) { |
1520 |
1525 JavaThread::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1521 JavaThread::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1526 DirtyCardQ_FL_lock, |
1522 DirtyCardQ_FL_lock, |
1527 G1DirtyCardQueueMax, |
1523 G1DirtyCardQueueMax, |
1528 Shared_DirtyCardQ_lock); |
1524 Shared_DirtyCardQ_lock); |
1529 } |
1525 |
1530 if (G1DeferredRSUpdate) { |
1526 if (G1DeferredRSUpdate) { |
1531 dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1527 dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, |
1532 DirtyCardQ_FL_lock, |
1528 DirtyCardQ_FL_lock, |
1533 0, |
1529 0, |
1534 Shared_DirtyCardQ_lock, |
1530 Shared_DirtyCardQ_lock, |
2247 void G1CollectedHeap::print_on(outputStream* st) const { |
2243 void G1CollectedHeap::print_on(outputStream* st) const { |
2248 PrintRegionClosure blk(st); |
2244 PrintRegionClosure blk(st); |
2249 _hrs->iterate(&blk); |
2245 _hrs->iterate(&blk); |
2250 } |
2246 } |
2251 |
2247 |
|
2248 class PrintOnThreadsClosure : public ThreadClosure { |
|
2249 outputStream* _st; |
|
2250 public: |
|
2251 PrintOnThreadsClosure(outputStream* st) : _st(st) { } |
|
2252 virtual void do_thread(Thread *t) { |
|
2253 t->print_on(_st); |
|
2254 } |
|
2255 }; |
|
2256 |
2252 void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { |
2257 void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { |
2253 if (ParallelGCThreads > 0) { |
2258 if (ParallelGCThreads > 0) { |
2254 workers()->print_worker_threads(); |
2259 workers()->print_worker_threads(); |
2255 } |
2260 } |
2256 st->print("\"G1 concurrent mark GC Thread\" "); |
2261 st->print("\"G1 concurrent mark GC Thread\" "); |
2257 _cmThread->print(); |
2262 _cmThread->print(); |
2258 st->cr(); |
2263 st->cr(); |
2259 st->print("\"G1 concurrent refinement GC Thread\" "); |
2264 st->print("\"G1 concurrent refinement GC Threads\" "); |
2260 _cg1r->cg1rThread()->print_on(st); |
2265 PrintOnThreadsClosure p(st); |
|
2266 _cg1r->threads_do(&p); |
2261 st->cr(); |
2267 st->cr(); |
2262 st->print("\"G1 zero-fill GC Thread\" "); |
2268 st->print("\"G1 zero-fill GC Thread\" "); |
2263 _czft->print_on(st); |
2269 _czft->print_on(st); |
2264 st->cr(); |
2270 st->cr(); |
2265 } |
2271 } |
2267 void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const { |
2273 void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const { |
2268 if (ParallelGCThreads > 0) { |
2274 if (ParallelGCThreads > 0) { |
2269 workers()->threads_do(tc); |
2275 workers()->threads_do(tc); |
2270 } |
2276 } |
2271 tc->do_thread(_cmThread); |
2277 tc->do_thread(_cmThread); |
2272 tc->do_thread(_cg1r->cg1rThread()); |
2278 _cg1r->threads_do(tc); |
2273 tc->do_thread(_czft); |
2279 tc->do_thread(_czft); |
2274 } |
2280 } |
2275 |
2281 |
2276 void G1CollectedHeap::print_tracing_info() const { |
2282 void G1CollectedHeap::print_tracing_info() const { |
2277 concurrent_g1_refine()->print_final_card_counts(); |
2283 concurrent_g1_refine()->print_final_card_counts(); |