Skip to content

Commit e54051a

Browse files
committed
8307935: Class space argument processing can be simplified
Reviewed-by: stefank, coleenp
1 parent 46e3d24 commit e54051a

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

src/hotspot/share/runtime/arguments.cpp

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,29 +1482,10 @@ void Arguments::set_use_compressed_oops() {
14821482
#endif // _LP64
14831483
}
14841484

1485-
1486-
// NOTE: set_use_compressed_klass_ptrs() must be called after calling
1487-
// set_use_compressed_oops().
14881485
void Arguments::set_use_compressed_klass_ptrs() {
14891486
#ifdef _LP64
1490-
// On some architectures, the use of UseCompressedClassPointers implies the use of
1491-
// UseCompressedOops. The reason is that the rheap_base register of said platforms
1492-
// is reused to perform some optimized spilling, in order to use rheap_base as a
1493-
// temp register. But by treating it as any other temp register, spilling can typically
1494-
// be completely avoided instead. So it is better not to perform this trick. And by
1495-
// not having that reliance, large heaps, or heaps not supporting compressed oops,
1496-
// can still use compressed class pointers.
1497-
// Turn on UseCompressedClassPointers too
1498-
if (FLAG_IS_DEFAULT(UseCompressedClassPointers)) {
1499-
FLAG_SET_ERGO(UseCompressedClassPointers, true);
1500-
}
1501-
// Check the CompressedClassSpaceSize to make sure we use compressed klass ptrs.
1502-
if (UseCompressedClassPointers) {
1503-
if (CompressedClassSpaceSize > KlassEncodingMetaspaceMax) {
1504-
warning("CompressedClassSpaceSize is too large for UseCompressedClassPointers");
1505-
FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
1506-
}
1507-
}
1487+
assert(!UseCompressedClassPointers || CompressedClassSpaceSize <= KlassEncodingMetaspaceMax,
1488+
"CompressedClassSpaceSize is too large for UseCompressedClassPointers");
15081489
#endif // _LP64
15091490
}
15101491

@@ -1526,9 +1507,6 @@ jint Arguments::set_ergonomics_flags() {
15261507

15271508
#ifdef _LP64
15281509
set_use_compressed_oops();
1529-
1530-
// set_use_compressed_klass_ptrs() must be called after calling
1531-
// set_use_compressed_oops().
15321510
set_use_compressed_klass_ptrs();
15331511

15341512
// Also checks that certain machines are slower with compressed oops

src/hotspot/share/runtime/globals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const size_t minimumSymbolTableSize = 1024;
125125
"Use 32-bit object references in 64-bit VM. " \
126126
"lp64_product means flag is always constant in 32 bit VM") \
127127
\
128-
product(bool, UseCompressedClassPointers, false, \
128+
product(bool, UseCompressedClassPointers, true, \
129129
"Use 32-bit class pointers in 64-bit VM. " \
130130
"lp64_product means flag is always constant in 32 bit VM") \
131131
\

0 commit comments

Comments
 (0)