The following #ifdef block should be removed. The comments in there is no longer correct.
AfterJDK-8074345, bytecode rewriting is enabled for non-shared classes. So CDS should no longer affect the performance of benchmarks executed by C2.
----------
void Arguments::set_ergonomics_flags() {
select_gc();
#if defined(COMPILER2) || INCLUDE_JVMCI
// Shared spaces work fine with other GCs but causes bytecode rewriting
// to be disabled, which hurts interpreter performance and decreases
// server performance. When -server is specified, keep the default off
// unless it is asked for. Future work: either add bytecode rewriting
// at link time, or rewrite bytecodes in non-shared methods.
if (!DumpSharedSpaces && !RequireSharedSpaces &&
(FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
no_shared_spaces("COMPILER2 default: -Xshare:auto | off, have to manually setup to on.");
}
#endif
------------
After
----------
void Arguments::set_ergonomics_flags() {
select_gc();
#if defined(COMPILER2) || INCLUDE_JVMCI
// Shared spaces work fine with other GCs but causes bytecode rewriting
// to be disabled, which hurts interpreter performance and decreases
// server performance. When -server is specified, keep the default off
// unless it is asked for. Future work: either add bytecode rewriting
// at link time, or rewrite bytecodes in non-shared methods.
if (!DumpSharedSpaces && !RequireSharedSpaces &&
(FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
no_shared_spaces("COMPILER2 default: -Xshare:auto | off, have to manually setup to on.");
}
#endif
------------
- relates to
-
JDK-8147999 The CDS classlist needs to be updated for JDK9
-
- Closed
-
-
JDK-8074345 Enable RewriteBytecodes when VM runs with CDS
-
- Resolved
-
-
JDK-8154204 [TESTBUG] Update DefaultUseWithClient test to handle client-less builds
-
- Resolved
-
There are no Sub-Tasks for this issue.