Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/arguments.cpp @ 14317:b59507f713e0
8027113: decouple the '-XXaltjvm=<path>' option from the gamma launcher
Summary: decoupled the '-XXaltjvm=<path>' option from the gamma launcher. Clearing the way for removing the remaining cruft associated with the previously removed gamma launcher.
Reviewed-by: dcubed, dholmes
author | rdurbin |
---|---|
date | Thu, 30 Jan 2014 14:12:22 -0800 |
parents | 8254553994b9 |
children | 1020b892787b |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Thu Jan 30 09:41:45 2014 +0100 +++ b/src/share/vm/runtime/arguments.cpp Thu Jan 30 14:12:22 2014 -0800 @@ -101,7 +101,7 @@ const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; int Arguments::_sun_java_launcher_pid = -1; -bool Arguments::_created_by_gamma_launcher = false; +bool Arguments::_sun_java_launcher_is_altjvm = false; // These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*) bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; @@ -151,7 +151,8 @@ // Process java launcher properties. void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) { - // See if sun.java.launcher or sun.java.launcher.pid is defined. + // See if sun.java.launcher, sun.java.launcher.is_altjvm or + // sun.java.launcher.pid is defined. // Must do this before setting up other system properties, // as some of them may depend on launcher type. for (int index = 0; index < args->nOptions; index++) { @@ -162,6 +163,12 @@ process_java_launcher_argument(tail, option->extraInfo); continue; } + if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) { + if (strcmp(tail, "true") == 0) { + _sun_java_launcher_is_altjvm = true; + } + continue; + } if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) { _sun_java_launcher_pid = atoi(tail); continue; @@ -1013,9 +1020,10 @@ _java_command = value; // Record value in Arguments, but let it get passed to Java. - } else if (strcmp(key, "sun.java.launcher.pid") == 0) { - // launcher.pid property is private and is processed - // in process_sun_java_launcher_properties(); + } else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0 || + strcmp(key, "sun.java.launcher.pid") == 0) { + // sun.java.launcher.is_altjvm and sun.java.launcher.pid property are + // private and are processed in process_sun_java_launcher_properties(); // the sun.java.launcher property is passed on to the java application FreeHeap(key); if (eq != NULL) { @@ -1800,9 +1808,6 @@ void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) { _sun_java_launcher = strdup(launcher); - if (strcmp("gamma", _sun_java_launcher) == 0) { - _created_by_gamma_launcher = true; - } } bool Arguments::created_by_java_launcher() { @@ -1810,8 +1815,8 @@ return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0; } -bool Arguments::created_by_gamma_launcher() { - return _created_by_gamma_launcher; +bool Arguments::sun_java_launcher_is_altjvm() { + return _sun_java_launcher_is_altjvm; } //=========================================================================================================== @@ -3765,16 +3770,6 @@ } } - // set PauseAtExit if the gamma launcher was used and a debugger is attached - // but only if not already set on the commandline - if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) { - bool set = false; - CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set); - if (!set) { - FLAG_SET_DEFAULT(PauseAtExit, true); - } - } - return JNI_OK; }