Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 2302:da091bb67459
7022037: Pause when exiting if debugger is attached on windows
Reviewed-by: dsamersoff, kamg, hosterda
author | sla |
---|---|
date | Mon, 28 Feb 2011 14:19:52 +0100 |
parents | f77b3ec064b0 |
children | 8c9c9ee30d71 9f44e9aad2d9 a2c2eac1ca62 |
comparison
equal
deleted
inserted
replaced
2301:f91db74a6810 | 2302:da091bb67459 |
---|---|
76 bool Arguments::_java_compiler = false; | 76 bool Arguments::_java_compiler = false; |
77 bool Arguments::_xdebug_mode = false; | 77 bool Arguments::_xdebug_mode = false; |
78 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; | 78 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; |
79 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; | 79 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; |
80 int Arguments::_sun_java_launcher_pid = -1; | 80 int Arguments::_sun_java_launcher_pid = -1; |
81 bool Arguments::_created_by_gamma_launcher = false; | |
81 | 82 |
82 // These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*) | 83 // These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*) |
83 bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; | 84 bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; |
84 bool Arguments::_UseOnStackReplacement = UseOnStackReplacement; | 85 bool Arguments::_UseOnStackReplacement = UseOnStackReplacement; |
85 bool Arguments::_BackgroundCompilation = BackgroundCompilation; | 86 bool Arguments::_BackgroundCompilation = BackgroundCompilation; |
1654 } | 1655 } |
1655 } | 1656 } |
1656 | 1657 |
1657 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) { | 1658 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) { |
1658 _sun_java_launcher = strdup(launcher); | 1659 _sun_java_launcher = strdup(launcher); |
1660 if (strcmp("gamma", _sun_java_launcher) == 0) { | |
1661 _created_by_gamma_launcher = true; | |
1662 } | |
1659 } | 1663 } |
1660 | 1664 |
1661 bool Arguments::created_by_java_launcher() { | 1665 bool Arguments::created_by_java_launcher() { |
1662 assert(_sun_java_launcher != NULL, "property must have value"); | 1666 assert(_sun_java_launcher != NULL, "property must have value"); |
1663 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0; | 1667 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0; |
1668 } | |
1669 | |
1670 bool Arguments::created_by_gamma_launcher() { | |
1671 return _created_by_gamma_launcher; | |
1664 } | 1672 } |
1665 | 1673 |
1666 //=========================================================================================================== | 1674 //=========================================================================================================== |
1667 // Parsing of main arguments | 1675 // Parsing of main arguments |
1668 | 1676 |
3153 !(FLAG_IS_CMDLINE(UseBiasedLocking))) { | 3161 !(FLAG_IS_CMDLINE(UseBiasedLocking))) { |
3154 UseBiasedLocking = false; | 3162 UseBiasedLocking = false; |
3155 } | 3163 } |
3156 } | 3164 } |
3157 | 3165 |
3166 // set PauseAtExit if the gamma launcher was used and a debugger is attached | |
3167 // but only if not already set on the commandline | |
3168 if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) { | |
3169 bool set = false; | |
3170 CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set); | |
3171 if (!set) { | |
3172 FLAG_SET_DEFAULT(PauseAtExit, true); | |
3173 } | |
3174 } | |
3175 | |
3158 return JNI_OK; | 3176 return JNI_OK; |
3159 } | 3177 } |
3160 | 3178 |
3161 int Arguments::PropertyList_count(SystemProperty* pl) { | 3179 int Arguments::PropertyList_count(SystemProperty* pl) { |
3162 int count = 0; | 3180 int count = 0; |