< prev index next >

src/share/vm/runtime/commandLineFlagConstraintsGC.cpp

Print this page




 365     return Flag::VIOLATES_CONSTRAINT;
 366   } else {
 367     return Flag::SUCCESS;
 368   }
 369 }
 370 #endif // INCLUDE_ALL_GCS
 371 
 372 Flag::Error ParGCStridesPerThreadConstraintFunc(uintx value, bool verbose) {
 373 #if INCLUDE_ALL_GCS
 374   if (UseConcMarkSweepGC && (value > ((uintx)max_jint / (uintx)ParallelGCThreads))) {
 375     CommandLineError::print(verbose,
 376                             "ParGCStridesPerThread (" UINTX_FORMAT ") must be "
 377                             "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
 378                             value, ((uintx)max_jint / (uintx)ParallelGCThreads));
 379     return Flag::VIOLATES_CONSTRAINT;
 380   }
 381 #endif
 382   return Flag::SUCCESS;
 383 }
 384 

































 385 Flag::Error CMSOldPLABMinConstraintFunc(size_t value, bool verbose) {
 386   Flag::Error status = Flag::SUCCESS;
 387 
 388 #if INCLUDE_ALL_GCS
 389   if (UseConcMarkSweepGC) {
 390     if (value > CMSOldPLABMax) {
 391       CommandLineError::print(verbose,
 392                               "CMSOldPLABMin (" SIZE_FORMAT ") must be "
 393                               "less than or equal to CMSOldPLABMax (" SIZE_FORMAT ")\n",
 394                               value, CMSOldPLABMax);
 395       return Flag::VIOLATES_CONSTRAINT;
 396     }
 397     status = MaxPLABSizeBounds("CMSOldPLABMin", value, verbose);
 398   }
 399 #endif
 400   return status;
 401 }
 402 
 403 Flag::Error CMSOldPLABMaxConstraintFunc(size_t value, bool verbose) {
 404   Flag::Error status = Flag::SUCCESS;




 365     return Flag::VIOLATES_CONSTRAINT;
 366   } else {
 367     return Flag::SUCCESS;
 368   }
 369 }
 370 #endif // INCLUDE_ALL_GCS
 371 
 372 Flag::Error ParGCStridesPerThreadConstraintFunc(uintx value, bool verbose) {
 373 #if INCLUDE_ALL_GCS
 374   if (UseConcMarkSweepGC && (value > ((uintx)max_jint / (uintx)ParallelGCThreads))) {
 375     CommandLineError::print(verbose,
 376                             "ParGCStridesPerThread (" UINTX_FORMAT ") must be "
 377                             "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
 378                             value, ((uintx)max_jint / (uintx)ParallelGCThreads));
 379     return Flag::VIOLATES_CONSTRAINT;
 380   }
 381 #endif
 382   return Flag::SUCCESS;
 383 }
 384 
 385 Flag::Error ParGCCardsPerStrideChunkConstraintFunc(intx value, bool verbose) {
 386 #if INCLUDE_ALL_GCS
 387   if (UseConcMarkSweepGC) {
 388     // ParGCCardsPerStrideChunk shoule be compared with card table size.
 389     // As CardTableModRefBS::_last_valid_index is 'protected', calculate it in a same way.
 390     size_t heap_size = Universe::heap()->reserved_region().word_size();
 391     size_t card_table_size = align_size_up(heap_size, CardTableModRefBS::card_size_in_words);
 392     card_table_size /= (CardTableModRefBS::card_size_in_words + 1);
 393     card_table_size -= 1;
 394 
 395     if ((size_t)value > card_table_size) {
 396       CommandLineError::print(verbose,
 397                               "ParGCCardsPerStrideChunk (" INTX_FORMAT ") must be "
 398                               "less than or equal to card table size (" SIZE_FORMAT ")\n",
 399                               value, card_table_size);
 400       return Flag::VIOLATES_CONSTRAINT;
 401     }
 402 
 403     // If n_strides which is used with ParGCCardsPerStrideChunk is really large, we would face an overflow.
 404     uintx n_strides = ParallelGCThreads * ParGCStridesPerThread;
 405     uintx ergo_max = max_uintx / n_strides;
 406     if ((uintx)value > ergo_max) {
 407       CommandLineError::print(verbose,
 408                               "ParGCCardsPerStrideChunk (" INTX_FORMAT ") must be "
 409                               "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
 410                               value, ergo_max);
 411       return Flag::VIOLATES_CONSTRAINT;
 412     }
 413   }
 414 #endif
 415   return Flag::SUCCESS;
 416 }
 417 
 418 Flag::Error CMSOldPLABMinConstraintFunc(size_t value, bool verbose) {
 419   Flag::Error status = Flag::SUCCESS;
 420 
 421 #if INCLUDE_ALL_GCS
 422   if (UseConcMarkSweepGC) {
 423     if (value > CMSOldPLABMax) {
 424       CommandLineError::print(verbose,
 425                               "CMSOldPLABMin (" SIZE_FORMAT ") must be "
 426                               "less than or equal to CMSOldPLABMax (" SIZE_FORMAT ")\n",
 427                               value, CMSOldPLABMax);
 428       return Flag::VIOLATES_CONSTRAINT;
 429     }
 430     status = MaxPLABSizeBounds("CMSOldPLABMin", value, verbose);
 431   }
 432 #endif
 433   return status;
 434 }
 435 
 436 Flag::Error CMSOldPLABMaxConstraintFunc(size_t value, bool verbose) {
 437   Flag::Error status = Flag::SUCCESS;


< prev index next >