Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 7982:10d5f25a7c67
8000968: NPG: UseCompressedKlassPointers asserts with ObjectAlignmentInBytes for > 32G CompressedOops
Summary: Pick a base that works for both CompressedOpps alignment and CompressedKlassPtrs alignment.
Reviewed-by: kvn, roland
author | hseigel |
---|---|
date | Mon, 04 Feb 2013 08:26:02 -0500 |
parents | baf7fac3167e |
children | 3c9bc17b9403 9425ba04792d |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Sun Feb 03 17:12:31 2013 -0500 +++ b/src/share/vm/runtime/arguments.cpp Mon Feb 04 08:26:02 2013 -0500 @@ -1446,13 +1446,18 @@ } // Set the ClassMetaspaceSize to something that will not need to be // expanded, since it cannot be expanded. - if (UseCompressedKlassPointers && FLAG_IS_DEFAULT(ClassMetaspaceSize)) { - // 100,000 classes seems like a good size, so 100M assumes around 1K - // per klass. The vtable and oopMap is embedded so we don't have a fixed - // size per klass. Eventually, this will be parameterized because it - // would also be useful to determine the optimal size of the - // systemDictionary. - FLAG_SET_ERGO(uintx, ClassMetaspaceSize, 100*M); + if (UseCompressedKlassPointers) { + if (ClassMetaspaceSize > KlassEncodingMetaspaceMax) { + warning("Class metaspace size is too large for UseCompressedKlassPointers"); + FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); + } else if (FLAG_IS_DEFAULT(ClassMetaspaceSize)) { + // 100,000 classes seems like a good size, so 100M assumes around 1K + // per klass. The vtable and oopMap is embedded so we don't have a fixed + // size per klass. Eventually, this will be parameterized because it + // would also be useful to determine the optimal size of the + // systemDictionary. + FLAG_SET_ERGO(uintx, ClassMetaspaceSize, 100*M); + } } } // Also checks that certain machines are slower with compressed oops