< prev index next >

src/share/vm/runtime/commandLineFlagConstraintsGC.cpp

Print this page
rev 12906 : [mq]: gc_interface

*** 372,394 **** Flag::Error ParGCCardsPerStrideChunkConstraintFunc(intx value, bool verbose) { #if INCLUDE_ALL_GCS if (UseConcMarkSweepGC) { // ParGCCardsPerStrideChunk should be compared with card table size. size_t heap_size = Universe::heap()->reserved_region().word_size(); ! CardTableModRefBS* bs = (CardTableModRefBS*)GenCollectedHeap::heap()->rem_set()->bs(); ! size_t card_table_size = bs->cards_required(heap_size) - 1; // Valid card table size if ((size_t)value > card_table_size) { CommandLineError::print(verbose, "ParGCCardsPerStrideChunk (" INTX_FORMAT ") is too large for the heap size and " "must be less than or equal to card table size (" SIZE_FORMAT ")\n", value, card_table_size); return Flag::VIOLATES_CONSTRAINT; } // ParGCCardsPerStrideChunk is used with n_strides(ParallelGCThreads*ParGCStridesPerThread) ! // from CardTableModRefBSForCTRS::process_stride(). Note that ParGCStridesPerThread is already checked // not to make an overflow with ParallelGCThreads from its constraint function. uintx n_strides = ParallelGCThreads * ParGCStridesPerThread; uintx ergo_max = max_uintx / n_strides; if ((uintx)value > ergo_max) { CommandLineError::print(verbose, --- 372,394 ---- Flag::Error ParGCCardsPerStrideChunkConstraintFunc(intx value, bool verbose) { #if INCLUDE_ALL_GCS if (UseConcMarkSweepGC) { // ParGCCardsPerStrideChunk should be compared with card table size. size_t heap_size = Universe::heap()->reserved_region().word_size(); ! CardTableRS* ct = GenCollectedHeap::heap()->rem_set(); ! size_t card_table_size = ct->cards_required(heap_size) - 1; // Valid card table size if ((size_t)value > card_table_size) { CommandLineError::print(verbose, "ParGCCardsPerStrideChunk (" INTX_FORMAT ") is too large for the heap size and " "must be less than or equal to card table size (" SIZE_FORMAT ")\n", value, card_table_size); return Flag::VIOLATES_CONSTRAINT; } // ParGCCardsPerStrideChunk is used with n_strides(ParallelGCThreads*ParGCStridesPerThread) ! // from CardTableRS::process_stride(). Note that ParGCStridesPerThread is already checked // not to make an overflow with ParallelGCThreads from its constraint function. uintx n_strides = ParallelGCThreads * ParGCStridesPerThread; uintx ergo_max = max_uintx / n_strides; if ((uintx)value > ergo_max) { CommandLineError::print(verbose,
*** 466,478 **** Flag::Error status = CMSReservedAreaConstraintFunc("CMSRescanMultiple", value, verbose); #if INCLUDE_ALL_GCS if (status == Flag::SUCCESS && UseConcMarkSweepGC) { // CMSParRemarkTask::do_dirty_card_rescan_tasks requires CompactibleFreeListSpace::rescan_task_size() ! // to be aligned to CardTableModRefBS::card_size * BitsPerWord. // Note that rescan_task_size() will be aligned if CMSRescanMultiple is a multiple of 'HeapWordSize' ! // because rescan_task_size() is CardTableModRefBS::card_size / HeapWordSize * BitsPerWord. if (value % HeapWordSize != 0) { CommandLineError::print(verbose, "CMSRescanMultiple (" SIZE_FORMAT ") must be " "a multiple of " SIZE_FORMAT "\n", value, HeapWordSize); --- 466,478 ---- Flag::Error status = CMSReservedAreaConstraintFunc("CMSRescanMultiple", value, verbose); #if INCLUDE_ALL_GCS if (status == Flag::SUCCESS && UseConcMarkSweepGC) { // CMSParRemarkTask::do_dirty_card_rescan_tasks requires CompactibleFreeListSpace::rescan_task_size() ! // to be aligned to CardTable::card_size * BitsPerWord. // Note that rescan_task_size() will be aligned if CMSRescanMultiple is a multiple of 'HeapWordSize' ! // because rescan_task_size() is CardTable::card_size / HeapWordSize * BitsPerWord. if (value % HeapWordSize != 0) { CommandLineError::print(verbose, "CMSRescanMultiple (" SIZE_FORMAT ") must be " "a multiple of " SIZE_FORMAT "\n", value, HeapWordSize);
< prev index next >