diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp index 24a98be331f955586998688707e43356b0a25fa6..f850e05cbab6da2dcdb1a41a32847f27ac12c9de 100644 --- a/src/share/vm/runtime/arguments.cpp +++ b/src/share/vm/runtime/arguments.cpp @@ -1485,14 +1485,6 @@ void Arguments::set_parallel_gc_flags() { } } } - if (UseNUMA) { - if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { - FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); - } - // For those collectors or operating systems (eg, Windows) that do - // not support full UseNUMA, we will map to UseNUMAInterleaving for now - UseNUMAInterleaving = true; - } } void Arguments::set_g1_gc_flags() { @@ -3332,6 +3324,22 @@ jint Arguments::parse(const JavaVMInitArgs* args) { return JNI_OK; } +jint Arguments::adjust_after_os() { +#if INCLUDE_ALTERNATE_GCS + if (UseParallelGC || UseParallelOldGC) { + if (UseNUMA) { + if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { + FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); + } + // For those collectors or operating systems (eg, Windows) that do + // not support full UseNUMA, we will map to UseNUMAInterleaving for now + UseNUMAInterleaving = true; + } + } +#endif + return JNI_OK; +} + int Arguments::PropertyList_count(SystemProperty* pl) { int count = 0; while(pl != NULL) { diff --git a/src/share/vm/runtime/arguments.hpp b/src/share/vm/runtime/arguments.hpp index 1dbb5eb2221b5ce462df4dd7b95767edb1f5c21e..5e0f0094498f49e392ca3e406a3098fa6ec1239d 100644 --- a/src/share/vm/runtime/arguments.hpp +++ b/src/share/vm/runtime/arguments.hpp @@ -409,6 +409,8 @@ class Arguments : AllStatic { public: // Parses the arguments static jint parse(const JavaVMInitArgs* args); + // Adjusts the arguments after the OS have adjusted the arguments + static jint adjust_after_os(); // Check for consistency in the selection of the garbage collector. static bool check_gc_consistency(); // Check consistecy or otherwise of VM argument settings diff --git a/src/share/vm/runtime/thread.cpp b/src/share/vm/runtime/thread.cpp index 45c73408b8683570c3bcc8a76e158ff5862def88..653d8e5f82ac7ae20b69b2c704e69ef720bb27d9 100644 --- a/src/share/vm/runtime/thread.cpp +++ b/src/share/vm/runtime/thread.cpp @@ -3334,6 +3334,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { jint os_init_2_result = os::init_2(); if (os_init_2_result != JNI_OK) return os_init_2_result; + jint adjust_after_os_result = Arguments::adjust_after_os(); + if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; + // intialize TLS ThreadLocalStorage::init();