mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8204965: Fix '--disable-cds' and disable CDS on AIX by default
Reviewed-by: erikj, jiangli, stuefe, dholmes
This commit is contained in:
parent
9ae0be2289
commit
79a09bd98b
5 changed files with 38 additions and 12 deletions
|
@ -241,10 +241,12 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
|
|||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
|
||||
[
|
||||
AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no@:>@],
|
||||
[enable class data sharing feature in non-minimal VM. Default is yes.])])
|
||||
AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no/auto@:>@],
|
||||
[enable class data sharing feature in non-minimal VM. Default is auto, where cds is enabled if supported on the platform.])])
|
||||
|
||||
if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
|
||||
if test "x$enable_cds" = "x" || test "x$enable_cds" = "xauto"; then
|
||||
ENABLE_CDS="true"
|
||||
elif test "x$enable_cds" = "xyes"; then
|
||||
ENABLE_CDS="true"
|
||||
elif test "x$enable_cds" = "xno"; then
|
||||
ENABLE_CDS="false"
|
||||
|
@ -252,6 +254,14 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
|
|||
AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds])
|
||||
fi
|
||||
|
||||
# Disable CDS on AIX.
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
ENABLE_CDS="false"
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_CDS)
|
||||
])
|
||||
|
||||
|
@ -424,8 +434,21 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
|||
|
||||
# All variants but minimal (and custom) get these features
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
|
||||
|
||||
AC_MSG_CHECKING([if cds should be enabled])
|
||||
if test "x$ENABLE_CDS" = "xtrue"; then
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
|
||||
else
|
||||
if test "x$enable_cds" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable features depending on variant.
|
||||
|
|
|
@ -274,8 +274,8 @@ void ClassListParser::error(const char *msg, ...) {
|
|||
// This function is used for loading classes for customized class loaders
|
||||
// during archive dumping.
|
||||
InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) {
|
||||
#if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS) || defined(AIX)))
|
||||
// The only supported platforms are: (1) Linux/64-bit; (2) Solaris/64-bit; (3) AIX/64-bit
|
||||
#if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS)))
|
||||
// The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit
|
||||
//
|
||||
// This #if condition should be in sync with the areCustomLoadersSupportedForCDS
|
||||
// method in test/lib/jdk/test/lib/Platform.java.
|
||||
|
|
|
@ -657,7 +657,11 @@ JvmtiEnv::AddToBootstrapClassLoaderSearch(const char* segment) {
|
|||
|
||||
// add the jar file to the bootclasspath
|
||||
log_info(class, load)("opened: %s", zip_entry->name());
|
||||
#if INCLUDE_CDS
|
||||
ClassLoaderExt::append_boot_classpath(zip_entry);
|
||||
#else
|
||||
ClassLoader::add_to_boot_append_entries(zip_entry);
|
||||
#endif
|
||||
return JVMTI_ERROR_NONE;
|
||||
} else {
|
||||
return JVMTI_ERROR_WRONG_PHASE;
|
||||
|
|
|
@ -1117,11 +1117,11 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
|
|||
/* FileMapInfo fields (CDS archive related) */ \
|
||||
/********************************************/ \
|
||||
\
|
||||
nonstatic_field(FileMapInfo, _header, FileMapInfo::FileMapHeader*) \
|
||||
static_field(FileMapInfo, _current_info, FileMapInfo*) \
|
||||
nonstatic_field(FileMapInfo::FileMapHeader, _space[0], FileMapInfo::FileMapHeader::space_info)\
|
||||
nonstatic_field(FileMapInfo::FileMapHeader::space_info, _addr._base, char*) \
|
||||
nonstatic_field(FileMapInfo::FileMapHeader::space_info, _used, size_t) \
|
||||
CDS_ONLY(nonstatic_field(FileMapInfo, _header, FileMapInfo::FileMapHeader*)) \
|
||||
CDS_ONLY( static_field(FileMapInfo, _current_info, FileMapInfo*)) \
|
||||
CDS_ONLY(nonstatic_field(FileMapInfo::FileMapHeader, _space[0], FileMapInfo::FileMapHeader::space_info))\
|
||||
CDS_ONLY(nonstatic_field(FileMapInfo::FileMapHeader::space_info, _addr._base, char*)) \
|
||||
CDS_ONLY(nonstatic_field(FileMapInfo::FileMapHeader::space_info, _used, size_t)) \
|
||||
\
|
||||
/******************/ \
|
||||
/* VMError fields */ \
|
||||
|
|
|
@ -344,8 +344,7 @@ public class Platform {
|
|||
boolean isLinux = Platform.isLinux();
|
||||
boolean is64 = Platform.is64bit();
|
||||
boolean isSolaris = Platform.isSolaris();
|
||||
boolean isAix = Platform.isAix();
|
||||
|
||||
return (is64 && (isLinux || isSolaris || isAix));
|
||||
return (is64 && (isLinux || isSolaris));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue