99 SystemProperty *Arguments::_java_class_path = NULL; |
99 SystemProperty *Arguments::_java_class_path = NULL; |
100 SystemProperty *Arguments::_sun_boot_class_path = NULL; |
100 SystemProperty *Arguments::_sun_boot_class_path = NULL; |
101 |
101 |
102 char* Arguments::_meta_index_path = NULL; |
102 char* Arguments::_meta_index_path = NULL; |
103 char* Arguments::_meta_index_dir = NULL; |
103 char* Arguments::_meta_index_dir = NULL; |
104 |
|
105 static bool force_client_mode = false; |
|
106 |
104 |
107 // Check if head of 'option' matches 'name', and sets 'tail' remaining part of option string |
105 // Check if head of 'option' matches 'name', and sets 'tail' remaining part of option string |
108 |
106 |
109 static bool match_option(const JavaVMOption *option, const char* name, |
107 static bool match_option(const JavaVMOption *option, const char* name, |
110 const char** tail) { |
108 const char** tail) { |
1343 // that they want sharing explicitly, do not set ergonomics flags. |
1341 // that they want sharing explicitly, do not set ergonomics flags. |
1344 if (DumpSharedSpaces || RequireSharedSpaces) { |
1342 if (DumpSharedSpaces || RequireSharedSpaces) { |
1345 return; |
1343 return; |
1346 } |
1344 } |
1347 |
1345 |
1348 if (os::is_server_class_machine() && !force_client_mode ) { |
1346 if (os::is_server_class_machine()) { |
1349 // If no other collector is requested explicitly, |
1347 // If no other collector is requested explicitly, |
1350 // let the VM select the collector based on |
1348 // let the VM select the collector based on |
1351 // machine class and automatic selection policy. |
1349 // machine class and automatic selection policy. |
1352 if (!UseSerialGC && |
1350 if (!UseSerialGC && |
1353 !UseConcMarkSweepGC && |
1351 !UseConcMarkSweepGC && |
2938 |
2936 |
2939 // Sharing support |
2937 // Sharing support |
2940 // Construct the path to the archive |
2938 // Construct the path to the archive |
2941 char jvm_path[JVM_MAXPATHLEN]; |
2939 char jvm_path[JVM_MAXPATHLEN]; |
2942 os::jvm_path(jvm_path, sizeof(jvm_path)); |
2940 os::jvm_path(jvm_path, sizeof(jvm_path)); |
2943 #ifdef TIERED |
|
2944 if (strstr(jvm_path, "client") != NULL) { |
|
2945 force_client_mode = true; |
|
2946 } |
|
2947 #endif // TIERED |
|
2948 char *end = strrchr(jvm_path, *os::file_separator()); |
2941 char *end = strrchr(jvm_path, *os::file_separator()); |
2949 if (end != NULL) *end = '\0'; |
2942 if (end != NULL) *end = '\0'; |
2950 char *shared_archive_path = NEW_C_HEAP_ARRAY(char, strlen(jvm_path) + |
2943 char *shared_archive_path = NEW_C_HEAP_ARRAY(char, strlen(jvm_path) + |
2951 strlen(os::file_separator()) + 20); |
2944 strlen(os::file_separator()) + 20); |
2952 if (shared_archive_path == NULL) return JNI_ENOMEM; |
2945 if (shared_archive_path == NULL) return JNI_ENOMEM; |