Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 17992:a45a4f5a9609
8044796: G1: Enable G1CollectedHeap::stop()
Reviewed-by: brutisso, sjohanss
author | pliden |
---|---|
date | Fri, 13 Jun 2014 13:46:06 +0200 |
parents | 8e20ef014b08 |
children | 52b4284cb496 0982ec23da03 e2ed74d2e054 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Jun 13 17:07:39 2014 -0400 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Jun 13 13:46:06 2014 +0200 @@ -432,14 +432,6 @@ return hr; } -void G1CollectedHeap::stop_conc_gc_threads() { - _cg1r->stop(); - _cmThread->stop(); - if (G1StringDedup::is_enabled()) { - G1StringDedup::stop(); - } -} - #ifdef ASSERT // A region is added to the collection set as it is retired // so an address p can point to a region which will be in the @@ -2186,20 +2178,14 @@ } void G1CollectedHeap::stop() { -#if 0 - // Stopping concurrent worker threads is currently disabled until - // some bugs in concurrent mark has been resolve. Without fixing - // those bugs first we risk haning during VM exit when trying to - // stop these threads. - - // Abort any ongoing concurrent root region scanning and stop all - // concurrent threads. We do this to make sure these threads do - // not continue to execute and access resources (e.g. gclog_or_tty) + // Stop all concurrent threads. We do this to make sure these threads + // do not continue to execute and access resources (e.g. gclog_or_tty) // that are destroyed during shutdown. - _cm->root_regions()->abort(); - _cm->root_regions()->wait_until_scan_finished(); - stop_conc_gc_threads(); -#endif + _cg1r->stop(); + _cmThread->stop(); + if (G1StringDedup::is_enabled()) { + G1StringDedup::stop(); + } } size_t G1CollectedHeap::conservative_max_heap_alignment() {