/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. * 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. * * 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. * */ #ifndef SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP #define SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP #include "runtime/globals_shared.hpp" // // Declare all globals flags used by the Epsilon GC. // #include "utilities/macros.hpp" #if INCLUDE_EPSILONGC #include "runtime/flags/jvmFlag.hpp" PRODUCT_FLAG(size_t, EpsilonPrintHeapSteps, 20, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "Print heap occupancy stats with this number of steps. " "0 turns the printing off."); FLAG_RANGE( EpsilonPrintHeapSteps, 0, max_intx); PRODUCT_FLAG(size_t, EpsilonUpdateCountersStep, 1 * M, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "Update heap occupancy counters after allocating this much " "memory. Higher values would make allocations faster at " "the expense of lower resolution in heap counters."); FLAG_RANGE( EpsilonUpdateCountersStep, 1, max_intx); PRODUCT_FLAG(size_t, EpsilonMaxTLABSize, 4 * M, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "Max TLAB size to use with Epsilon GC. Larger value improves " "performance at the expense of per-thread memory waste. This " "asks TLAB machinery to cap TLAB sizes at this value."); FLAG_RANGE( EpsilonMaxTLABSize, 1, max_intx); PRODUCT_FLAG(bool, EpsilonElasticTLAB, true, JVMFlag::EXPERIMENTAL, "Use elastic policy to manage TLAB sizes. This conserves memory " "for non-actively allocating threads, even when they request " "large TLABs for themselves. Active threads would experience " "smaller TLABs until policy catches up."); PRODUCT_FLAG(bool, EpsilonElasticTLABDecay, true, JVMFlag::EXPERIMENTAL, "Use timed decays to shrik TLAB sizes. This conserves memory " "for the threads that allocate in bursts of different sizes, " "for example the small/rare allocations coming after the initial " "large burst."); PRODUCT_FLAG(double, EpsilonTLABElasticity, 1.1, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "Multiplier to use when deciding on next TLAB size. Larger value " "improves performance at the expense of per-thread memory waste. " "Lower value improves memory footprint, but penalizes actively " "allocating threads."); FLAG_RANGE( EpsilonTLABElasticity, 1.0, DBL_MAX); PRODUCT_FLAG(size_t, EpsilonTLABDecayTime, 1000, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "TLAB sizing policy decays to initial size after thread had not " "allocated for this long. Time is in milliseconds. Lower value " "improves memory footprint, but penalizes actively allocating " "threads."); FLAG_RANGE( EpsilonTLABDecayTime, 1, max_intx); PRODUCT_FLAG(size_t, EpsilonMinHeapExpand, 128 * M, JVMFlag::EXPERIMENTAL | JVMFlag::RANGE, "Min expansion step for heap. Larger value improves performance " "at the potential expense of memory waste."); FLAG_RANGE( EpsilonMinHeapExpand, 1, max_intx); #endif // INCLUDE_EPSILONGC #endif // SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP