src/share/vm/runtime/arguments.cpp

Print this page
rev 5190 : 8015107: NPG: Use consistent naming for metaspace concepts

*** 1437,1447 **** #endif // _WIN64 } else { if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) { warning("Max heap size too large for Compressed Oops"); FLAG_SET_DEFAULT(UseCompressedOops, false); ! FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); } } #endif // _LP64 #endif // ZERO } --- 1437,1447 ---- #endif // _WIN64 } else { if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) { warning("Max heap size too large for Compressed Oops"); FLAG_SET_DEFAULT(UseCompressedOops, false); ! FLAG_SET_DEFAULT(UseCompressedClassPointers, false); } } #endif // _LP64 #endif // ZERO }
*** 1450,1475 **** // NOTE: set_use_compressed_klass_ptrs() must be called after calling // set_use_compressed_oops(). void Arguments::set_use_compressed_klass_ptrs() { #ifndef ZERO #ifdef _LP64 ! // UseCompressedOops must be on for UseCompressedKlassPointers to be on. if (!UseCompressedOops) { ! if (UseCompressedKlassPointers) { ! warning("UseCompressedKlassPointers requires UseCompressedOops"); } ! FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); } else { ! // Turn on UseCompressedKlassPointers too ! if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) { ! FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true); ! } ! // Check the ClassMetaspaceSize to make sure we use compressed klass ptrs. ! if (UseCompressedKlassPointers) { ! if (ClassMetaspaceSize > KlassEncodingMetaspaceMax) { ! warning("Class metaspace size is too large for UseCompressedKlassPointers"); ! FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); } } } #endif // _LP64 #endif // !ZERO --- 1450,1475 ---- // NOTE: set_use_compressed_klass_ptrs() must be called after calling // set_use_compressed_oops(). void Arguments::set_use_compressed_klass_ptrs() { #ifndef ZERO #ifdef _LP64 ! // UseCompressedOops must be on for UseCompressedClassPointers to be on. if (!UseCompressedOops) { ! if (UseCompressedClassPointers) { ! warning("UseCompressedClassPointers requires UseCompressedOops"); } ! FLAG_SET_DEFAULT(UseCompressedClassPointers, false); } else { ! // Turn on UseCompressedClassPointers too ! if (FLAG_IS_DEFAULT(UseCompressedClassPointers)) { ! FLAG_SET_ERGO(bool, UseCompressedClassPointers, true); ! } ! // Check the CompressedClassSpaceSize to make sure we use compressed klass ptrs. ! if (UseCompressedClassPointers) { ! if (CompressedClassSpaceSize > KlassEncodingMetaspaceMax) { ! warning("CompressedClassSpaceSize is too large for UseCompressedClassPointers"); ! FLAG_SET_DEFAULT(UseCompressedClassPointers, false); } } } #endif // _LP64 #endif // !ZERO
*** 2157,2168 **** status = status && verify_interval(TLABWasteTargetPercent, 1, 100, "TLABWasteTargetPercent"); status = status && verify_object_alignment(); ! status = status && verify_interval(ClassMetaspaceSize, 1*M, 3*G, ! "ClassMetaspaceSize"); status = status && verify_interval(MarkStackSizeMax, 1, (max_jint - 1), "MarkStackSizeMax"); status = status && verify_interval(NUMAChunkResizeWeight, 0, 100, "NUMAChunkResizeWeight"); --- 2157,2168 ---- status = status && verify_interval(TLABWasteTargetPercent, 1, 100, "TLABWasteTargetPercent"); status = status && verify_object_alignment(); ! status = status && verify_interval(CompressedClassSpaceSize, 1*M, 3*G, ! "CompressedClassSpaceSize"); status = status && verify_interval(MarkStackSizeMax, 1, (max_jint - 1), "MarkStackSizeMax"); status = status && verify_interval(NUMAChunkResizeWeight, 0, 100, "NUMAChunkResizeWeight");
*** 3283,3299 **** if (RequireSharedSpaces) { warning("cannot dump shared archive while using shared archive"); } UseSharedSpaces = false; #ifdef _LP64 ! if (!UseCompressedOops || !UseCompressedKlassPointers) { vm_exit_during_initialization( ! "Cannot dump shared archive when UseCompressedOops or UseCompressedKlassPointers is off.", NULL); } } else { ! // UseCompressedOops and UseCompressedKlassPointers must be on for UseSharedSpaces. ! if (!UseCompressedOops || !UseCompressedKlassPointers) { no_shared_spaces(); } #endif } } --- 3283,3299 ---- if (RequireSharedSpaces) { warning("cannot dump shared archive while using shared archive"); } UseSharedSpaces = false; #ifdef _LP64 ! if (!UseCompressedOops || !UseCompressedClassPointers) { vm_exit_during_initialization( ! "Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off.", NULL); } } else { ! // UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces. ! if (!UseCompressedOops || !UseCompressedClassPointers) { no_shared_spaces(); } #endif } }
*** 3592,3602 **** #ifdef CC_INTERP // Clear flags not supported by the C++ interpreter FLAG_SET_DEFAULT(ProfileInterpreter, false); FLAG_SET_DEFAULT(UseBiasedLocking, false); LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); ! LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedKlassPointers, false)); #endif // CC_INTERP #ifdef COMPILER2 if (!UseBiasedLocking || EmitSync != 0) { UseOptoBiasInlining = false; --- 3592,3602 ---- #ifdef CC_INTERP // Clear flags not supported by the C++ interpreter FLAG_SET_DEFAULT(ProfileInterpreter, false); FLAG_SET_DEFAULT(UseBiasedLocking, false); LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); ! LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false)); #endif // CC_INTERP #ifdef COMPILER2 if (!UseBiasedLocking || EmitSync != 0) { UseOptoBiasInlining = false;
*** 3621,3630 **** --- 3621,3634 ---- if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) { warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output"); DebugNonSafepoints = true; } + if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) { + warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used"); + } + #ifndef PRODUCT if (CompileTheWorld) { // Force NmethodSweeper to sweep whole CodeCache each time. if (FLAG_IS_DEFAULT(NmethodSweepFraction)) { NmethodSweepFraction = 1;