mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8255047: Add HotSpot UseDebuggerErgo flags
Reviewed-by: dcubed, dholmes
This commit is contained in:
parent
211bb62a90
commit
ae72b5283b
4 changed files with 51 additions and 3 deletions
|
@ -3901,6 +3901,22 @@ bool Arguments::handle_deprecated_print_gc_flags() {
|
|||
return true;
|
||||
}
|
||||
|
||||
static void apply_debugger_ergo() {
|
||||
if (UseDebuggerErgo) {
|
||||
// Turn on sub-flags
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseDebuggerErgo1, true);
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseDebuggerErgo2, true);
|
||||
}
|
||||
|
||||
if (UseDebuggerErgo2) {
|
||||
// Debugging with limited number of CPUs
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseNUMA, false);
|
||||
FLAG_SET_ERGO_IF_DEFAULT(ConcGCThreads, 1);
|
||||
FLAG_SET_ERGO_IF_DEFAULT(ParallelGCThreads, 1);
|
||||
FLAG_SET_ERGO_IF_DEFAULT(CICompilerCount, 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Parse entry point called from JNI_CreateJavaVM
|
||||
|
||||
jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
|
@ -4097,6 +4113,8 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
|||
}
|
||||
#endif
|
||||
|
||||
apply_debugger_ergo();
|
||||
|
||||
return JNI_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue