4024 if (DumpLoadedClassList != NULL) {
4025 jio_fprintf(defaultStream::error_stream(),
4026 "DumpLoadedClassList is not supported in this VM\n");
4027 return JNI_ERR;
4028 }
4029 if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
4030 log_is_enabled(Info, cds)) {
4031 warning("Shared spaces are not supported in this VM");
4032 FLAG_SET_DEFAULT(UseSharedSpaces, false);
4033 LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
4034 }
4035 no_shared_spaces("CDS Disabled");
4036 #endif // INCLUDE_CDS
4037
4038 #ifndef TIERED
4039 if (FLAG_IS_CMDLINE(CompilationMode)) {
4040 warning("CompilationMode has no effect in non-tiered VMs");
4041 }
4042 #endif
4043
4044 return JNI_OK;
4045 }
4046
4047 jint Arguments::apply_ergo() {
4048 // Set flags based on ergonomics.
4049 jint result = set_ergonomics_flags();
4050 if (result != JNI_OK) return result;
4051
4052 // Set heap size based on available physical memory
4053 set_heap_size();
4054
4055 GCConfig::arguments()->initialize();
4056
4057 set_shared_spaces_flags();
4058
4059 // Initialize Metaspace flags and alignments
4060 Metaspace::ergo_initialize();
4061
4062 // Set compiler flags after GC is selected and GC specific
4063 // flags (LoopStripMiningIter) are set.
|
4024 if (DumpLoadedClassList != NULL) {
4025 jio_fprintf(defaultStream::error_stream(),
4026 "DumpLoadedClassList is not supported in this VM\n");
4027 return JNI_ERR;
4028 }
4029 if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
4030 log_is_enabled(Info, cds)) {
4031 warning("Shared spaces are not supported in this VM");
4032 FLAG_SET_DEFAULT(UseSharedSpaces, false);
4033 LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
4034 }
4035 no_shared_spaces("CDS Disabled");
4036 #endif // INCLUDE_CDS
4037
4038 #ifndef TIERED
4039 if (FLAG_IS_CMDLINE(CompilationMode)) {
4040 warning("CompilationMode has no effect in non-tiered VMs");
4041 }
4042 #endif
4043
4044 TSAN_RUNTIME_ONLY(
4045 // Currently TSAN is only implemented for interpreter.
4046 set_mode_flags(_int);
4047 // TSAN instrumentation is not implemented for the RewriteBytecodes
4048 // code paths because TSAN slows down the application so much that the
4049 // performance benefits from rewriting bytecodes is negligible.
4050 FLAG_SET_ERGO(RewriteBytecodes, false);
4051 FLAG_SET_ERGO(RewriteFrequentPairs, false);
4052 // Turn off CDS, it interferes with eagerly allocating jmethodIDs.
4053 no_shared_spaces("CDS is not compatible with TSAN");
4054 );
4055
4056 return JNI_OK;
4057 }
4058
4059 jint Arguments::apply_ergo() {
4060 // Set flags based on ergonomics.
4061 jint result = set_ergonomics_flags();
4062 if (result != JNI_OK) return result;
4063
4064 // Set heap size based on available physical memory
4065 set_heap_size();
4066
4067 GCConfig::arguments()->initialize();
4068
4069 set_shared_spaces_flags();
4070
4071 // Initialize Metaspace flags and alignments
4072 Metaspace::ergo_initialize();
4073
4074 // Set compiler flags after GC is selected and GC specific
4075 // flags (LoopStripMiningIter) are set.
|