3951 if (ScavengeRootsInCode == 0) {
3952 if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
3953 warning("Forcing ScavengeRootsInCode non-zero");
3954 }
3955 ScavengeRootsInCode = 1;
3956 }
3957
3958 if (!handle_deprecated_print_gc_flags()) {
3959 return JNI_EINVAL;
3960 }
3961
3962 // Set object alignment values.
3963 set_object_alignment();
3964
3965 #if !INCLUDE_CDS
3966 if (DumpSharedSpaces || RequireSharedSpaces) {
3967 jio_fprintf(defaultStream::error_stream(),
3968 "Shared spaces are not supported in this VM\n");
3969 return JNI_ERR;
3970 }
3971 if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
3972 log_is_enabled(Info, cds)) {
3973 warning("Shared spaces are not supported in this VM");
3974 FLAG_SET_DEFAULT(UseSharedSpaces, false);
3975 LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
3976 }
3977 no_shared_spaces("CDS Disabled");
3978 #endif // INCLUDE_CDS
3979
3980 return JNI_OK;
3981 }
3982
3983 jint Arguments::apply_ergo() {
3984 // Set flags based on ergonomics.
3985 jint result = set_ergonomics_flags();
3986 if (result != JNI_OK) return result;
3987
3988 // Set heap size based on available physical memory
3989 set_heap_size();
3990
|
3951 if (ScavengeRootsInCode == 0) {
3952 if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
3953 warning("Forcing ScavengeRootsInCode non-zero");
3954 }
3955 ScavengeRootsInCode = 1;
3956 }
3957
3958 if (!handle_deprecated_print_gc_flags()) {
3959 return JNI_EINVAL;
3960 }
3961
3962 // Set object alignment values.
3963 set_object_alignment();
3964
3965 #if !INCLUDE_CDS
3966 if (DumpSharedSpaces || RequireSharedSpaces) {
3967 jio_fprintf(defaultStream::error_stream(),
3968 "Shared spaces are not supported in this VM\n");
3969 return JNI_ERR;
3970 }
3971 if (DumpLoadedClassList != NULL) {
3972 jio_fprintf(defaultStream::error_stream(),
3973 "DumpLoadedClassList is not supported in this VM\n");
3974 return JNI_ERR;
3975 }
3976 if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
3977 log_is_enabled(Info, cds)) {
3978 warning("Shared spaces are not supported in this VM");
3979 FLAG_SET_DEFAULT(UseSharedSpaces, false);
3980 LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
3981 }
3982 no_shared_spaces("CDS Disabled");
3983 #endif // INCLUDE_CDS
3984
3985 return JNI_OK;
3986 }
3987
3988 jint Arguments::apply_ergo() {
3989 // Set flags based on ergonomics.
3990 jint result = set_ergonomics_flags();
3991 if (result != JNI_OK) return result;
3992
3993 // Set heap size based on available physical memory
3994 set_heap_size();
3995
|