annotate src/hotspot/cpu/x86/globals_x86.hpp @ 55984:3a3e4e473622

8222637: Obsolete NeedsDeoptSuspend Reviewed-by: dlong, coleenp, dholmes
author rehn
date Fri, 26 Apr 2019 10:18:47 +0200
parents 9807daeb47c4
children 0a8407a78a2f
rev   line source
duke@1 1 /*
coleenp@54304 2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation.
duke@1 8 *
duke@1 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 13 * accompanied this code).
duke@1 14 *
duke@1 15 * You should have received a copy of the GNU General Public License version
duke@1 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 18 *
trims@5547 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@5547 20 * or visit www.oracle.com if you need additional information or have any
trims@5547 21 * questions.
duke@1 22 *
duke@1 23 */
duke@1 24
coleenp@54304 25 #ifndef CPU_X86_GLOBALS_X86_HPP
coleenp@54304 26 #define CPU_X86_GLOBALS_X86_HPP
stefank@7397 27
stefank@7397 28 #include "utilities/globalDefinitions.hpp"
stefank@7397 29 #include "utilities/macros.hpp"
stefank@7397 30
duke@1 31 // Sets the default values for platform dependent flags used by the runtime system.
duke@1 32 // (see globals.hpp)
duke@1 33
phh@4434 34 define_pd_global(bool, ShareVtableStubs, true);
duke@1 35
phh@4434 36 define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
goetz@22856 37 define_pd_global(bool, TrapBasedNullChecks, false); // Not needed on x86.
goetz@22856 38 define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs passed to check cast
duke@1 39
goetz@42062 40 define_pd_global(uintx, CodeCacheSegmentSize, 64 TIERED_ONLY(+64)); // Tiered compilation has large code-entry alignment.
duke@1 41 // See 4827828 for this change. There is no globals_core_i486.hpp. I can't
duke@1 42 // assign a different value for C2 without touching a number of files. Use
duke@1 43 // #ifdef to minimize the change as it's late in Mantis. -- FIXME.
duke@1 44 // c1 doesn't have this problem because the fix to 4858033 assures us
duke@1 45 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
duke@1 46 // the uep and the vep doesn't get real alignment but just slops on by
duke@1 47 // only assured that the entry instruction meets the 5 byte size requirement.
jcm@47980 48 #if COMPILER2_OR_JVMCI
phh@4434 49 define_pd_global(intx, CodeEntryAlignment, 32);
duke@1 50 #else
phh@4434 51 define_pd_global(intx, CodeEntryAlignment, 16);
jcm@47980 52 #endif // COMPILER2_OR_JVMCI
kvn@5249 53 define_pd_global(intx, OptoLoopAlignment, 16);
phh@4434 54 define_pd_global(intx, InlineFrequencyCount, 100);
phh@4434 55 define_pd_global(intx, InlineSmallCode, 1000);
duke@1 56
gziemski@33222 57 #define DEFAULT_STACK_YELLOW_PAGES (NOT_WINDOWS(2) WINDOWS_ONLY(3))
gziemski@33222 58 #define DEFAULT_STACK_RED_PAGES (1)
fparain@35071 59 #define DEFAULT_STACK_RESERVED_PAGES (NOT_WINDOWS(1) WINDOWS_ONLY(0))
gziemski@33222 60
gziemski@33222 61 #define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES
gziemski@33222 62 #define MIN_STACK_RED_PAGES DEFAULT_STACK_RED_PAGES
fparain@35071 63 #define MIN_STACK_RESERVED_PAGES (0)
gziemski@33222 64
goetz@42906 65 #ifdef _LP64
goetz@42906 66 // Java_java_net_SocketOutputStream_socketWrite0() uses a 64k buffer on the
goetz@42906 67 // stack if compiled for unix and LP64. To pass stack overflow tests we need
goetz@42906 68 // 20 shadow pages.
fparain@40926 69 #define DEFAULT_STACK_SHADOW_PAGES (NOT_WIN64(20) WIN64_ONLY(7) DEBUG_ONLY(+2))
gziemski@33222 70 // For those clients that do not use write socket, we allow
gziemski@33222 71 // the min range value to be below that of the default
fparain@40926 72 #define MIN_STACK_SHADOW_PAGES (NOT_WIN64(10) WIN64_ONLY(7) DEBUG_ONLY(+2))
duke@1 73 #else
gziemski@33222 74 #define DEFAULT_STACK_SHADOW_PAGES (4 DEBUG_ONLY(+5))
gziemski@33222 75 #define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
goetz@42906 76 #endif // _LP64
duke@1 77
gziemski@33222 78 define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
gziemski@33222 79 define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
gziemski@33222 80 define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
fparain@35071 81 define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
gziemski@33222 82
duke@1 83 define_pd_global(bool, RewriteBytecodes, true);
duke@1 84 define_pd_global(bool, RewriteFrequentPairs, true);
bobv@6965 85
ysr@8687 86 // GC Ergo Flags
jwilhelm@29697 87 define_pd_global(size_t, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread
twisti@13521 88
roland@21095 89 define_pd_global(uintx, TypeProfileLevel, 111);
roland@20702 90
thartmann@33628 91 define_pd_global(bool, CompactStrings, true);
thartmann@33628 92
zmajo@30305 93 define_pd_global(bool, PreserveFramePointer, false);
zmajo@30305 94
shade@36554 95 define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
shade@36554 96
mdoerr@49458 97 #if defined(_LP64) || defined(_WINDOWS)
rehn@48069 98 define_pd_global(bool, ThreadLocalHandshakes, true);
rehn@48069 99 #else
mdoerr@49458 100 // get_thread() is slow on linux 32 bit, therefore off by default
rehn@48069 101 define_pd_global(bool, ThreadLocalHandshakes, false);
rehn@48069 102 #endif
rehn@48069 103
gziemski@38273 104 #define ARCH_FLAGS(develop, \
gziemski@38273 105 product, \
gziemski@38273 106 diagnostic, \
gziemski@38273 107 experimental, \
gziemski@38273 108 notproduct, \
gziemski@38273 109 range, \
gziemski@38273 110 constraint, \
gziemski@38273 111 writeable) \
twisti@13521 112 \
twisti@13521 113 develop(bool, IEEEPrecision, true, \
twisti@13521 114 "Enables IEEE precision (for INTEL only)") \
twisti@13521 115 \
twisti@13521 116 product(bool, UseStoreImmI16, true, \
twisti@13521 117 "Use store immediate 16-bits value instruction on x86") \
twisti@13521 118 \
kvn@52657 119 product(intx, UseAVX, 3, \
twisti@13521 120 "Highest supported AVX instructions set on x86/x64") \
zmajo@33163 121 range(0, 99) \
twisti@13521 122 \
drchase@18507 123 product(bool, UseCLMUL, false, \
drchase@18507 124 "Control whether CLMUL instructions can be used on x86/x64") \
drchase@18507 125 \
twisti@13521 126 diagnostic(bool, UseIncDec, true, \
twisti@13521 127 "Use INC, DEC instructions on x86") \
twisti@13521 128 \
twisti@13521 129 product(bool, UseNewLongLShift, false, \
twisti@13521 130 "Use optimized bitwise shift left") \
twisti@13521 131 \
twisti@13521 132 product(bool, UseAddressNop, false, \
twisti@13521 133 "Use '0F 1F [addr]' NOP instructions on x86 cpus") \
twisti@13521 134 \
twisti@13521 135 product(bool, UseXmmLoadAndClearUpper, true, \
twisti@13521 136 "Load low part of XMM register and clear upper part") \
twisti@13521 137 \
twisti@13521 138 product(bool, UseXmmRegToRegMoveAll, false, \
twisti@13521 139 "Copy all XMM register bits when moving value between registers") \
twisti@13521 140 \
twisti@13521 141 product(bool, UseXmmI2D, false, \
twisti@13521 142 "Use SSE2 CVTDQ2PD instruction to convert Integer to Double") \
twisti@13521 143 \
twisti@13521 144 product(bool, UseXmmI2F, false, \
twisti@13521 145 "Use SSE2 CVTDQ2PS instruction to convert Integer to Float") \
twisti@13521 146 \
twisti@13521 147 product(bool, UseUnalignedLoadStores, false, \
twisti@13521 148 "Use SSE2 MOVDQU instruction for Arraycopy") \
twisti@13521 149 \
kvn@51147 150 product(bool, UseXMMForObjInit, false, \
kvn@51147 151 "Use XMM/YMM MOVDQU instruction for Object Initialization") \
kvn@51147 152 \
kvn@15114 153 product(bool, UseFastStosb, false, \
kvn@15114 154 "Use fast-string operation for zeroing: rep stosb") \
kvn@15114 155 \
kvn@23491 156 /* Use Restricted Transactional Memory for lock eliding */ \
kvn@23491 157 product(bool, UseRTMLocking, false, \
kvn@23491 158 "Enable RTM lock eliding for inflated locks in compiled code") \
kvn@23491 159 \
kvn@23491 160 experimental(bool, UseRTMForStackLocks, false, \
kvn@23491 161 "Enable RTM lock eliding for stack locks in compiled code") \
kvn@23491 162 \
kvn@23491 163 product(bool, UseRTMDeopt, false, \
kvn@23491 164 "Perform deopt and recompilation based on RTM abort ratio") \
kvn@23491 165 \
lucy@46494 166 product(int, RTMRetryCount, 5, \
kvn@23491 167 "Number of RTM retries on lock abort or busy") \
lucy@46494 168 range(0, max_jint) \
kvn@23491 169 \
lucy@46494 170 experimental(int, RTMSpinLoopCount, 100, \
kvn@23491 171 "Spin count for lock to become free before RTM retry") \
lucy@46494 172 range(0, max_jint) \
kvn@23491 173 \
lucy@46494 174 experimental(int, RTMAbortThreshold, 1000, \
kvn@23491 175 "Calculate abort ratio after this number of aborts") \
lucy@46494 176 range(0, max_jint) \
kvn@23491 177 \
lucy@46494 178 experimental(int, RTMLockingThreshold, 10000, \
kvn@23491 179 "Lock count at which to do RTM lock eliding without " \
kvn@23491 180 "abort ratio calculation") \
lucy@46494 181 range(0, max_jint) \
kvn@23491 182 \
lucy@46494 183 experimental(int, RTMAbortRatio, 50, \
kvn@23491 184 "Lock abort ratio at which to stop use RTM lock eliding") \
goetz@46698 185 range(0, 100) /* natural range */ \
kvn@23491 186 \
lucy@46494 187 experimental(int, RTMTotalCountIncrRate, 64, \
kvn@23491 188 "Increment total RTM attempted lock count once every n times") \
lucy@46494 189 range(1, max_jint) \
goetz@46698 190 constraint(RTMTotalCountIncrRateConstraintFunc,AfterErgo) \
kvn@23491 191 \
kvn@23491 192 experimental(intx, RTMLockingCalculationDelay, 0, \
kvn@23491 193 "Number of milliseconds to wait before start calculating aborts " \
kvn@23491 194 "for RTM locking") \
kvn@23491 195 \
kvn@23847 196 experimental(bool, UseRTMXendForLockBusy, true, \
kvn@23491 197 "Use RTM Xend instead of Xabort when lock busy") \
kvn@23491 198 \
twisti@13521 199 /* assembler */ \
twisti@13521 200 product(bool, UseCountLeadingZerosInstruction, false, \
twisti@13521 201 "Use count leading zeros instruction") \
iveresov@23220 202 \
iveresov@23220 203 product(bool, UseCountTrailingZerosInstruction, false, \
iveresov@23220 204 "Use count trailing zeros instruction") \
iveresov@23220 205 \
simonis@35581 206 product(bool, UseSSE42Intrinsics, false, \
simonis@35581 207 "SSE4.2 versions of intrinsics") \
simonis@35581 208 \
iveresov@23220 209 product(bool, UseBMI1Instructions, false, \
kvn@26434 210 "Use BMI1 instructions") \
kvn@26434 211 \
kvn@26434 212 product(bool, UseBMI2Instructions, false, \
vdeshpande@35540 213 "Use BMI2 instructions") \
vdeshpande@35540 214 \
vdeshpande@38018 215 diagnostic(bool, UseLibmIntrinsic, true, \
vdeshpande@38018 216 "Use Libm Intrinsics")
coleenp@54304 217 #endif // CPU_X86_GLOBALS_X86_HPP