9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "cds/cds_globals.hpp"
27 #include "cds/cdsConfig.hpp"
28 #include "cds/filemap.hpp"
29 #include "classfile/classLoader.hpp"
30 #include "classfile/javaAssertions.hpp"
31 #include "classfile/moduleEntry.hpp"
32 #include "classfile/stringTable.hpp"
33 #include "classfile/symbolTable.hpp"
34 #include "compiler/compilerDefinitions.hpp"
35 #include "gc/shared/gcArguments.hpp"
36 #include "gc/shared/gcConfig.hpp"
37 #include "gc/shared/genArguments.hpp"
38 #include "gc/shared/stringdedup/stringDedup.hpp"
39 #include "gc/shared/tlab_globals.hpp"
40 #include "jvm.h"
41 #include "logging/log.hpp"
42 #include "logging/logConfiguration.hpp"
43 #include "logging/logStream.hpp"
44 #include "logging/logTag.hpp"
45 #include "memory/allocation.inline.hpp"
46 #include "nmt/nmtCommon.hpp"
47 #include "oops/compressedKlass.hpp"
48 #include "oops/instanceKlass.hpp"
1782 bool Arguments::check_vm_args_consistency() {
1783 // Method for adding checks for flag consistency.
1784 // The intent is to warn the user of all possible conflicts,
1785 // before returning an error.
1786 // Note: Needs platform-dependent factoring.
1787 bool status = true;
1788
1789 if (TLABRefillWasteFraction == 0) {
1790 jio_fprintf(defaultStream::error_stream(),
1791 "TLABRefillWasteFraction should be a denominator, "
1792 "not " SIZE_FORMAT "\n",
1793 TLABRefillWasteFraction);
1794 status = false;
1795 }
1796
1797 status = CompilerConfig::check_args_consistency(status);
1798 #if INCLUDE_JVMCI
1799 if (status && EnableJVMCI) {
1800 PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
1801 AddProperty, UnwriteableProperty, InternalProperty);
1802 if (ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
1803 if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
1804 return false;
1805 }
1806 }
1807 }
1808 #endif
1809
1810 #if INCLUDE_JFR
1811 if (status && (FlightRecorderOptions || StartFlightRecording)) {
1812 if (!create_numbered_module_property("jdk.module.addmods", "jdk.jfr", addmods_count++)) {
1813 return false;
1814 }
1815 }
1816 #endif
1817
1818 #ifndef SUPPORT_RESERVED_STACK_AREA
1819 if (StackReservedPages != 0) {
1820 FLAG_SET_CMDLINE(StackReservedPages, 0);
1821 warning("Reserved Stack Area not supported on this platform");
1822 }
2512 "-Dcom.sun.management is not supported in this VM.\n");
2513 return JNI_ERR;
2514 #endif
2515 }
2516 // -Xint
2517 } else if (match_option(option, "-Xint")) {
2518 set_mode_flags(_int);
2519 mode_flag_cmd_line = true;
2520 // -Xmixed
2521 } else if (match_option(option, "-Xmixed")) {
2522 set_mode_flags(_mixed);
2523 mode_flag_cmd_line = true;
2524 // -Xcomp
2525 } else if (match_option(option, "-Xcomp")) {
2526 // for testing the compiler; turn off all flags that inhibit compilation
2527 set_mode_flags(_comp);
2528 mode_flag_cmd_line = true;
2529 // -Xshare:dump
2530 } else if (match_option(option, "-Xshare:dump")) {
2531 CDSConfig::enable_dumping_static_archive();
2532 // -Xshare:on
2533 } else if (match_option(option, "-Xshare:on")) {
2534 UseSharedSpaces = true;
2535 RequireSharedSpaces = true;
2536 // -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
2537 } else if (match_option(option, "-Xshare:auto")) {
2538 UseSharedSpaces = true;
2539 RequireSharedSpaces = false;
2540 xshare_auto_cmd_line = true;
2541 // -Xshare:off
2542 } else if (match_option(option, "-Xshare:off")) {
2543 UseSharedSpaces = false;
2544 RequireSharedSpaces = false;
2545 // -Xverify
2546 } else if (match_option(option, "-Xverify", &tail)) {
2547 if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
2548 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
2549 return JNI_EINVAL;
2550 }
2551 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2552 return JNI_EINVAL;
2553 }
2554 } else if (strcmp(tail, ":remote") == 0) {
2555 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2556 return JNI_EINVAL;
2557 }
2558 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2559 return JNI_EINVAL;
2560 }
2561 } else if (strcmp(tail, ":none") == 0) {
2562 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2563 return JNI_EINVAL;
2564 }
2924 if (FLAG_IS_DEFAULT(UseLargePages) &&
2925 MaxHeapSize < LargePageHeapSizeThreshold) {
2926 // No need for large granularity pages w/small heaps.
2927 // Note that large pages are enabled/disabled for both the
2928 // Java heap and the code cache.
2929 FLAG_SET_DEFAULT(UseLargePages, false);
2930 }
2931
2932 UNSUPPORTED_OPTION(ProfileInterpreter);
2933 #endif
2934
2935 // Parse the CompilationMode flag
2936 if (!CompilationModeFlag::initialize()) {
2937 return JNI_ERR;
2938 }
2939
2940 if (!check_vm_args_consistency()) {
2941 return JNI_ERR;
2942 }
2943
2944 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
2945 return JNI_ERR;
2946 }
2947
2948 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2949 UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2950 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2951
2952 return JNI_OK;
2953 }
2954
2955 // Helper class for controlling the lifetime of JavaVMInitArgs
2956 // objects. The contents of the JavaVMInitArgs are guaranteed to be
2957 // deleted on the destruction of the ScopedVMInitArgs object.
2958 class ScopedVMInitArgs : public StackObj {
2959 private:
2960 JavaVMInitArgs _args;
2961 char* _container_name;
2962 bool _is_set;
2963 char* _vm_options_file_arg;
2964
2965 public:
2966 ScopedVMInitArgs(const char *container_name) {
2967 _args.version = JNI_VERSION_1_2;
3669
3670 // Set compiler flags after GC is selected and GC specific
3671 // flags (LoopStripMiningIter) are set.
3672 CompilerConfig::ergo_initialize();
3673
3674 // Set bytecode rewriting flags
3675 set_bytecode_flags();
3676
3677 // Set flags if aggressive optimization flags are enabled
3678 jint code = set_aggressive_opts_flags();
3679 if (code != JNI_OK) {
3680 return code;
3681 }
3682
3683 if (FLAG_IS_DEFAULT(UseSecondarySupersTable)) {
3684 FLAG_SET_DEFAULT(UseSecondarySupersTable, VM_Version::supports_secondary_supers_table());
3685 } else if (UseSecondarySupersTable && !VM_Version::supports_secondary_supers_table()) {
3686 warning("UseSecondarySupersTable is not supported");
3687 FLAG_SET_DEFAULT(UseSecondarySupersTable, false);
3688 }
3689 if (!UseSecondarySupersTable) {
3690 FLAG_SET_DEFAULT(StressSecondarySupers, false);
3691 FLAG_SET_DEFAULT(VerifySecondarySupers, false);
3692 }
3693
3694 #ifdef ZERO
3695 // Clear flags not supported on zero.
3696 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3697 #endif // ZERO
3698
3699 if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
3700 warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
3701 DebugNonSafepoints = true;
3702 }
3703
3704 if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
3705 warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
3706 }
3707
3708 // Treat the odd case where local verification is enabled but remote
3730 warning("Disabling EnableVectorReboxing since EnableVectorSupport is turned off.");
3731 }
3732 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3733
3734 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3735 if (!EnableVectorReboxing) {
3736 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3737 } else {
3738 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3739 }
3740 }
3741 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3742
3743 if (!FLAG_IS_DEFAULT(UseVectorStubs) && UseVectorStubs) {
3744 warning("Disabling UseVectorStubs since EnableVectorSupport is turned off.");
3745 }
3746 FLAG_SET_DEFAULT(UseVectorStubs, false);
3747 }
3748 #endif // COMPILER2_OR_JVMCI
3749
3750 if (log_is_enabled(Info, perf, class, link)) {
3751 if (!UsePerfData) {
3752 warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
3753 LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
3754 }
3755 }
3756
3757 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3758 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3759 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3760 }
3761 }
3762 return JNI_OK;
3763 }
3764
3765 jint Arguments::adjust_after_os() {
3766 if (UseNUMA) {
3767 if (UseParallelGC) {
3768 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3769 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3770 }
3771 }
3772 }
3773 return JNI_OK;
3774 }
3775
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "cds/cds_globals.hpp"
27 #include "cds/cdsConfig.hpp"
28 #include "cds/filemap.hpp"
29 #include "cds/heapShared.hpp"
30 #include "classfile/classLoader.hpp"
31 #include "classfile/javaAssertions.hpp"
32 #include "classfile/moduleEntry.hpp"
33 #include "classfile/stringTable.hpp"
34 #include "classfile/symbolTable.hpp"
35 #include "compiler/compilerDefinitions.hpp"
36 #include "gc/shared/gcArguments.hpp"
37 #include "gc/shared/gcConfig.hpp"
38 #include "gc/shared/genArguments.hpp"
39 #include "gc/shared/stringdedup/stringDedup.hpp"
40 #include "gc/shared/tlab_globals.hpp"
41 #include "jvm.h"
42 #include "logging/log.hpp"
43 #include "logging/logConfiguration.hpp"
44 #include "logging/logStream.hpp"
45 #include "logging/logTag.hpp"
46 #include "memory/allocation.inline.hpp"
47 #include "nmt/nmtCommon.hpp"
48 #include "oops/compressedKlass.hpp"
49 #include "oops/instanceKlass.hpp"
1783 bool Arguments::check_vm_args_consistency() {
1784 // Method for adding checks for flag consistency.
1785 // The intent is to warn the user of all possible conflicts,
1786 // before returning an error.
1787 // Note: Needs platform-dependent factoring.
1788 bool status = true;
1789
1790 if (TLABRefillWasteFraction == 0) {
1791 jio_fprintf(defaultStream::error_stream(),
1792 "TLABRefillWasteFraction should be a denominator, "
1793 "not " SIZE_FORMAT "\n",
1794 TLABRefillWasteFraction);
1795 status = false;
1796 }
1797
1798 status = CompilerConfig::check_args_consistency(status);
1799 #if INCLUDE_JVMCI
1800 if (status && EnableJVMCI) {
1801 PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
1802 AddProperty, UnwriteableProperty, InternalProperty);
1803 /*
1804 * Ioi - 2023/05/19. There's no need for this with my patch-jdk.sh script, which adds
1805 * jdk.internal.vm.ci as one of the default modules. Using -Djdk.module.addmods will
1806 * cause the full module graph to be disabled and slow down performance.
1807 */
1808 if (!TempDisableAddJVMCIModule && ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
1809 if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
1810 return false;
1811 }
1812 }
1813 }
1814 #endif
1815
1816 #if INCLUDE_JFR
1817 if (status && (FlightRecorderOptions || StartFlightRecording)) {
1818 if (!create_numbered_module_property("jdk.module.addmods", "jdk.jfr", addmods_count++)) {
1819 return false;
1820 }
1821 }
1822 #endif
1823
1824 #ifndef SUPPORT_RESERVED_STACK_AREA
1825 if (StackReservedPages != 0) {
1826 FLAG_SET_CMDLINE(StackReservedPages, 0);
1827 warning("Reserved Stack Area not supported on this platform");
1828 }
2518 "-Dcom.sun.management is not supported in this VM.\n");
2519 return JNI_ERR;
2520 #endif
2521 }
2522 // -Xint
2523 } else if (match_option(option, "-Xint")) {
2524 set_mode_flags(_int);
2525 mode_flag_cmd_line = true;
2526 // -Xmixed
2527 } else if (match_option(option, "-Xmixed")) {
2528 set_mode_flags(_mixed);
2529 mode_flag_cmd_line = true;
2530 // -Xcomp
2531 } else if (match_option(option, "-Xcomp")) {
2532 // for testing the compiler; turn off all flags that inhibit compilation
2533 set_mode_flags(_comp);
2534 mode_flag_cmd_line = true;
2535 // -Xshare:dump
2536 } else if (match_option(option, "-Xshare:dump")) {
2537 CDSConfig::enable_dumping_static_archive();
2538 CDSConfig::set_old_cds_flags_used();
2539 // -Xshare:on
2540 } else if (match_option(option, "-Xshare:on")) {
2541 UseSharedSpaces = true;
2542 RequireSharedSpaces = true;
2543 CDSConfig::set_old_cds_flags_used();
2544 // -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
2545 } else if (match_option(option, "-Xshare:auto")) {
2546 UseSharedSpaces = true;
2547 RequireSharedSpaces = false;
2548 xshare_auto_cmd_line = true;
2549 CDSConfig::set_old_cds_flags_used();
2550 // -Xshare:off
2551 } else if (match_option(option, "-Xshare:off")) {
2552 UseSharedSpaces = false;
2553 RequireSharedSpaces = false;
2554 CDSConfig::set_old_cds_flags_used();
2555 // -Xverify
2556 } else if (match_option(option, "-Xverify", &tail)) {
2557 if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
2558 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
2559 return JNI_EINVAL;
2560 }
2561 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2562 return JNI_EINVAL;
2563 }
2564 } else if (strcmp(tail, ":remote") == 0) {
2565 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2566 return JNI_EINVAL;
2567 }
2568 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2569 return JNI_EINVAL;
2570 }
2571 } else if (strcmp(tail, ":none") == 0) {
2572 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2573 return JNI_EINVAL;
2574 }
2934 if (FLAG_IS_DEFAULT(UseLargePages) &&
2935 MaxHeapSize < LargePageHeapSizeThreshold) {
2936 // No need for large granularity pages w/small heaps.
2937 // Note that large pages are enabled/disabled for both the
2938 // Java heap and the code cache.
2939 FLAG_SET_DEFAULT(UseLargePages, false);
2940 }
2941
2942 UNSUPPORTED_OPTION(ProfileInterpreter);
2943 #endif
2944
2945 // Parse the CompilationMode flag
2946 if (!CompilationModeFlag::initialize()) {
2947 return JNI_ERR;
2948 }
2949
2950 if (!check_vm_args_consistency()) {
2951 return JNI_ERR;
2952 }
2953
2954 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line, xshare_auto_cmd_line)) {
2955 return JNI_ERR;
2956 }
2957
2958 if (StoreCachedCode) {
2959 FLAG_SET_ERGO_IF_DEFAULT(CachedCodeMaxSize, 512*M);
2960 }
2961
2962 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2963 UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2964 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2965
2966 return JNI_OK;
2967 }
2968
2969 // Helper class for controlling the lifetime of JavaVMInitArgs
2970 // objects. The contents of the JavaVMInitArgs are guaranteed to be
2971 // deleted on the destruction of the ScopedVMInitArgs object.
2972 class ScopedVMInitArgs : public StackObj {
2973 private:
2974 JavaVMInitArgs _args;
2975 char* _container_name;
2976 bool _is_set;
2977 char* _vm_options_file_arg;
2978
2979 public:
2980 ScopedVMInitArgs(const char *container_name) {
2981 _args.version = JNI_VERSION_1_2;
3683
3684 // Set compiler flags after GC is selected and GC specific
3685 // flags (LoopStripMiningIter) are set.
3686 CompilerConfig::ergo_initialize();
3687
3688 // Set bytecode rewriting flags
3689 set_bytecode_flags();
3690
3691 // Set flags if aggressive optimization flags are enabled
3692 jint code = set_aggressive_opts_flags();
3693 if (code != JNI_OK) {
3694 return code;
3695 }
3696
3697 if (FLAG_IS_DEFAULT(UseSecondarySupersTable)) {
3698 FLAG_SET_DEFAULT(UseSecondarySupersTable, VM_Version::supports_secondary_supers_table());
3699 } else if (UseSecondarySupersTable && !VM_Version::supports_secondary_supers_table()) {
3700 warning("UseSecondarySupersTable is not supported");
3701 FLAG_SET_DEFAULT(UseSecondarySupersTable, false);
3702 }
3703 UseSecondarySupersTable = false; // FIXME: Disabled for Leyden. Neet to fix SCAddressTable::id_for_address()
3704 if (!UseSecondarySupersTable) {
3705 FLAG_SET_DEFAULT(StressSecondarySupers, false);
3706 FLAG_SET_DEFAULT(VerifySecondarySupers, false);
3707 }
3708
3709 #ifdef ZERO
3710 // Clear flags not supported on zero.
3711 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3712 #endif // ZERO
3713
3714 if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
3715 warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
3716 DebugNonSafepoints = true;
3717 }
3718
3719 if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
3720 warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
3721 }
3722
3723 // Treat the odd case where local verification is enabled but remote
3745 warning("Disabling EnableVectorReboxing since EnableVectorSupport is turned off.");
3746 }
3747 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3748
3749 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3750 if (!EnableVectorReboxing) {
3751 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3752 } else {
3753 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3754 }
3755 }
3756 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3757
3758 if (!FLAG_IS_DEFAULT(UseVectorStubs) && UseVectorStubs) {
3759 warning("Disabling UseVectorStubs since EnableVectorSupport is turned off.");
3760 }
3761 FLAG_SET_DEFAULT(UseVectorStubs, false);
3762 }
3763 #endif // COMPILER2_OR_JVMCI
3764
3765 if (log_is_enabled(Info, init)) {
3766 if (FLAG_IS_DEFAULT(ProfileVMLocks)) {
3767 FLAG_SET_DEFAULT(ProfileVMLocks, true);
3768 }
3769 if (UsePerfData && !log_is_enabled(Info, perf, class, link)) {
3770 // automatically enable -Xlog:perf+class+link
3771 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(perf, class, link));
3772 }
3773 // Don't turn on ProfileVMCalls and ProfileRuntimeCalls by default.
3774 } else {
3775 if (!FLAG_IS_DEFAULT(ProfileVMLocks) && ProfileVMLocks) {
3776 warning("Disabling ProfileVMLocks since logging is turned off.");
3777 FLAG_SET_DEFAULT(ProfileVMLocks, false);
3778 }
3779 if (!FLAG_IS_DEFAULT(ProfileVMCalls) && ProfileVMCalls) {
3780 warning("Disabling ProfileVMCalls since logging is turned off.");
3781 FLAG_SET_DEFAULT(ProfileVMCalls, false);
3782 }
3783 if (!FLAG_IS_DEFAULT(ProfileRuntimeCalls) && ProfileRuntimeCalls) {
3784 warning("Disabling ProfileRuntimeCalls since logging is turned off.");
3785 FLAG_SET_DEFAULT(ProfileRuntimeCalls, false);
3786 }
3787 if (log_is_enabled(Info, perf, class, link)) {
3788 warning("Disabling -Xlog:perf+class+link since logging is turned off.");
3789 LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
3790 }
3791 }
3792 if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
3793 if (ProfileVMLocks || ProfileVMCalls || ProfileRuntimeCalls) {
3794 FLAG_SET_DEFAULT(PerfDataMemorySize, 128*K); // reserve more space for extra perf counters
3795 }
3796 }
3797
3798 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3799 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3800 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3801 }
3802 }
3803 return JNI_OK;
3804 }
3805
3806 jint Arguments::adjust_after_os() {
3807 if (UseNUMA) {
3808 if (UseParallelGC) {
3809 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3810 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3811 }
3812 }
3813 }
3814 return JNI_OK;
3815 }
3816
|