469 Flag::Error CMSWorkQueueDrainThresholdConstraintFunc(uintx value, bool verbose) {
470 #if INCLUDE_ALL_GCS
471 if (UseConcMarkSweepGC) {
472 return ParallelGCThreadsAndCMSWorkQueueDrainThreshold(ParallelGCThreads, value, verbose);
473 }
474 #endif
475 return Flag::SUCCESS;
476 }
477
478 Flag::Error CMSBitMapYieldQuantumConstraintFunc(size_t value, bool verbose) {
479 #if INCLUDE_ALL_GCS
480 // Skip for current default value.
481 if (UseConcMarkSweepGC && FLAG_IS_CMDLINE(CMSBitMapYieldQuantum)) {
482 // CMSBitMapYieldQuantum should be compared with mark bitmap size.
483 ConcurrentMarkSweepGeneration* cms = (ConcurrentMarkSweepGeneration*)GenCollectedHeap::heap()->old_gen();
484 size_t bitmap_size = cms->collector()->markBitMap()->sizeInWords();
485
486 if (value > bitmap_size) {
487 CommandLineError::print(verbose,
488 "CMSBitMapYieldQuantum (" SIZE_FORMAT ") must "
489 "be less than or equal to bitmap size (" SIZE_FORMAT ")\n",
490 value, bitmap_size);
491 return Flag::VIOLATES_CONSTRAINT;
492 }
493 }
494 #endif
495 return Flag::SUCCESS;
496 }
497
498 Flag::Error MaxGCPauseMillisConstraintFunc(uintx value, bool verbose) {
499 #if INCLUDE_ALL_GCS
500 if (UseG1GC && FLAG_IS_CMDLINE(MaxGCPauseMillis) && (value >= GCPauseIntervalMillis)) {
501 CommandLineError::print(verbose,
502 "MaxGCPauseMillis (" UINTX_FORMAT ") must be "
503 "less than GCPauseIntervalMillis (" UINTX_FORMAT ")\n",
504 value, GCPauseIntervalMillis);
505 return Flag::VIOLATES_CONSTRAINT;
506 }
507 #endif
508
509 return Flag::SUCCESS;
|
469 Flag::Error CMSWorkQueueDrainThresholdConstraintFunc(uintx value, bool verbose) {
470 #if INCLUDE_ALL_GCS
471 if (UseConcMarkSweepGC) {
472 return ParallelGCThreadsAndCMSWorkQueueDrainThreshold(ParallelGCThreads, value, verbose);
473 }
474 #endif
475 return Flag::SUCCESS;
476 }
477
478 Flag::Error CMSBitMapYieldQuantumConstraintFunc(size_t value, bool verbose) {
479 #if INCLUDE_ALL_GCS
480 // Skip for current default value.
481 if (UseConcMarkSweepGC && FLAG_IS_CMDLINE(CMSBitMapYieldQuantum)) {
482 // CMSBitMapYieldQuantum should be compared with mark bitmap size.
483 ConcurrentMarkSweepGeneration* cms = (ConcurrentMarkSweepGeneration*)GenCollectedHeap::heap()->old_gen();
484 size_t bitmap_size = cms->collector()->markBitMap()->sizeInWords();
485
486 if (value > bitmap_size) {
487 CommandLineError::print(verbose,
488 "CMSBitMapYieldQuantum (" SIZE_FORMAT ") must "
489 "be less than or equal to bitmap size (" SIZE_FORMAT ") "
490 "whose size corresponds to the size of old generation of the Java heap\n",
491 value, bitmap_size);
492 return Flag::VIOLATES_CONSTRAINT;
493 }
494 }
495 #endif
496 return Flag::SUCCESS;
497 }
498
499 Flag::Error MaxGCPauseMillisConstraintFunc(uintx value, bool verbose) {
500 #if INCLUDE_ALL_GCS
501 if (UseG1GC && FLAG_IS_CMDLINE(MaxGCPauseMillis) && (value >= GCPauseIntervalMillis)) {
502 CommandLineError::print(verbose,
503 "MaxGCPauseMillis (" UINTX_FORMAT ") must be "
504 "less than GCPauseIntervalMillis (" UINTX_FORMAT ")\n",
505 value, GCPauseIntervalMillis);
506 return Flag::VIOLATES_CONSTRAINT;
507 }
508 #endif
509
510 return Flag::SUCCESS;
|