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"
1772 bool Arguments::check_vm_args_consistency() {
1773 // Method for adding checks for flag consistency.
1774 // The intent is to warn the user of all possible conflicts,
1775 // before returning an error.
1776 // Note: Needs platform-dependent factoring.
1777 bool status = true;
1778
1779 if (TLABRefillWasteFraction == 0) {
1780 jio_fprintf(defaultStream::error_stream(),
1781 "TLABRefillWasteFraction should be a denominator, "
1782 "not " SIZE_FORMAT "\n",
1783 TLABRefillWasteFraction);
1784 status = false;
1785 }
1786
1787 status = CompilerConfig::check_args_consistency(status);
1788 #if INCLUDE_JVMCI
1789 if (status && EnableJVMCI) {
1790 PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
1791 AddProperty, UnwriteableProperty, InternalProperty);
1792 if (ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
1793 if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
1794 return false;
1795 }
1796 }
1797 }
1798 #endif
1799
1800 #if INCLUDE_JFR
1801 if (status && (FlightRecorderOptions || StartFlightRecording)) {
1802 if (!create_numbered_module_property("jdk.module.addmods", "jdk.jfr", addmods_count++)) {
1803 return false;
1804 }
1805 }
1806 #endif
1807
1808 #ifndef SUPPORT_RESERVED_STACK_AREA
1809 if (StackReservedPages != 0) {
1810 FLAG_SET_CMDLINE(StackReservedPages, 0);
1811 warning("Reserved Stack Area not supported on this platform");
1812 }
2499 "-Dcom.sun.management is not supported in this VM.\n");
2500 return JNI_ERR;
2501 #endif
2502 }
2503 // -Xint
2504 } else if (match_option(option, "-Xint")) {
2505 set_mode_flags(_int);
2506 mode_flag_cmd_line = true;
2507 // -Xmixed
2508 } else if (match_option(option, "-Xmixed")) {
2509 set_mode_flags(_mixed);
2510 mode_flag_cmd_line = true;
2511 // -Xcomp
2512 } else if (match_option(option, "-Xcomp")) {
2513 // for testing the compiler; turn off all flags that inhibit compilation
2514 set_mode_flags(_comp);
2515 mode_flag_cmd_line = true;
2516 // -Xshare:dump
2517 } else if (match_option(option, "-Xshare:dump")) {
2518 CDSConfig::enable_dumping_static_archive();
2519 // -Xshare:on
2520 } else if (match_option(option, "-Xshare:on")) {
2521 UseSharedSpaces = true;
2522 RequireSharedSpaces = true;
2523 // -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
2524 } else if (match_option(option, "-Xshare:auto")) {
2525 UseSharedSpaces = true;
2526 RequireSharedSpaces = false;
2527 xshare_auto_cmd_line = true;
2528 // -Xshare:off
2529 } else if (match_option(option, "-Xshare:off")) {
2530 UseSharedSpaces = false;
2531 RequireSharedSpaces = false;
2532 // -Xverify
2533 } else if (match_option(option, "-Xverify", &tail)) {
2534 if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
2535 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
2536 return JNI_EINVAL;
2537 }
2538 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2539 return JNI_EINVAL;
2540 }
2541 } else if (strcmp(tail, ":remote") == 0) {
2542 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2543 return JNI_EINVAL;
2544 }
2545 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2546 return JNI_EINVAL;
2547 }
2548 } else if (strcmp(tail, ":none") == 0) {
2549 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2550 return JNI_EINVAL;
2551 }
2911 if (FLAG_IS_DEFAULT(UseLargePages) &&
2912 MaxHeapSize < LargePageHeapSizeThreshold) {
2913 // No need for large granularity pages w/small heaps.
2914 // Note that large pages are enabled/disabled for both the
2915 // Java heap and the code cache.
2916 FLAG_SET_DEFAULT(UseLargePages, false);
2917 }
2918
2919 UNSUPPORTED_OPTION(ProfileInterpreter);
2920 #endif
2921
2922 // Parse the CompilationMode flag
2923 if (!CompilationModeFlag::initialize()) {
2924 return JNI_ERR;
2925 }
2926
2927 if (!check_vm_args_consistency()) {
2928 return JNI_ERR;
2929 }
2930
2931 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
2932 return JNI_ERR;
2933 }
2934
2935 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2936 UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2937 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2938
2939 return JNI_OK;
2940 }
2941
2942 // Helper class for controlling the lifetime of JavaVMInitArgs
2943 // objects. The contents of the JavaVMInitArgs are guaranteed to be
2944 // deleted on the destruction of the ScopedVMInitArgs object.
2945 class ScopedVMInitArgs : public StackObj {
2946 private:
2947 JavaVMInitArgs _args;
2948 char* _container_name;
2949 bool _is_set;
2950 char* _vm_options_file_arg;
2951
2952 public:
2953 ScopedVMInitArgs(const char *container_name) {
2954 _args.version = JNI_VERSION_1_2;
3656
3657 // Set compiler flags after GC is selected and GC specific
3658 // flags (LoopStripMiningIter) are set.
3659 CompilerConfig::ergo_initialize();
3660
3661 // Set bytecode rewriting flags
3662 set_bytecode_flags();
3663
3664 // Set flags if aggressive optimization flags are enabled
3665 jint code = set_aggressive_opts_flags();
3666 if (code != JNI_OK) {
3667 return code;
3668 }
3669
3670 if (FLAG_IS_DEFAULT(UseSecondarySupersTable)) {
3671 FLAG_SET_DEFAULT(UseSecondarySupersTable, VM_Version::supports_secondary_supers_table());
3672 } else if (UseSecondarySupersTable && !VM_Version::supports_secondary_supers_table()) {
3673 warning("UseSecondarySupersTable is not supported");
3674 FLAG_SET_DEFAULT(UseSecondarySupersTable, false);
3675 }
3676 if (!UseSecondarySupersTable) {
3677 FLAG_SET_DEFAULT(StressSecondarySupers, false);
3678 FLAG_SET_DEFAULT(VerifySecondarySupers, false);
3679 }
3680
3681 #ifdef ZERO
3682 // Clear flags not supported on zero.
3683 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3684 #endif // ZERO
3685
3686 if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
3687 warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
3688 DebugNonSafepoints = true;
3689 }
3690
3691 if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
3692 warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
3693 }
3694
3695 // Treat the odd case where local verification is enabled but remote
3717 warning("Disabling EnableVectorReboxing since EnableVectorSupport is turned off.");
3718 }
3719 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3720
3721 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3722 if (!EnableVectorReboxing) {
3723 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3724 } else {
3725 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3726 }
3727 }
3728 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3729
3730 if (!FLAG_IS_DEFAULT(UseVectorStubs) && UseVectorStubs) {
3731 warning("Disabling UseVectorStubs since EnableVectorSupport is turned off.");
3732 }
3733 FLAG_SET_DEFAULT(UseVectorStubs, false);
3734 }
3735 #endif // COMPILER2_OR_JVMCI
3736
3737 if (log_is_enabled(Info, perf, class, link)) {
3738 if (!UsePerfData) {
3739 warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
3740 LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
3741 }
3742 }
3743
3744 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3745 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3746 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3747 }
3748 }
3749 return JNI_OK;
3750 }
3751
3752 jint Arguments::adjust_after_os() {
3753 if (UseNUMA) {
3754 if (UseParallelGC) {
3755 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3756 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3757 }
3758 }
3759 }
3760 return JNI_OK;
3761 }
3762
|
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"
1773 bool Arguments::check_vm_args_consistency() {
1774 // Method for adding checks for flag consistency.
1775 // The intent is to warn the user of all possible conflicts,
1776 // before returning an error.
1777 // Note: Needs platform-dependent factoring.
1778 bool status = true;
1779
1780 if (TLABRefillWasteFraction == 0) {
1781 jio_fprintf(defaultStream::error_stream(),
1782 "TLABRefillWasteFraction should be a denominator, "
1783 "not " SIZE_FORMAT "\n",
1784 TLABRefillWasteFraction);
1785 status = false;
1786 }
1787
1788 status = CompilerConfig::check_args_consistency(status);
1789 #if INCLUDE_JVMCI
1790 if (status && EnableJVMCI) {
1791 PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
1792 AddProperty, UnwriteableProperty, InternalProperty);
1793 /*
1794 * Ioi - 2023/05/19. There's no need for this with my patch-jdk.sh script, which adds
1795 * jdk.internal.vm.ci as one of the default modules. Using -Djdk.module.addmods will
1796 * cause the full module graph to be disabled and slow down performance.
1797 */
1798 if (!TempDisableAddJVMCIModule && ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
1799 if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
1800 return false;
1801 }
1802 }
1803 }
1804 #endif
1805
1806 #if INCLUDE_JFR
1807 if (status && (FlightRecorderOptions || StartFlightRecording)) {
1808 if (!create_numbered_module_property("jdk.module.addmods", "jdk.jfr", addmods_count++)) {
1809 return false;
1810 }
1811 }
1812 #endif
1813
1814 #ifndef SUPPORT_RESERVED_STACK_AREA
1815 if (StackReservedPages != 0) {
1816 FLAG_SET_CMDLINE(StackReservedPages, 0);
1817 warning("Reserved Stack Area not supported on this platform");
1818 }
2505 "-Dcom.sun.management is not supported in this VM.\n");
2506 return JNI_ERR;
2507 #endif
2508 }
2509 // -Xint
2510 } else if (match_option(option, "-Xint")) {
2511 set_mode_flags(_int);
2512 mode_flag_cmd_line = true;
2513 // -Xmixed
2514 } else if (match_option(option, "-Xmixed")) {
2515 set_mode_flags(_mixed);
2516 mode_flag_cmd_line = true;
2517 // -Xcomp
2518 } else if (match_option(option, "-Xcomp")) {
2519 // for testing the compiler; turn off all flags that inhibit compilation
2520 set_mode_flags(_comp);
2521 mode_flag_cmd_line = true;
2522 // -Xshare:dump
2523 } else if (match_option(option, "-Xshare:dump")) {
2524 CDSConfig::enable_dumping_static_archive();
2525 CDSConfig::set_old_cds_flags_used();
2526 // -Xshare:on
2527 } else if (match_option(option, "-Xshare:on")) {
2528 UseSharedSpaces = true;
2529 RequireSharedSpaces = true;
2530 CDSConfig::set_old_cds_flags_used();
2531 // -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
2532 } else if (match_option(option, "-Xshare:auto")) {
2533 UseSharedSpaces = true;
2534 RequireSharedSpaces = false;
2535 xshare_auto_cmd_line = true;
2536 CDSConfig::set_old_cds_flags_used();
2537 // -Xshare:off
2538 } else if (match_option(option, "-Xshare:off")) {
2539 UseSharedSpaces = false;
2540 RequireSharedSpaces = false;
2541 CDSConfig::set_old_cds_flags_used();
2542 // -Xverify
2543 } else if (match_option(option, "-Xverify", &tail)) {
2544 if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
2545 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
2546 return JNI_EINVAL;
2547 }
2548 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2549 return JNI_EINVAL;
2550 }
2551 } else if (strcmp(tail, ":remote") == 0) {
2552 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2553 return JNI_EINVAL;
2554 }
2555 if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
2556 return JNI_EINVAL;
2557 }
2558 } else if (strcmp(tail, ":none") == 0) {
2559 if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
2560 return JNI_EINVAL;
2561 }
2921 if (FLAG_IS_DEFAULT(UseLargePages) &&
2922 MaxHeapSize < LargePageHeapSizeThreshold) {
2923 // No need for large granularity pages w/small heaps.
2924 // Note that large pages are enabled/disabled for both the
2925 // Java heap and the code cache.
2926 FLAG_SET_DEFAULT(UseLargePages, false);
2927 }
2928
2929 UNSUPPORTED_OPTION(ProfileInterpreter);
2930 #endif
2931
2932 // Parse the CompilationMode flag
2933 if (!CompilationModeFlag::initialize()) {
2934 return JNI_ERR;
2935 }
2936
2937 if (!check_vm_args_consistency()) {
2938 return JNI_ERR;
2939 }
2940
2941 if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line, xshare_auto_cmd_line)) {
2942 return JNI_ERR;
2943 }
2944
2945 if (StoreCachedCode) {
2946 FLAG_SET_ERGO_IF_DEFAULT(CachedCodeMaxSize, 512*M);
2947 }
2948
2949 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2950 UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2951 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2952
2953 return JNI_OK;
2954 }
2955
2956 // Helper class for controlling the lifetime of JavaVMInitArgs
2957 // objects. The contents of the JavaVMInitArgs are guaranteed to be
2958 // deleted on the destruction of the ScopedVMInitArgs object.
2959 class ScopedVMInitArgs : public StackObj {
2960 private:
2961 JavaVMInitArgs _args;
2962 char* _container_name;
2963 bool _is_set;
2964 char* _vm_options_file_arg;
2965
2966 public:
2967 ScopedVMInitArgs(const char *container_name) {
2968 _args.version = JNI_VERSION_1_2;
3670
3671 // Set compiler flags after GC is selected and GC specific
3672 // flags (LoopStripMiningIter) are set.
3673 CompilerConfig::ergo_initialize();
3674
3675 // Set bytecode rewriting flags
3676 set_bytecode_flags();
3677
3678 // Set flags if aggressive optimization flags are enabled
3679 jint code = set_aggressive_opts_flags();
3680 if (code != JNI_OK) {
3681 return code;
3682 }
3683
3684 if (FLAG_IS_DEFAULT(UseSecondarySupersTable)) {
3685 FLAG_SET_DEFAULT(UseSecondarySupersTable, VM_Version::supports_secondary_supers_table());
3686 } else if (UseSecondarySupersTable && !VM_Version::supports_secondary_supers_table()) {
3687 warning("UseSecondarySupersTable is not supported");
3688 FLAG_SET_DEFAULT(UseSecondarySupersTable, false);
3689 }
3690 UseSecondarySupersTable = false; // FIXME: Disabled for Leyden. Neet to fix SCAddressTable::id_for_address()
3691 if (!UseSecondarySupersTable) {
3692 FLAG_SET_DEFAULT(StressSecondarySupers, false);
3693 FLAG_SET_DEFAULT(VerifySecondarySupers, false);
3694 }
3695
3696 #ifdef ZERO
3697 // Clear flags not supported on zero.
3698 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3699 #endif // ZERO
3700
3701 if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
3702 warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output");
3703 DebugNonSafepoints = true;
3704 }
3705
3706 if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
3707 warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
3708 }
3709
3710 // Treat the odd case where local verification is enabled but remote
3732 warning("Disabling EnableVectorReboxing since EnableVectorSupport is turned off.");
3733 }
3734 FLAG_SET_DEFAULT(EnableVectorReboxing, false);
3735
3736 if (!FLAG_IS_DEFAULT(EnableVectorAggressiveReboxing) && EnableVectorAggressiveReboxing) {
3737 if (!EnableVectorReboxing) {
3738 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorReboxing is turned off.");
3739 } else {
3740 warning("Disabling EnableVectorAggressiveReboxing since EnableVectorSupport is turned off.");
3741 }
3742 }
3743 FLAG_SET_DEFAULT(EnableVectorAggressiveReboxing, false);
3744
3745 if (!FLAG_IS_DEFAULT(UseVectorStubs) && UseVectorStubs) {
3746 warning("Disabling UseVectorStubs since EnableVectorSupport is turned off.");
3747 }
3748 FLAG_SET_DEFAULT(UseVectorStubs, false);
3749 }
3750 #endif // COMPILER2_OR_JVMCI
3751
3752 if (log_is_enabled(Info, init)) {
3753 if (FLAG_IS_DEFAULT(ProfileVMLocks)) {
3754 FLAG_SET_DEFAULT(ProfileVMLocks, true);
3755 }
3756 if (UsePerfData && !log_is_enabled(Info, perf, class, link)) {
3757 // automatically enable -Xlog:perf+class+link
3758 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(perf, class, link));
3759 }
3760 // Don't turn on ProfileVMCalls and ProfileRuntimeCalls by default.
3761 } else {
3762 if (!FLAG_IS_DEFAULT(ProfileVMLocks) && ProfileVMLocks) {
3763 warning("Disabling ProfileVMLocks since logging is turned off.");
3764 FLAG_SET_DEFAULT(ProfileVMLocks, false);
3765 }
3766 if (!FLAG_IS_DEFAULT(ProfileVMCalls) && ProfileVMCalls) {
3767 warning("Disabling ProfileVMCalls since logging is turned off.");
3768 FLAG_SET_DEFAULT(ProfileVMCalls, false);
3769 }
3770 if (!FLAG_IS_DEFAULT(ProfileRuntimeCalls) && ProfileRuntimeCalls) {
3771 warning("Disabling ProfileRuntimeCalls since logging is turned off.");
3772 FLAG_SET_DEFAULT(ProfileRuntimeCalls, false);
3773 }
3774 if (log_is_enabled(Info, perf, class, link)) {
3775 warning("Disabling -Xlog:perf+class+link since logging is turned off.");
3776 LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
3777 }
3778 }
3779 if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
3780 if (ProfileVMLocks || ProfileVMCalls || ProfileRuntimeCalls) {
3781 FLAG_SET_DEFAULT(PerfDataMemorySize, 128*K); // reserve more space for extra perf counters
3782 }
3783 }
3784
3785 if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
3786 if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
3787 LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
3788 }
3789 }
3790 return JNI_OK;
3791 }
3792
3793 jint Arguments::adjust_after_os() {
3794 if (UseNUMA) {
3795 if (UseParallelGC) {
3796 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
3797 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
3798 }
3799 }
3800 }
3801 return JNI_OK;
3802 }
3803
|