< prev index next >

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

Print this page

  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "memory/allocation.hpp"
  28 #include "memory/universe.hpp"
  29 
  30 #include "gc/shared/classUnloadingContext.hpp"
  31 #include "gc/shared/gcArguments.hpp"
  32 #include "gc/shared/gcTimer.hpp"
  33 #include "gc/shared/gcTraceTime.inline.hpp"
  34 #include "gc/shared/locationPrinter.inline.hpp"
  35 #include "gc/shared/memAllocator.hpp"
  36 #include "gc/shared/plab.hpp"

  37 #include "gc/shared/tlab_globals.hpp"
  38 
  39 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
  40 #include "gc/shenandoah/shenandoahClosures.inline.hpp"
  41 #include "gc/shenandoah/shenandoahCollectionSet.hpp"
  42 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  43 #include "gc/shenandoah/shenandoahConcurrentMark.hpp"
  44 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  45 #include "gc/shenandoah/shenandoahControlThread.hpp"
  46 #include "gc/shenandoah/shenandoahFreeSet.hpp"
  47 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
  48 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  49 #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
  50 #include "gc/shenandoah/shenandoahHeapRegionSet.hpp"
  51 #include "gc/shenandoah/shenandoahInitLogger.hpp"
  52 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  53 #include "gc/shenandoah/shenandoahMemoryPool.hpp"
  54 #include "gc/shenandoah/shenandoahMetrics.hpp"
  55 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
  56 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"

 422   // just as there are G1-specific options.
 423   {
 424     ShenandoahSATBMarkQueueSet& satbqs = ShenandoahBarrierSet::satb_mark_queue_set();
 425     satbqs.set_process_completed_buffers_threshold(20); // G1SATBProcessCompletedThreshold
 426     satbqs.set_buffer_enqueue_threshold_percentage(60); // G1SATBBufferEnqueueingThresholdPercent
 427   }
 428 
 429   _monitoring_support = new ShenandoahMonitoringSupport(this);
 430   _phase_timings = new ShenandoahPhaseTimings(max_workers());
 431   ShenandoahCodeRoots::initialize();
 432 
 433   if (ShenandoahPacing) {
 434     _pacer = new ShenandoahPacer(this);
 435     _pacer->setup_for_idle();
 436   }
 437 
 438   _control_thread = new ShenandoahControlThread();
 439 
 440   ShenandoahInitLogger::print();
 441 


 442   return JNI_OK;
 443 }
 444 
 445 void ShenandoahHeap::initialize_mode() {
 446   if (ShenandoahGCMode != nullptr) {
 447     if (strcmp(ShenandoahGCMode, "satb") == 0) {
 448       _gc_mode = new ShenandoahSATBMode();
 449     } else if (strcmp(ShenandoahGCMode, "iu") == 0) {
 450       _gc_mode = new ShenandoahIUMode();
 451     } else if (strcmp(ShenandoahGCMode, "passive") == 0) {
 452       _gc_mode = new ShenandoahPassiveMode();
 453     } else {
 454       vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option");
 455     }
 456   } else {
 457     vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option (null)");
 458   }
 459   _gc_mode->initialize_flags();
 460   if (_gc_mode->is_diagnostic() && !UnlockDiagnosticVMOptions) {
 461     vm_exit_during_initialization(

  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "memory/allocation.hpp"
  28 #include "memory/universe.hpp"
  29 
  30 #include "gc/shared/classUnloadingContext.hpp"
  31 #include "gc/shared/gcArguments.hpp"
  32 #include "gc/shared/gcTimer.hpp"
  33 #include "gc/shared/gcTraceTime.inline.hpp"
  34 #include "gc/shared/locationPrinter.inline.hpp"
  35 #include "gc/shared/memAllocator.hpp"
  36 #include "gc/shared/plab.hpp"
  37 #include "gc/shared/slidingForwarding.hpp"
  38 #include "gc/shared/tlab_globals.hpp"
  39 
  40 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
  41 #include "gc/shenandoah/shenandoahClosures.inline.hpp"
  42 #include "gc/shenandoah/shenandoahCollectionSet.hpp"
  43 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  44 #include "gc/shenandoah/shenandoahConcurrentMark.hpp"
  45 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  46 #include "gc/shenandoah/shenandoahControlThread.hpp"
  47 #include "gc/shenandoah/shenandoahFreeSet.hpp"
  48 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
  49 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  50 #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
  51 #include "gc/shenandoah/shenandoahHeapRegionSet.hpp"
  52 #include "gc/shenandoah/shenandoahInitLogger.hpp"
  53 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  54 #include "gc/shenandoah/shenandoahMemoryPool.hpp"
  55 #include "gc/shenandoah/shenandoahMetrics.hpp"
  56 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
  57 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"

 423   // just as there are G1-specific options.
 424   {
 425     ShenandoahSATBMarkQueueSet& satbqs = ShenandoahBarrierSet::satb_mark_queue_set();
 426     satbqs.set_process_completed_buffers_threshold(20); // G1SATBProcessCompletedThreshold
 427     satbqs.set_buffer_enqueue_threshold_percentage(60); // G1SATBBufferEnqueueingThresholdPercent
 428   }
 429 
 430   _monitoring_support = new ShenandoahMonitoringSupport(this);
 431   _phase_timings = new ShenandoahPhaseTimings(max_workers());
 432   ShenandoahCodeRoots::initialize();
 433 
 434   if (ShenandoahPacing) {
 435     _pacer = new ShenandoahPacer(this);
 436     _pacer->setup_for_idle();
 437   }
 438 
 439   _control_thread = new ShenandoahControlThread();
 440 
 441   ShenandoahInitLogger::print();
 442 
 443   SlidingForwarding::initialize(_heap_region, ShenandoahHeapRegion::region_size_words());
 444 
 445   return JNI_OK;
 446 }
 447 
 448 void ShenandoahHeap::initialize_mode() {
 449   if (ShenandoahGCMode != nullptr) {
 450     if (strcmp(ShenandoahGCMode, "satb") == 0) {
 451       _gc_mode = new ShenandoahSATBMode();
 452     } else if (strcmp(ShenandoahGCMode, "iu") == 0) {
 453       _gc_mode = new ShenandoahIUMode();
 454     } else if (strcmp(ShenandoahGCMode, "passive") == 0) {
 455       _gc_mode = new ShenandoahPassiveMode();
 456     } else {
 457       vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option");
 458     }
 459   } else {
 460     vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option (null)");
 461   }
 462   _gc_mode->initialize_flags();
 463   if (_gc_mode->is_diagnostic() && !UnlockDiagnosticVMOptions) {
 464     vm_exit_during_initialization(
< prev index next >