< prev index next >

src/hotspot/share/gc/epsilon/epsilonArguments.cpp

Print this page
rev 59459 : 8245718: Epsilon: improve configuration logging
Reviewed-by: XXX


  28 #include "gc/shared/gcArguments.hpp"
  29 #include "runtime/globals.hpp"
  30 #include "runtime/globals_extension.hpp"
  31 #include "runtime/vm_version.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 size_t EpsilonArguments::conservative_max_heap_alignment() {
  35   return UseLargePages ? os::large_page_size() : os::vm_page_size();
  36 }
  37 
  38 void EpsilonArguments::initialize() {
  39   GCArguments::initialize();
  40 
  41   assert(UseEpsilonGC, "Sanity");
  42 
  43   // Forcefully exit when OOME is detected. Nothing we can do at that point.
  44   if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) {
  45     FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true);
  46   }
  47 
  48   // Warn users that non-resizable heap might be better for some configurations.
  49   // We are not adjusting the heap size by ourselves, because it affects startup time.
  50   if (InitialHeapSize != MaxHeapSize) {
  51     log_warning(gc)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");
  52   }
  53 
  54   // Warn users that AlwaysPreTouch might be better for some configurations.
  55   // We are not turning this on by ourselves, because it affects startup time.
  56   if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {
  57     log_warning(gc)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");
  58   }
  59 
  60   if (EpsilonMaxTLABSize < MinTLABSize) {
  61     log_warning(gc)("EpsilonMaxTLABSize < MinTLABSize, adjusting it to " SIZE_FORMAT, MinTLABSize);
  62     EpsilonMaxTLABSize = MinTLABSize;
  63   }
  64 
  65   if (!EpsilonElasticTLAB && EpsilonElasticTLABDecay) {
  66     log_warning(gc)("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
  67     FLAG_SET_DEFAULT(EpsilonElasticTLABDecay, false);
  68   }
  69 
  70 #ifdef COMPILER2
  71   // Enable loop strip mining: there are still non-GC safepoints, no need to make it worse
  72   if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
  73     FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
  74     if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
  75       FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
  76     }
  77   }
  78 #endif
  79 }


  28 #include "gc/shared/gcArguments.hpp"
  29 #include "runtime/globals.hpp"
  30 #include "runtime/globals_extension.hpp"
  31 #include "runtime/vm_version.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 size_t EpsilonArguments::conservative_max_heap_alignment() {
  35   return UseLargePages ? os::large_page_size() : os::vm_page_size();
  36 }
  37 
  38 void EpsilonArguments::initialize() {
  39   GCArguments::initialize();
  40 
  41   assert(UseEpsilonGC, "Sanity");
  42 
  43   // Forcefully exit when OOME is detected. Nothing we can do at that point.
  44   if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) {
  45     FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true);
  46   }
  47 












  48   if (EpsilonMaxTLABSize < MinTLABSize) {
  49     log_warning(gc)("EpsilonMaxTLABSize < MinTLABSize, adjusting it to " SIZE_FORMAT, MinTLABSize);
  50     EpsilonMaxTLABSize = MinTLABSize;
  51   }
  52 
  53   if (!EpsilonElasticTLAB && EpsilonElasticTLABDecay) {
  54     log_warning(gc)("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
  55     FLAG_SET_DEFAULT(EpsilonElasticTLABDecay, false);
  56   }
  57 
  58 #ifdef COMPILER2
  59   // Enable loop strip mining: there are still non-GC safepoints, no need to make it worse
  60   if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
  61     FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
  62     if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
  63       FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
  64     }
  65   }
  66 #endif
  67 }
< prev index next >