2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-02-10 21:32:05 +01:00
|
|
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2010-05-27 19:08:38 -07:00
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#ifndef CPU_X86_VM_GLOBALS_X86_HPP
|
|
|
|
#define CPU_X86_VM_GLOBALS_X86_HPP
|
|
|
|
|
|
|
|
#include "utilities/globalDefinitions.hpp"
|
|
|
|
#include "utilities/macros.hpp"
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Sets the default values for platform dependent flags used by the runtime system.
|
|
|
|
// (see globals.hpp)
|
|
|
|
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(bool, ConvertSleepToYield, true);
|
|
|
|
define_pd_global(bool, ShareVtableStubs, true);
|
|
|
|
define_pd_global(bool, NeedsDeoptSuspend, false); // only register window machines need this
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
|
2013-11-27 16:16:21 -08:00
|
|
|
define_pd_global(bool, TrapBasedNullChecks, false); // Not needed on x86.
|
|
|
|
define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs passed to check cast
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// See 4827828 for this change. There is no globals_core_i486.hpp. I can't
|
|
|
|
// assign a different value for C2 without touching a number of files. Use
|
|
|
|
// #ifdef to minimize the change as it's late in Mantis. -- FIXME.
|
|
|
|
// c1 doesn't have this problem because the fix to 4858033 assures us
|
|
|
|
// the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
|
|
|
|
// the uep and the vep doesn't get real alignment but just slops on by
|
|
|
|
// only assured that the entry instruction meets the 5 byte size requirement.
|
|
|
|
#ifdef COMPILER2
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(intx, CodeEntryAlignment, 32);
|
2007-12-01 00:00:00 +00:00
|
|
|
#else
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(intx, CodeEntryAlignment, 16);
|
2007-12-01 00:00:00 +00:00
|
|
|
#endif // COMPILER2
|
2010-04-07 09:37:47 -07:00
|
|
|
define_pd_global(intx, OptoLoopAlignment, 16);
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(intx, InlineFrequencyCount, 100);
|
|
|
|
define_pd_global(intx, InlineSmallCode, 1000);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-06-18 09:08:35 -07:00
|
|
|
define_pd_global(intx, StackYellowPages, NOT_WINDOWS(2) WINDOWS_ONLY(3));
|
2009-10-28 16:25:51 -04:00
|
|
|
define_pd_global(intx, StackRedPages, 1);
|
2007-12-01 00:00:00 +00:00
|
|
|
#ifdef AMD64
|
|
|
|
// Very large C++ stack frames using solaris-amd64 optimized builds
|
|
|
|
// due to lack of optimization caused by C++ compiler bugs
|
2012-02-13 12:30:47 -05:00
|
|
|
define_pd_global(intx, StackShadowPages, NOT_WIN64(20) WIN64_ONLY(6) DEBUG_ONLY(+2));
|
2007-12-01 00:00:00 +00:00
|
|
|
#else
|
2012-02-14 15:43:56 -08:00
|
|
|
define_pd_global(intx, StackShadowPages, 4 DEBUG_ONLY(+5));
|
2007-12-01 00:00:00 +00:00
|
|
|
#endif // AMD64
|
|
|
|
|
|
|
|
define_pd_global(bool, RewriteBytecodes, true);
|
|
|
|
define_pd_global(bool, RewriteFrequentPairs, true);
|
2010-10-07 15:12:57 -04:00
|
|
|
|
2011-09-25 16:03:29 -07:00
|
|
|
#ifdef _ALLBSD_SOURCE
|
|
|
|
define_pd_global(bool, UseMembar, true);
|
|
|
|
#else
|
2010-10-07 15:12:57 -04:00
|
|
|
define_pd_global(bool, UseMembar, false);
|
2011-09-25 16:03:29 -07:00
|
|
|
#endif
|
2010-11-23 13:22:55 -08:00
|
|
|
|
2011-03-16 10:37:08 -07:00
|
|
|
// GC Ergo Flags
|
2015-03-03 18:01:27 +01:00
|
|
|
define_pd_global(size_t, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread
|
2012-08-27 15:17:17 -07:00
|
|
|
|
2013-10-22 09:51:47 +02:00
|
|
|
define_pd_global(uintx, TypeProfileLevel, 111);
|
2013-10-09 16:32:21 +02:00
|
|
|
|
2015-04-27 10:49:43 +02:00
|
|
|
define_pd_global(bool, PreserveFramePointer, false);
|
|
|
|
|
2015-06-18 14:39:38 -05:00
|
|
|
#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct, range, constraint) \
|
2012-08-27 15:17:17 -07:00
|
|
|
\
|
|
|
|
develop(bool, IEEEPrecision, true, \
|
|
|
|
"Enables IEEE precision (for INTEL only)") \
|
|
|
|
\
|
|
|
|
product(bool, UseStoreImmI16, true, \
|
|
|
|
"Use store immediate 16-bits value instruction on x86") \
|
|
|
|
\
|
|
|
|
product(intx, UseAVX, 99, \
|
|
|
|
"Highest supported AVX instructions set on x86/x64") \
|
|
|
|
\
|
2013-07-02 20:42:12 -04:00
|
|
|
product(bool, UseCLMUL, false, \
|
|
|
|
"Control whether CLMUL instructions can be used on x86/x64") \
|
|
|
|
\
|
2012-08-27 15:17:17 -07:00
|
|
|
diagnostic(bool, UseIncDec, true, \
|
|
|
|
"Use INC, DEC instructions on x86") \
|
|
|
|
\
|
|
|
|
product(bool, UseNewLongLShift, false, \
|
|
|
|
"Use optimized bitwise shift left") \
|
|
|
|
\
|
|
|
|
product(bool, UseAddressNop, false, \
|
|
|
|
"Use '0F 1F [addr]' NOP instructions on x86 cpus") \
|
|
|
|
\
|
|
|
|
product(bool, UseXmmLoadAndClearUpper, true, \
|
|
|
|
"Load low part of XMM register and clear upper part") \
|
|
|
|
\
|
|
|
|
product(bool, UseXmmRegToRegMoveAll, false, \
|
|
|
|
"Copy all XMM register bits when moving value between registers") \
|
|
|
|
\
|
|
|
|
product(bool, UseXmmI2D, false, \
|
|
|
|
"Use SSE2 CVTDQ2PD instruction to convert Integer to Double") \
|
|
|
|
\
|
|
|
|
product(bool, UseXmmI2F, false, \
|
|
|
|
"Use SSE2 CVTDQ2PS instruction to convert Integer to Float") \
|
|
|
|
\
|
|
|
|
product(bool, UseUnalignedLoadStores, false, \
|
|
|
|
"Use SSE2 MOVDQU instruction for Arraycopy") \
|
|
|
|
\
|
2013-01-03 15:09:55 -08:00
|
|
|
product(bool, UseFastStosb, false, \
|
|
|
|
"Use fast-string operation for zeroing: rep stosb") \
|
2014-03-20 17:49:27 -07:00
|
|
|
\
|
|
|
|
/* Use Restricted Transactional Memory for lock eliding */ \
|
|
|
|
product(bool, UseRTMLocking, false, \
|
|
|
|
"Enable RTM lock eliding for inflated locks in compiled code") \
|
|
|
|
\
|
|
|
|
experimental(bool, UseRTMForStackLocks, false, \
|
|
|
|
"Enable RTM lock eliding for stack locks in compiled code") \
|
|
|
|
\
|
|
|
|
product(bool, UseRTMDeopt, false, \
|
|
|
|
"Perform deopt and recompilation based on RTM abort ratio") \
|
|
|
|
\
|
|
|
|
product(uintx, RTMRetryCount, 5, \
|
|
|
|
"Number of RTM retries on lock abort or busy") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMSpinLoopCount, 100, \
|
|
|
|
"Spin count for lock to become free before RTM retry") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMAbortThreshold, 1000, \
|
|
|
|
"Calculate abort ratio after this number of aborts") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMLockingThreshold, 10000, \
|
|
|
|
"Lock count at which to do RTM lock eliding without " \
|
|
|
|
"abort ratio calculation") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMAbortRatio, 50, \
|
|
|
|
"Lock abort ratio at which to stop use RTM lock eliding") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMTotalCountIncrRate, 64, \
|
|
|
|
"Increment total RTM attempted lock count once every n times") \
|
|
|
|
\
|
|
|
|
experimental(intx, RTMLockingCalculationDelay, 0, \
|
|
|
|
"Number of milliseconds to wait before start calculating aborts " \
|
|
|
|
"for RTM locking") \
|
|
|
|
\
|
2014-04-09 11:18:02 -07:00
|
|
|
experimental(bool, UseRTMXendForLockBusy, true, \
|
2014-03-20 17:49:27 -07:00
|
|
|
"Use RTM Xend instead of Xabort when lock busy") \
|
2013-01-03 15:09:55 -08:00
|
|
|
\
|
2012-08-27 15:17:17 -07:00
|
|
|
/* assembler */ \
|
|
|
|
product(bool, Use486InstrsOnly, false, \
|
|
|
|
"Use 80486 Compliant instruction subset") \
|
|
|
|
\
|
|
|
|
product(bool, UseCountLeadingZerosInstruction, false, \
|
|
|
|
"Use count leading zeros instruction") \
|
2014-03-12 11:24:26 -07:00
|
|
|
\
|
|
|
|
product(bool, UseCountTrailingZerosInstruction, false, \
|
|
|
|
"Use count trailing zeros instruction") \
|
|
|
|
\
|
|
|
|
product(bool, UseBMI1Instructions, false, \
|
2014-09-02 12:48:45 -07:00
|
|
|
"Use BMI1 instructions") \
|
|
|
|
\
|
|
|
|
product(bool, UseBMI2Instructions, false, \
|
|
|
|
"Use BMI2 instructions")
|
2010-11-23 13:22:55 -08:00
|
|
|
#endif // CPU_X86_VM_GLOBALS_X86_HPP
|