< prev index next >

src/hotspot/share/gc/g1/g1Arguments.cpp

Print this page
rev 49910 : imported patch removeAllGCs.fixIncludes


  64     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyRemark);
  65   } else if (strcmp(type, "cleanup") == 0) {
  66     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyCleanup);
  67   } else if (strcmp(type, "full") == 0) {
  68     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyFull);
  69   } else {
  70     log_warning(gc, verify)("VerifyGCType: '%s' is unknown. Available types are: "
  71                             "young-only, initial-mark, mixed, remark, cleanup and full", type);
  72   }
  73 }
  74 
  75 void G1Arguments::initialize() {
  76   GCArguments::initialize();
  77   assert(UseG1GC, "Error");
  78   FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
  79   if (ParallelGCThreads == 0) {
  80     assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0.");
  81     vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", NULL);
  82   }
  83 
  84 #if INCLUDE_ALL_GCS
  85   if (FLAG_IS_DEFAULT(G1ConcRefinementThreads)) {
  86     FLAG_SET_ERGO(uint, G1ConcRefinementThreads, ParallelGCThreads);
  87   }
  88 #endif
  89 
  90   // MarkStackSize will be set (if it hasn't been set by the user)
  91   // when concurrent marking is initialized.
  92   // Its value will be based upon the number of parallel marking threads.
  93   // But we do set the maximum mark stack size here.
  94   if (FLAG_IS_DEFAULT(MarkStackSizeMax)) {
  95     FLAG_SET_DEFAULT(MarkStackSizeMax, 128 * TASKQUEUE_SIZE);
  96   }
  97 
  98   if (FLAG_IS_DEFAULT(GCTimeRatio) || GCTimeRatio == 0) {
  99     // In G1, we want the default GC overhead goal to be higher than
 100     // it is for PS, or the heap might be expanded too aggressively.
 101     // We set it here to ~8%.
 102     FLAG_SET_DEFAULT(GCTimeRatio, 12);
 103   }
 104 
 105   // Below, we might need to calculate the pause time interval based on
 106   // the pause target. When we do so we are going to give G1 maximum
 107   // flexibility and allow it to do pauses when it needs to. So, we'll
 108   // arrange that the pause interval to be pause time target + 1 to




  64     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyRemark);
  65   } else if (strcmp(type, "cleanup") == 0) {
  66     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyCleanup);
  67   } else if (strcmp(type, "full") == 0) {
  68     G1HeapVerifier::enable_verification_type(G1HeapVerifier::G1VerifyFull);
  69   } else {
  70     log_warning(gc, verify)("VerifyGCType: '%s' is unknown. Available types are: "
  71                             "young-only, initial-mark, mixed, remark, cleanup and full", type);
  72   }
  73 }
  74 
  75 void G1Arguments::initialize() {
  76   GCArguments::initialize();
  77   assert(UseG1GC, "Error");
  78   FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
  79   if (ParallelGCThreads == 0) {
  80     assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0.");
  81     vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", NULL);
  82   }
  83 

  84   if (FLAG_IS_DEFAULT(G1ConcRefinementThreads)) {
  85     FLAG_SET_ERGO(uint, G1ConcRefinementThreads, ParallelGCThreads);
  86   }

  87 
  88   // MarkStackSize will be set (if it hasn't been set by the user)
  89   // when concurrent marking is initialized.
  90   // Its value will be based upon the number of parallel marking threads.
  91   // But we do set the maximum mark stack size here.
  92   if (FLAG_IS_DEFAULT(MarkStackSizeMax)) {
  93     FLAG_SET_DEFAULT(MarkStackSizeMax, 128 * TASKQUEUE_SIZE);
  94   }
  95 
  96   if (FLAG_IS_DEFAULT(GCTimeRatio) || GCTimeRatio == 0) {
  97     // In G1, we want the default GC overhead goal to be higher than
  98     // it is for PS, or the heap might be expanded too aggressively.
  99     // We set it here to ~8%.
 100     FLAG_SET_DEFAULT(GCTimeRatio, 12);
 101   }
 102 
 103   // Below, we might need to calculate the pause time interval based on
 104   // the pause target. When we do so we are going to give G1 maximum
 105   // flexibility and allow it to do pauses when it needs to. So, we'll
 106   // arrange that the pause interval to be pause time target + 1 to


< prev index next >