< prev index next >
src/hotspot/share/gc/epsilon/epsilonArguments.cpp
Print this page
rev 52363 : 8232051: Epsilon should warn about Xms/Xmx/AlwaysPreTouch configuration
Reviewed-by: zgu
@@ -44,17 +44,29 @@
// Forcefully exit when OOME is detected. Nothing we can do at that point.
if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) {
FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true);
}
+ // Warn users that non-resizable heap might be better for some configurations.
+ // We are not adjusting the heap size by ourselves, because it affects startup time.
+ if (InitialHeapSize != MaxHeapSize) {
+ log_warning(gc)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");
+ }
+
+ // Warn users that AlwaysPreTouch might be better for some configurations.
+ // We are not turning this on by ourselves, because it affects startup time.
+ if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {
+ log_warning(gc)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");
+ }
+
if (EpsilonMaxTLABSize < MinTLABSize) {
- warning("EpsilonMaxTLABSize < MinTLABSize, adjusting it to " SIZE_FORMAT, MinTLABSize);
+ log_warning(gc)("EpsilonMaxTLABSize < MinTLABSize, adjusting it to " SIZE_FORMAT, MinTLABSize);
EpsilonMaxTLABSize = MinTLABSize;
}
if (!EpsilonElasticTLAB && EpsilonElasticTLABDecay) {
- warning("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
+ log_warning(gc)("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
FLAG_SET_DEFAULT(EpsilonElasticTLABDecay, false);
}
#ifdef COMPILER2
// Enable loop strip mining: there are still non-GC safepoints, no need to make it worse
< prev index next >