< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp

Print this page
rev 53044 : Concurrent stringtable processing


  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 
  26 #include "classfile/symbolTable.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "code/codeCache.hpp"
  29 
  30 #include "gc/shared/weakProcessor.hpp"
  31 #include "gc/shared/weakProcessor.inline.hpp"
  32 #include "gc/shared/gcTimer.hpp"

  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/referenceProcessorPhaseTimes.hpp"
  35 
  36 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"
  37 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
  38 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
  39 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  40 #include "gc/shenandoah/shenandoahRootProcessor.hpp"
  41 #include "gc/shenandoah/shenandoahOopClosures.hpp"
  42 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"
  43 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
  44 #include "gc/shenandoah/shenandoahTaskqueue.inline.hpp"
  45 #include "gc/shenandoah/shenandoahTimingTracker.hpp"
  46 #include "gc/shenandoah/shenandoahUtils.hpp"
  47 
  48 #include "memory/iterator.inline.hpp"
  49 #include "memory/resourceArea.hpp"
  50 #include "oops/oop.inline.hpp"
  51 
  52 template<UpdateRefsMode UPDATE_REFS, StringDedupMode STRING_DEDUP>


 445     ShenandoahTerminationTracker termination_tracker(full_gc ?
 446                                                      ShenandoahPhaseTimings::full_gc_mark_termination :
 447                                                      ShenandoahPhaseTimings::termination);
 448 
 449     StrongRootsScope scope(nworkers);
 450     ShenandoahTaskTerminator terminator(nworkers, task_queues());
 451     ShenandoahFinalMarkingTask task(this, &terminator, ShenandoahStringDedup::is_enabled());
 452     _heap->workers()->run_task(&task);
 453   }
 454 
 455   assert(task_queues()->is_empty(), "Should be empty");
 456 
 457   // When we're done marking everything, we process weak references.
 458   if (_heap->process_references()) {
 459     weak_refs_work(full_gc);
 460   }
 461 
 462   // And finally finish class unloading
 463   if (_heap->unload_classes()) {
 464     _heap->unload_classes_and_cleanup_tables(full_gc);
 465   }
 466 
 467   assert(task_queues()->is_empty(), "Should be empty");
 468   TASKQUEUE_STATS_ONLY(task_queues()->print_taskqueue_stats());
 469   TASKQUEUE_STATS_ONLY(task_queues()->reset_taskqueue_stats());
 470 }
 471 
 472 // Weak Reference Closures
 473 class ShenandoahCMDrainMarkingStackClosure: public VoidClosure {
 474   uint _worker_id;
 475   ShenandoahTaskTerminator* _terminator;
 476   bool _reset_terminator;
 477 
 478 public:
 479   ShenandoahCMDrainMarkingStackClosure(uint worker_id, ShenandoahTaskTerminator* t, bool reset_terminator = false):
 480     _worker_id(worker_id),
 481     _terminator(t),
 482     _reset_terminator(reset_terminator) {
 483   }
 484 
 485   void do_void() {




  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 
  26 #include "classfile/symbolTable.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "code/codeCache.hpp"
  29 
  30 #include "gc/shared/weakProcessor.hpp"
  31 #include "gc/shared/weakProcessor.inline.hpp"
  32 #include "gc/shared/gcTimer.hpp"
  33 #include "gc/shared/parallelCleaning.hpp"
  34 #include "gc/shared/referenceProcessor.hpp"
  35 #include "gc/shared/referenceProcessorPhaseTimes.hpp"
  36 
  37 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"
  38 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
  39 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
  40 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  41 #include "gc/shenandoah/shenandoahRootProcessor.hpp"
  42 #include "gc/shenandoah/shenandoahOopClosures.hpp"
  43 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"
  44 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
  45 #include "gc/shenandoah/shenandoahTaskqueue.inline.hpp"
  46 #include "gc/shenandoah/shenandoahTimingTracker.hpp"
  47 #include "gc/shenandoah/shenandoahUtils.hpp"
  48 
  49 #include "memory/iterator.inline.hpp"
  50 #include "memory/resourceArea.hpp"
  51 #include "oops/oop.inline.hpp"
  52 
  53 template<UpdateRefsMode UPDATE_REFS, StringDedupMode STRING_DEDUP>


 446     ShenandoahTerminationTracker termination_tracker(full_gc ?
 447                                                      ShenandoahPhaseTimings::full_gc_mark_termination :
 448                                                      ShenandoahPhaseTimings::termination);
 449 
 450     StrongRootsScope scope(nworkers);
 451     ShenandoahTaskTerminator terminator(nworkers, task_queues());
 452     ShenandoahFinalMarkingTask task(this, &terminator, ShenandoahStringDedup::is_enabled());
 453     _heap->workers()->run_task(&task);
 454   }
 455 
 456   assert(task_queues()->is_empty(), "Should be empty");
 457 
 458   // When we're done marking everything, we process weak references.
 459   if (_heap->process_references()) {
 460     weak_refs_work(full_gc);
 461   }
 462 
 463   // And finally finish class unloading
 464   if (_heap->unload_classes()) {
 465     _heap->unload_classes_and_cleanup_tables(full_gc);
 466   };
 467 
 468   assert(task_queues()->is_empty(), "Should be empty");
 469   TASKQUEUE_STATS_ONLY(task_queues()->print_taskqueue_stats());
 470   TASKQUEUE_STATS_ONLY(task_queues()->reset_taskqueue_stats());
 471 }
 472 
 473 // Weak Reference Closures
 474 class ShenandoahCMDrainMarkingStackClosure: public VoidClosure {
 475   uint _worker_id;
 476   ShenandoahTaskTerminator* _terminator;
 477   bool _reset_terminator;
 478 
 479 public:
 480   ShenandoahCMDrainMarkingStackClosure(uint worker_id, ShenandoahTaskTerminator* t, bool reset_terminator = false):
 481     _worker_id(worker_id),
 482     _terminator(t),
 483     _reset_terminator(reset_terminator) {
 484   }
 485 
 486   void do_void() {


< prev index next >