mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8306582: Remove MetaspaceShared::exit_after_static_dump()
Reviewed-by: iklam, alanb, ccheung
This commit is contained in:
parent
4ba81f631f
commit
cff25dd574
9 changed files with 94 additions and 44 deletions
|
@ -85,6 +85,7 @@ static jboolean _is_java_args = JNI_FALSE;
|
|||
static jboolean _have_classpath = JNI_FALSE;
|
||||
static const char *_fVersion;
|
||||
static jboolean _wc_enabled = JNI_FALSE;
|
||||
static jboolean dumpSharedSpaces = JNI_FALSE; /* -Xshare:dump */
|
||||
|
||||
/*
|
||||
* Entries for splash screen environment variables.
|
||||
|
@ -455,6 +456,14 @@ JavaMain(void* _args)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
/*
|
||||
* -Xshare:dump does not have a main class so the VM can safely exit now
|
||||
*/
|
||||
if (dumpSharedSpaces) {
|
||||
CHECK_EXCEPTION_LEAVE(1);
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/* If the user specified neither a class name nor a JAR file */
|
||||
if (printXUsage || printUsage || what == 0 || mode == LM_UNKNOWN) {
|
||||
PrintUsage(env, printXUsage);
|
||||
|
@ -1432,6 +1441,13 @@ ParseArguments(int *pargc, char ***pargv,
|
|||
}
|
||||
AddOption(arg, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for CDS option
|
||||
*/
|
||||
if (JLI_StrCmp(arg, "-Xshare:dump") == 0) {
|
||||
dumpSharedSpaces = JNI_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (*pwhat == NULL && --argc >= 0) {
|
||||
|
@ -1440,7 +1456,7 @@ ParseArguments(int *pargc, char ***pargv,
|
|||
|
||||
if (*pwhat == NULL) {
|
||||
/* LM_UNKNOWN okay for options that exit */
|
||||
if (!listModules && !describeModule && !validateModules) {
|
||||
if (!listModules && !describeModule && !validateModules && !dumpSharedSpaces) {
|
||||
*pret = 1;
|
||||
}
|
||||
} else if (mode == LM_UNKNOWN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue