aoqi@0: /* aoqi@0: * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. aoqi@0: * Copyright 2012, 2013 SAP AG. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: #ifndef CPU_PPC_VM_GLOBALS_PPC_HPP aoqi@0: #define CPU_PPC_VM_GLOBALS_PPC_HPP aoqi@0: aoqi@0: #include "utilities/globalDefinitions.hpp" aoqi@0: #include "utilities/macros.hpp" aoqi@0: aoqi@0: // Sets the default values for platform dependent flags used by the runtime system. aoqi@0: // (see globals.hpp) aoqi@0: aoqi@0: define_pd_global(bool, ConvertSleepToYield, true); aoqi@0: define_pd_global(bool, ShareVtableStubs, false); // Improves performance markedly for mtrt and compress. aoqi@0: define_pd_global(bool, NeedsDeoptSuspend, false); // Only register window machines need this. aoqi@0: aoqi@0: aoqi@0: define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks. aoqi@0: define_pd_global(bool, TrapBasedNullChecks, true); aoqi@0: define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs passed to check cast. aoqi@0: aoqi@0: // Use large code-entry alignment. aoqi@0: define_pd_global(intx, CodeEntryAlignment, 128); aoqi@0: define_pd_global(intx, OptoLoopAlignment, 16); aoqi@0: define_pd_global(intx, InlineFrequencyCount, 100); aoqi@0: define_pd_global(intx, InlineSmallCode, 1500); aoqi@0: aoqi@0: define_pd_global(intx, PreInflateSpin, 10); aoqi@0: aoqi@0: // Flags for template interpreter. aoqi@0: define_pd_global(bool, RewriteBytecodes, true); aoqi@0: define_pd_global(bool, RewriteFrequentPairs, true); aoqi@0: aoqi@0: define_pd_global(bool, UseMembar, false); aoqi@0: zmajo@7854: define_pd_global(bool, PreserveFramePointer, false); zmajo@7854: aoqi@0: // GC Ergo Flags aoqi@0: define_pd_global(uintx, CMSYoungGenPerWorker, 16*M); // Default max size of CMS young gen, per GC worker thread. aoqi@0: aoqi@0: define_pd_global(uintx, TypeProfileLevel, 0); aoqi@0: aoqi@0: // Platform dependent flag handling: flags only defined on this platform. aoqi@0: #define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \ aoqi@0: \ aoqi@0: /* Load poll address from thread. This is used to implement per-thread */ \ aoqi@0: /* safepoints on platforms != IA64. */ \ aoqi@0: product(bool, LoadPollAddressFromThread, false, \ aoqi@0: "Load polling page address from thread object (required for " \ aoqi@0: "per-thread safepoints on platforms != IA64)") \ aoqi@0: \ aoqi@0: product(uintx, PowerArchitecturePPC64, 0, \ aoqi@0: "CPU Version: x for PowerX. Currently recognizes Power5 to " \ aoqi@0: "Power7. Default is 0. CPUs newer than Power7 will be " \ aoqi@0: "recognized as Power7.") \ aoqi@0: \ aoqi@0: /* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \ aoqi@0: /* indirect call by a direct call. */ \ aoqi@0: product(bool, ReoptimizeCallSequences, true, \ aoqi@0: "Reoptimize code-sequences of calls at runtime.") \ aoqi@0: \ aoqi@0: product(bool, UseLoadInstructionsForStackBangingPPC64, false, \ aoqi@0: "Use load instructions for stack banging.") \ aoqi@0: \ aoqi@0: /* special instructions */ \ aoqi@0: \ aoqi@0: product(bool, UseCountLeadingZerosInstructionsPPC64, true, \ aoqi@0: "Use count leading zeros instructions.") \ aoqi@0: \ aoqi@0: product(bool, UseExtendedLoadAndReserveInstructionsPPC64, false, \ aoqi@0: "Use extended versions of load-and-reserve instructions.") \ aoqi@0: \ aoqi@0: product(bool, UseRotateAndMaskInstructionsPPC64, true, \ aoqi@0: "Use rotate and mask instructions.") \ aoqi@0: \ aoqi@0: product(bool, UseStaticBranchPredictionInCompareAndSwapPPC64, true, \ aoqi@0: "Use static branch prediction hints in CAS operations.") \ aoqi@0: product(bool, UseStaticBranchPredictionForUncommonPathsPPC64, false, \ aoqi@0: "Use static branch prediction hints for uncommon paths.") \ aoqi@0: \ aoqi@0: product(bool, UsePower6SchedulerPPC64, false, \ aoqi@0: "Use Power6 Scheduler.") \ aoqi@0: \ aoqi@0: product(bool, InsertEndGroupPPC64, false, \ aoqi@0: "Insert EndGroup instructions to optimize for Power6.") \ aoqi@0: \ aoqi@0: /* Trap based checks. */ \ aoqi@0: /* Trap based checks use the ppc trap instructions to check certain */ \ aoqi@0: /* conditions. This instruction raises a SIGTRAP caught by the */ \ aoqi@0: /* exception handler of the VM. */ \ aoqi@0: product(bool, UseSIGTRAP, true, \ aoqi@0: "Allow trap instructions that make use of SIGTRAP. Use this to " \ aoqi@0: "switch off all optimizations requiring SIGTRAP.") \ aoqi@0: product(bool, TrapBasedICMissChecks, true, \ aoqi@0: "Raise and handle SIGTRAP if inline cache miss detected.") \ aoqi@0: product(bool, TrapBasedNotEntrantChecks, true, \ aoqi@0: "Raise and handle SIGTRAP if calling not entrant or zombie" \ aoqi@0: " method.") \ aoqi@0: product(bool, TraceTraps, false, "Trace all traps the signal handler" \ aoqi@0: "handles.") \ aoqi@0: \ aoqi@0: product(bool, ZapMemory, false, "Write 0x0101... to empty memory." \ aoqi@0: " Use this to ease debugging.") \ aoqi@0: aoqi@0: aoqi@0: #endif // CPU_PPC_VM_GLOBALS_PPC_HPP