mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2024-11-23 12:29:56 +00:00
8242075: Shenandoah: rename ShenandoahHeapRegionSize flag
Reviewed-by: rkennke
This commit is contained in:
parent
302ed61d34
commit
476f84d9ff
@ -520,7 +520,7 @@ void ShenandoahHeapRegion::setup_sizes(size_t max_heap_size) {
|
||||
}
|
||||
|
||||
size_t region_size;
|
||||
if (FLAG_IS_DEFAULT(ShenandoahHeapRegionSize)) {
|
||||
if (FLAG_IS_DEFAULT(ShenandoahRegionSize)) {
|
||||
if (ShenandoahMinRegionSize > max_heap_size / MIN_NUM_REGIONS) {
|
||||
err_msg message("Max heap size (" SIZE_FORMAT "%s) is too low to afford the minimum number "
|
||||
"of regions (" SIZE_FORMAT ") of minimum region size (" SIZE_FORMAT "%s).",
|
||||
@ -563,27 +563,27 @@ void ShenandoahHeapRegion::setup_sizes(size_t max_heap_size) {
|
||||
region_size = MIN2(ShenandoahMaxRegionSize, region_size);
|
||||
|
||||
} else {
|
||||
if (ShenandoahHeapRegionSize > max_heap_size / MIN_NUM_REGIONS) {
|
||||
if (ShenandoahRegionSize > max_heap_size / MIN_NUM_REGIONS) {
|
||||
err_msg message("Max heap size (" SIZE_FORMAT "%s) is too low to afford the minimum number "
|
||||
"of regions (" SIZE_FORMAT ") of requested size (" SIZE_FORMAT "%s).",
|
||||
byte_size_in_proper_unit(max_heap_size), proper_unit_for_byte_size(max_heap_size),
|
||||
MIN_NUM_REGIONS,
|
||||
byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize));
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
|
||||
byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize));
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
|
||||
}
|
||||
if (ShenandoahHeapRegionSize < ShenandoahMinRegionSize) {
|
||||
if (ShenandoahRegionSize < ShenandoahMinRegionSize) {
|
||||
err_msg message("Heap region size (" SIZE_FORMAT "%s) should be larger than min region size (" SIZE_FORMAT "%s).",
|
||||
byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize),
|
||||
byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize),
|
||||
byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize));
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
|
||||
}
|
||||
if (ShenandoahHeapRegionSize > ShenandoahMaxRegionSize) {
|
||||
if (ShenandoahRegionSize > ShenandoahMaxRegionSize) {
|
||||
err_msg message("Heap region size (" SIZE_FORMAT "%s) should be lower than max region size (" SIZE_FORMAT "%s).",
|
||||
byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize),
|
||||
byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize),
|
||||
byte_size_in_proper_unit(ShenandoahMaxRegionSize), proper_unit_for_byte_size(ShenandoahMaxRegionSize));
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
|
||||
vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
|
||||
}
|
||||
region_size = ShenandoahHeapRegionSize;
|
||||
region_size = ShenandoahRegionSize;
|
||||
}
|
||||
|
||||
// Make sure region size is at least one large page, if enabled.
|
||||
|
@ -39,7 +39,7 @@
|
||||
constraint, \
|
||||
writeable) \
|
||||
\
|
||||
experimental(size_t, ShenandoahHeapRegionSize, 0, \
|
||||
experimental(size_t, ShenandoahRegionSize, 0, \
|
||||
"Static heap region size. Set zero to enable automatic sizing.") \
|
||||
\
|
||||
experimental(size_t, ShenandoahTargetNumRegions, 2048, \
|
||||
|
@ -52,8 +52,8 @@ import jdk.internal.vm.annotation.Contended;
|
||||
* @requires vm.gc.Shenandoah & !vm.graal.enabled
|
||||
* @bug 8151499 8153734
|
||||
* @modules java.base/jdk.internal.vm.annotation
|
||||
* @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
|
||||
* @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify gc.TestHumongousReferenceObject
|
||||
* @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
|
||||
* @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify gc.TestHumongousReferenceObject
|
||||
*/
|
||||
public class TestHumongousReferenceObject {
|
||||
|
||||
|
@ -69,10 +69,10 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms100m",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=200m",
|
||||
"-XX:ShenandoahRegionSize=200m",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
|
||||
output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
|
||||
output.shouldHaveExitValue(1);
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms100m",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=9m",
|
||||
"-XX:ShenandoahRegionSize=9m",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -92,10 +92,10 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms100m",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=255K",
|
||||
"-XX:ShenandoahRegionSize=255K",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
|
||||
output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
|
||||
output.shouldHaveExitValue(1);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms100m",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=260K",
|
||||
"-XX:ShenandoahRegionSize=260K",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -115,7 +115,7 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms1g",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=32M",
|
||||
"-XX:ShenandoahRegionSize=32M",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -126,10 +126,10 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms1g",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=64M",
|
||||
"-XX:ShenandoahRegionSize=64M",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
|
||||
output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
|
||||
output.shouldHaveExitValue(1);
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms1g",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=256K",
|
||||
"-XX:ShenandoahRegionSize=256K",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -149,10 +149,10 @@ public class TestRegionSizeArgs {
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xms1g",
|
||||
"-Xmx1g",
|
||||
"-XX:ShenandoahHeapRegionSize=128K",
|
||||
"-XX:ShenandoahRegionSize=128K",
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
|
||||
output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
|
||||
output.shouldHaveExitValue(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user