mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8152188: Allow CMSBitMapYieldQuantum for BitMap::clear_range and clear_large_range
Let BitMap::clear_large_range call clear_range instead of firing an assert Reviewed-by: jmasa, jwilhelm
This commit is contained in:
parent
4f0ffb6ce9
commit
7908c3db94
5 changed files with 31 additions and 5 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "utilities/defaultStream.hpp"
|
||||
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
|
||||
#include "gc/g1/g1_globals.hpp"
|
||||
#include "gc/g1/heapRegionBounds.inline.hpp"
|
||||
#include "gc/shared/plab.hpp"
|
||||
|
@ -507,6 +508,27 @@ Flag::Error CMSWorkQueueDrainThresholdConstraintFunc(uintx value, bool verbose)
|
|||
return Flag::SUCCESS;
|
||||
}
|
||||
|
||||
Flag::Error CMSBitMapYieldQuantumConstraintFunc(size_t value, bool verbose) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Skip for current default value.
|
||||
if (UseConcMarkSweepGC && FLAG_IS_CMDLINE(CMSBitMapYieldQuantum)) {
|
||||
// CMSBitMapYieldQuantum should be compared with mark bitmap size.
|
||||
ConcurrentMarkSweepGeneration* cms = (ConcurrentMarkSweepGeneration*)GenCollectedHeap::heap()->old_gen();
|
||||
size_t bitmap_size = cms->collector()->markBitMap()->sizeInWords();
|
||||
|
||||
if (value > bitmap_size) {
|
||||
CommandLineError::print(verbose,
|
||||
"CMSBitMapYieldQuantum (" SIZE_FORMAT ") must "
|
||||
"be less than or equal to bitmap size (" SIZE_FORMAT ") "
|
||||
"whose size corresponds to the size of old generation of the Java heap\n",
|
||||
value, bitmap_size);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Flag::SUCCESS;
|
||||
}
|
||||
|
||||
Flag::Error MaxGCPauseMillisConstraintFunc(uintx value, bool verbose) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC && FLAG_IS_CMDLINE(MaxGCPauseMillis) && (value >= GCPauseIntervalMillis)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue