1773 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
1774 }
1775
1776 bool Arguments::executing_unit_tests() {
1777 return _executing_unit_tests;
1778 }
1779
1780 //===========================================================================================================
1781 // Parsing of main arguments
1782
1783 static unsigned int addreads_count = 0;
1784 static unsigned int addexports_count = 0;
1785 static unsigned int addopens_count = 0;
1786 static unsigned int patch_mod_count = 0;
1787 static unsigned int enable_native_access_count = 0;
1788 static bool patch_mod_javabase = false;
1789
1790 // Check the consistency of vm_init_args
1791 bool Arguments::check_vm_args_consistency() {
1792 // This may modify compiler flags. Must be called before CompilerConfig::check_args_consistency()
1793 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
1794 return false;
1795 }
1796
1797 // Method for adding checks for flag consistency.
1798 // The intent is to warn the user of all possible conflicts,
1799 // before returning an error.
1800 // Note: Needs platform-dependent factoring.
1801 bool status = true;
1802
1803 if (TLABRefillWasteFraction == 0) {
1804 jio_fprintf(defaultStream::error_stream(),
1805 "TLABRefillWasteFraction should be a denominator, "
1806 "not %zu\n",
1807 TLABRefillWasteFraction);
1808 status = false;
1809 }
1810
1811 status = CompilerConfig::check_args_consistency(status);
1812 #if INCLUDE_JVMCI
1813 if (status && EnableJVMCI) {
3869 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3870
3871 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3872 if (!EnableVectorReboxing) {
3873 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3874 } else {
3875 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3876 }
3877 }
3878 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3879 }
3880 #endif // COMPILER2_OR_JVMCI
3881
3882 #ifdef COMPILER2
3883 if (!FLAG_IS_DEFAULT(UseLoopPredicate) && !UseLoopPredicate && UseProfiledLoopPredicate) {
3884 warning("Disabling UseProfiledLoopPredicate since UseLoopPredicate is turned off.");
3885 FLAG_SET_ERGO(UseProfiledLoopPredicate, false);
3886 }
3887 #endif // COMPILER2
3888
3889 if (log_is_enabled(Info, perf, class, link)) {
3890 if (!UsePerfData) {
3891 warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
3892 LogConfiguration::disable_tags(false, LOG_TAGS(perf, class, link));
3893 assert(!log_is_enabled(Info, perf, class, link), "sanity");
3894 }
3895 }
3896
3897 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3898 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3899 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3900 }
3901 }
3902 return JNI_OK;
3903 }
3904
3905 jint Arguments::adjust_after_os() {
3906 if (UseNUMA) {
3907 if (UseParallelGC) {
3908 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3909 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3910 }
3911 }
3912 }
3913 return JNI_OK;
3914 }
3915
|
1773 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
1774 }
1775
1776 bool Arguments::executing_unit_tests() {
1777 return _executing_unit_tests;
1778 }
1779
1780 //===========================================================================================================
1781 // Parsing of main arguments
1782
1783 static unsigned int addreads_count = 0;
1784 static unsigned int addexports_count = 0;
1785 static unsigned int addopens_count = 0;
1786 static unsigned int patch_mod_count = 0;
1787 static unsigned int enable_native_access_count = 0;
1788 static bool patch_mod_javabase = false;
1789
1790 // Check the consistency of vm_init_args
1791 bool Arguments::check_vm_args_consistency() {
1792 // This may modify compiler flags. Must be called before CompilerConfig::check_args_consistency()
1793 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line, xshare_auto_cmd_line)) {
1794 return false;
1795 }
1796
1797 // Method for adding checks for flag consistency.
1798 // The intent is to warn the user of all possible conflicts,
1799 // before returning an error.
1800 // Note: Needs platform-dependent factoring.
1801 bool status = true;
1802
1803 if (TLABRefillWasteFraction == 0) {
1804 jio_fprintf(defaultStream::error_stream(),
1805 "TLABRefillWasteFraction should be a denominator, "
1806 "not %zu\n",
1807 TLABRefillWasteFraction);
1808 status = false;
1809 }
1810
1811 status = CompilerConfig::check_args_consistency(status);
1812 #if INCLUDE_JVMCI
1813 if (status && EnableJVMCI) {
3869 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3870
3871 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3872 if (!EnableVectorReboxing) {
3873 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3874 } else {
3875 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3876 }
3877 }
3878 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3879 }
3880 #endif // COMPILER2_OR_JVMCI
3881
3882 #ifdef COMPILER2
3883 if (!FLAG_IS_DEFAULT(UseLoopPredicate) && !UseLoopPredicate && UseProfiledLoopPredicate) {
3884 warning("Disabling UseProfiledLoopPredicate since UseLoopPredicate is turned off.");
3885 FLAG_SET_ERGO(UseProfiledLoopPredicate, false);
3886 }
3887 #endif // COMPILER2
3888
3889 if (log_is_enabled(Info, init)) {
3890 if (FLAG_IS_DEFAULT(ProfileVMLocks)) {
3891 FLAG_SET_DEFAULT(ProfileVMLocks, true);
3892 }
3893 if (UsePerfData && !log_is_enabled(Info, perf, class, link)) {
3894 // automatically enable -Xlog:perf+class+link
3895 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(perf, class, link));
3896 }
3897 // Don't turn on ProfileVMCalls and ProfileRuntimeCalls by default.
3898 } else {
3899 if (!FLAG_IS_DEFAULT(ProfileVMLocks) && ProfileVMLocks) {
3900 warning("Disabling ProfileVMLocks since logging is turned off.");
3901 FLAG_SET_DEFAULT(ProfileVMLocks, false);
3902 }
3903 if (!FLAG_IS_DEFAULT(ProfileVMCalls) && ProfileVMCalls) {
3904 warning("Disabling ProfileVMCalls since logging is turned off.");
3905 FLAG_SET_DEFAULT(ProfileVMCalls, false);
3906 }
3907 if (!FLAG_IS_DEFAULT(ProfileRuntimeCalls) && ProfileRuntimeCalls) {
3908 warning("Disabling ProfileRuntimeCalls since logging is turned off.");
3909 FLAG_SET_DEFAULT(ProfileRuntimeCalls, false);
3910 }
3911 if (log_is_enabled(Info, perf, class, link)) {
3912 warning("Disabling -Xlog:perf+class+link since logging is turned off.");
3913 LogConfiguration::disable_tags(false, LOG_TAGS(perf, class, link));
3914 assert(!log_is_enabled(Info, perf, class, link), "sanity");
3915 }
3916 }
3917 if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
3918 if (ProfileVMLocks || ProfileVMCalls || ProfileRuntimeCalls) {
3919 FLAG_SET_DEFAULT(PerfDataMemorySize, 128*K); // reserve more space for extra perf counters
3920 }
3921 }
3922
3923 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3924 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3925 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3926 }
3927 }
3928 return JNI_OK;
3929 }
3930
3931 jint Arguments::adjust_after_os() {
3932 if (UseNUMA) {
3933 if (UseParallelGC) {
3934 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3935 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3936 }
3937 }
3938 }
3939 return JNI_OK;
3940 }
3941
|