< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "classfile/classLoader.hpp"
  28 #include "classfile/javaAssertions.hpp"
  29 #include "classfile/moduleEntry.hpp"
  30 #include "classfile/stringTable.hpp"
  31 #include "classfile/symbolTable.hpp"

  32 #include "gc/shared/gcArguments.hpp"
  33 #include "gc/shared/gcConfig.hpp"
  34 #include "gc/shared/genCollectedHeap.hpp"
  35 #include "gc/shared/referenceProcessor.hpp"
  36 #include "gc/shared/taskqueue.hpp"
  37 #include "logging/log.hpp"
  38 #include "logging/logConfiguration.hpp"
  39 #include "logging/logStream.hpp"
  40 #include "logging/logTag.hpp"
  41 #include "memory/allocation.inline.hpp"
  42 #include "memory/universe.hpp"
  43 #include "oops/oop.inline.hpp"
  44 #include "prims/jvmtiExport.hpp"
  45 #include "runtime/arguments.hpp"
  46 #include "runtime/arguments_ext.hpp"
  47 #include "runtime/commandLineFlagConstraintList.hpp"
  48 #include "runtime/commandLineFlagWriteableList.hpp"
  49 #include "runtime/commandLineFlagRangeList.hpp"
  50 #include "runtime/globals.hpp"
  51 #include "runtime/globals_extension.hpp"
  52 #include "runtime/java.hpp"
  53 #include "runtime/os.inline.hpp"
  54 #include "runtime/safepoint.hpp"
  55 #include "runtime/safepointMechanism.hpp"
  56 #include "runtime/vm_version.hpp"


2171 // Check consistency of jvmci vm argument settings.
2172 bool Arguments::check_jvmci_args_consistency() {
2173    return JVMCIGlobals::check_jvmci_flags_are_consistent();
2174 }
2175 #endif //INCLUDE_JVMCI
2176 
2177 // Check the consistency of vm_init_args
2178 bool Arguments::check_vm_args_consistency() {
2179   // Method for adding checks for flag consistency.
2180   // The intent is to warn the user of all possible conflicts,
2181   // before returning an error.
2182   // Note: Needs platform-dependent factoring.
2183   bool status = true;
2184 
2185   if (TLABRefillWasteFraction == 0) {
2186     jio_fprintf(defaultStream::error_stream(),
2187                 "TLABRefillWasteFraction should be a denominator, "
2188                 "not " SIZE_FORMAT "\n",
2189                 TLABRefillWasteFraction);
2190     status = false;
2191   }
2192 
2193   if (FullGCALot && FLAG_IS_DEFAULT(MarkSweepAlwaysCompactCount)) {
2194     MarkSweepAlwaysCompactCount = 1;  // Move objects every gc.
2195   }
2196 
2197   if (!(UseParallelGC || UseParallelOldGC) && FLAG_IS_DEFAULT(ScavengeBeforeFullGC)) {
2198     FLAG_SET_DEFAULT(ScavengeBeforeFullGC, false);
2199   }
2200 
2201   if (GCTimeLimit == 100) {
2202     // Turn off gc-overhead-limit-exceeded checks
2203     FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
2204   }
2205 
2206   // CMS space iteration, which FLSVerifyAllHeapreferences entails,
2207   // insists that we hold the requisite locks so that the iteration is
2208   // MT-safe. For the verification at start-up and shut-down, we don't
2209   // yet have a good way of acquiring and releasing these locks,
2210   // which are not visible at the CollectedHeap level. We want to
2211   // be able to acquire these locks and then do the iteration rather
2212   // than just disable the lock verification. This will be fixed under
2213   // bug 4788986.
2214   if (UseConcMarkSweepGC && FLSVerifyAllHeapReferences) {
2215     if (VerifyDuringStartup) {
2216       warning("Heap verification at start-up disabled "
2217               "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2218       VerifyDuringStartup = false; // Disable verification at start-up
2219     }
2220 
2221     if (VerifyBeforeExit) {
2222       warning("Heap verification at shutdown disabled "
2223               "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2224       VerifyBeforeExit = false; // Disable verification at shutdown
2225     }
2226   }
2227 
2228   if (PrintNMTStatistics) {
2229 #if INCLUDE_NMT
2230     if (MemTracker::tracking_level() == NMT_off) {
2231 #endif // INCLUDE_NMT
2232       warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2233       PrintNMTStatistics = false;
2234 #if INCLUDE_NMT
2235     }
2236 #endif
2237   }
2238 
2239 #if INCLUDE_JVMCI
2240   status = status && check_jvmci_args_consistency();
2241 
2242   if (EnableJVMCI) {
2243     PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
2244         AddProperty, UnwriteableProperty, InternalProperty);
2245 




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "classfile/classLoader.hpp"
  28 #include "classfile/javaAssertions.hpp"
  29 #include "classfile/moduleEntry.hpp"
  30 #include "classfile/stringTable.hpp"
  31 #include "classfile/symbolTable.hpp"
  32 #include "gc/shared/collectorPolicy.hpp"
  33 #include "gc/shared/gcArguments.hpp"
  34 #include "gc/shared/gcConfig.hpp"



  35 #include "logging/log.hpp"
  36 #include "logging/logConfiguration.hpp"
  37 #include "logging/logStream.hpp"
  38 #include "logging/logTag.hpp"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/universe.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvmtiExport.hpp"
  43 #include "runtime/arguments.hpp"
  44 #include "runtime/arguments_ext.hpp"
  45 #include "runtime/commandLineFlagConstraintList.hpp"
  46 #include "runtime/commandLineFlagWriteableList.hpp"
  47 #include "runtime/commandLineFlagRangeList.hpp"
  48 #include "runtime/globals.hpp"
  49 #include "runtime/globals_extension.hpp"
  50 #include "runtime/java.hpp"
  51 #include "runtime/os.inline.hpp"
  52 #include "runtime/safepoint.hpp"
  53 #include "runtime/safepointMechanism.hpp"
  54 #include "runtime/vm_version.hpp"


2169 // Check consistency of jvmci vm argument settings.
2170 bool Arguments::check_jvmci_args_consistency() {
2171    return JVMCIGlobals::check_jvmci_flags_are_consistent();
2172 }
2173 #endif //INCLUDE_JVMCI
2174 
2175 // Check the consistency of vm_init_args
2176 bool Arguments::check_vm_args_consistency() {
2177   // Method for adding checks for flag consistency.
2178   // The intent is to warn the user of all possible conflicts,
2179   // before returning an error.
2180   // Note: Needs platform-dependent factoring.
2181   bool status = true;
2182 
2183   if (TLABRefillWasteFraction == 0) {
2184     jio_fprintf(defaultStream::error_stream(),
2185                 "TLABRefillWasteFraction should be a denominator, "
2186                 "not " SIZE_FORMAT "\n",
2187                 TLABRefillWasteFraction);
2188     status = false;



































2189   }
2190 
2191   if (PrintNMTStatistics) {
2192 #if INCLUDE_NMT
2193     if (MemTracker::tracking_level() == NMT_off) {
2194 #endif // INCLUDE_NMT
2195       warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2196       PrintNMTStatistics = false;
2197 #if INCLUDE_NMT
2198     }
2199 #endif
2200   }
2201 
2202 #if INCLUDE_JVMCI
2203   status = status && check_jvmci_args_consistency();
2204 
2205   if (EnableJVMCI) {
2206     PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
2207         AddProperty, UnwriteableProperty, InternalProperty);
2208 


< prev index next >