hotspot/src/share/vm/runtime/arguments.cpp
changeset 19979 ebe1dbb6e1aa
parent 19732 88f375dd7d65
child 19986 33d188c66ed9
equal deleted inserted replaced
19766:b6d8784a1037 19979:ebe1dbb6e1aa
  1437 #endif //  _WIN64
  1437 #endif //  _WIN64
  1438   } else {
  1438   } else {
  1439     if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
  1439     if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
  1440       warning("Max heap size too large for Compressed Oops");
  1440       warning("Max heap size too large for Compressed Oops");
  1441       FLAG_SET_DEFAULT(UseCompressedOops, false);
  1441       FLAG_SET_DEFAULT(UseCompressedOops, false);
  1442       FLAG_SET_DEFAULT(UseCompressedKlassPointers, false);
  1442       FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
  1443     }
  1443     }
  1444   }
  1444   }
  1445 #endif // _LP64
  1445 #endif // _LP64
  1446 #endif // ZERO
  1446 #endif // ZERO
  1447 }
  1447 }
  1450 // NOTE: set_use_compressed_klass_ptrs() must be called after calling
  1450 // NOTE: set_use_compressed_klass_ptrs() must be called after calling
  1451 // set_use_compressed_oops().
  1451 // set_use_compressed_oops().
  1452 void Arguments::set_use_compressed_klass_ptrs() {
  1452 void Arguments::set_use_compressed_klass_ptrs() {
  1453 #ifndef ZERO
  1453 #ifndef ZERO
  1454 #ifdef _LP64
  1454 #ifdef _LP64
  1455   // UseCompressedOops must be on for UseCompressedKlassPointers to be on.
  1455   // UseCompressedOops must be on for UseCompressedClassPointers to be on.
  1456   if (!UseCompressedOops) {
  1456   if (!UseCompressedOops) {
  1457     if (UseCompressedKlassPointers) {
  1457     if (UseCompressedClassPointers) {
  1458       warning("UseCompressedKlassPointers requires UseCompressedOops");
  1458       warning("UseCompressedClassPointers requires UseCompressedOops");
  1459     }
  1459     }
  1460     FLAG_SET_DEFAULT(UseCompressedKlassPointers, false);
  1460     FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
  1461   } else {
  1461   } else {
  1462     // Turn on UseCompressedKlassPointers too
  1462     // Turn on UseCompressedClassPointers too
  1463     if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) {
  1463     if (FLAG_IS_DEFAULT(UseCompressedClassPointers)) {
  1464       FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true);
  1464       FLAG_SET_ERGO(bool, UseCompressedClassPointers, true);
  1465     }
  1465     }
  1466     // Check the ClassMetaspaceSize to make sure we use compressed klass ptrs.
  1466     // Check the CompressedClassSpaceSize to make sure we use compressed klass ptrs.
  1467     if (UseCompressedKlassPointers) {
  1467     if (UseCompressedClassPointers) {
  1468       if (ClassMetaspaceSize > KlassEncodingMetaspaceMax) {
  1468       if (CompressedClassSpaceSize > KlassEncodingMetaspaceMax) {
  1469         warning("Class metaspace size is too large for UseCompressedKlassPointers");
  1469         warning("CompressedClassSpaceSize is too large for UseCompressedClassPointers");
  1470         FLAG_SET_DEFAULT(UseCompressedKlassPointers, false);
  1470         FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
  1471       }
  1471       }
  1472     }
  1472     }
  1473   }
  1473   }
  1474 #endif // _LP64
  1474 #endif // _LP64
  1475 #endif // !ZERO
  1475 #endif // !ZERO
  2146   status = status && verify_interval(TLABWasteTargetPercent,
  2146   status = status && verify_interval(TLABWasteTargetPercent,
  2147                                      1, 100, "TLABWasteTargetPercent");
  2147                                      1, 100, "TLABWasteTargetPercent");
  2148 
  2148 
  2149   status = status && verify_object_alignment();
  2149   status = status && verify_object_alignment();
  2150 
  2150 
  2151   status = status && verify_interval(ClassMetaspaceSize, 1*M, 3*G,
  2151   status = status && verify_interval(CompressedClassSpaceSize, 1*M, 3*G,
  2152                                       "ClassMetaspaceSize");
  2152                                       "CompressedClassSpaceSize");
  2153 
  2153 
  2154   status = status && verify_interval(MarkStackSizeMax,
  2154   status = status && verify_interval(MarkStackSizeMax,
  2155                                   1, (max_jint - 1), "MarkStackSizeMax");
  2155                                   1, (max_jint - 1), "MarkStackSizeMax");
  2156   status = status && verify_interval(NUMAChunkResizeWeight, 0, 100, "NUMAChunkResizeWeight");
  2156   status = status && verify_interval(NUMAChunkResizeWeight, 0, 100, "NUMAChunkResizeWeight");
  2157 
  2157 
  3272     if (RequireSharedSpaces) {
  3272     if (RequireSharedSpaces) {
  3273       warning("cannot dump shared archive while using shared archive");
  3273       warning("cannot dump shared archive while using shared archive");
  3274     }
  3274     }
  3275     UseSharedSpaces = false;
  3275     UseSharedSpaces = false;
  3276 #ifdef _LP64
  3276 #ifdef _LP64
  3277     if (!UseCompressedOops || !UseCompressedKlassPointers) {
  3277     if (!UseCompressedOops || !UseCompressedClassPointers) {
  3278       vm_exit_during_initialization(
  3278       vm_exit_during_initialization(
  3279         "Cannot dump shared archive when UseCompressedOops or UseCompressedKlassPointers is off.", NULL);
  3279         "Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off.", NULL);
  3280     }
  3280     }
  3281   } else {
  3281   } else {
  3282     // UseCompressedOops and UseCompressedKlassPointers must be on for UseSharedSpaces.
  3282     // UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces.
  3283     if (!UseCompressedOops || !UseCompressedKlassPointers) {
  3283     if (!UseCompressedOops || !UseCompressedClassPointers) {
  3284       no_shared_spaces();
  3284       no_shared_spaces();
  3285     }
  3285     }
  3286 #endif
  3286 #endif
  3287   }
  3287   }
  3288 }
  3288 }
  3579 #ifdef CC_INTERP
  3579 #ifdef CC_INTERP
  3580   // Clear flags not supported by the C++ interpreter
  3580   // Clear flags not supported by the C++ interpreter
  3581   FLAG_SET_DEFAULT(ProfileInterpreter, false);
  3581   FLAG_SET_DEFAULT(ProfileInterpreter, false);
  3582   FLAG_SET_DEFAULT(UseBiasedLocking, false);
  3582   FLAG_SET_DEFAULT(UseBiasedLocking, false);
  3583   LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
  3583   LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
  3584   LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedKlassPointers, false));
  3584   LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false));
  3585 #endif // CC_INTERP
  3585 #endif // CC_INTERP
  3586 
  3586 
  3587 #ifdef COMPILER2
  3587 #ifdef COMPILER2
  3588   if (!UseBiasedLocking || EmitSync != 0) {
  3588   if (!UseBiasedLocking || EmitSync != 0) {
  3589     UseOptoBiasInlining = false;
  3589     UseOptoBiasInlining = false;
  3606 #endif
  3606 #endif
  3607 
  3607 
  3608   if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
  3608   if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
  3609     warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
  3609     warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
  3610     DebugNonSafepoints = true;
  3610     DebugNonSafepoints = true;
       
  3611   }
       
  3612 
       
  3613   if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
       
  3614     warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
  3611   }
  3615   }
  3612 
  3616 
  3613 #ifndef PRODUCT
  3617 #ifndef PRODUCT
  3614   if (CompileTheWorld) {
  3618   if (CompileTheWorld) {
  3615     // Force NmethodSweeper to sweep whole CodeCache each time.
  3619     // Force NmethodSweeper to sweep whole CodeCache each time.