| 1 | /* |
| 2 | * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. |
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 only, as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 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 | #ifndef SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |
| 26 | #define SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |
| 27 | |
| 28 | #include "runtime/globals_shared.hpp" |
| 29 | |
| 30 | // |
| 31 | // Defines all globals flags used by the Epsilon GC. |
| 32 | // |
| 33 | |
| 34 | #define GC_EPSILON_FLAGS(develop, \ |
| 35 | develop_pd, \ |
| 36 | product, \ |
| 37 | product_pd, \ |
| 38 | diagnostic, \ |
| 39 | diagnostic_pd, \ |
| 40 | experimental, \ |
| 41 | notproduct, \ |
| 42 | manageable, \ |
| 43 | product_rw, \ |
| 44 | lp64_product, \ |
| 45 | range, \ |
| 46 | constraint, \ |
| 47 | writeable) \ |
| 48 | \ |
| 49 | experimental(size_t, EpsilonPrintHeapSteps, 20, \ |
| 50 | "Print heap occupancy stats with this number of steps. " \ |
| 51 | "0 turns the printing off.") \ |
| 52 | range(0, max_intx) \ |
| 53 | \ |
| 54 | experimental(size_t, EpsilonUpdateCountersStep, 1 * M, \ |
| 55 | "Update heap occupancy counters after allocating this much " \ |
| 56 | "memory. Higher values would make allocations faster at " \ |
| 57 | "the expense of lower resolution in heap counters.") \ |
| 58 | range(1, max_intx) \ |
| 59 | \ |
| 60 | experimental(size_t, EpsilonMaxTLABSize, 4 * M, \ |
| 61 | "Max TLAB size to use with Epsilon GC. Larger value improves " \ |
| 62 | "performance at the expense of per-thread memory waste. This " \ |
| 63 | "asks TLAB machinery to cap TLAB sizes at this value.") \ |
| 64 | range(1, max_intx) \ |
| 65 | \ |
| 66 | experimental(bool, EpsilonElasticTLAB, true, \ |
| 67 | "Use elastic policy to manage TLAB sizes. This conserves memory " \ |
| 68 | "for non-actively allocating threads, even when they request " \ |
| 69 | "large TLABs for themselves. Active threads would experience " \ |
| 70 | "smaller TLABs until policy catches up.") \ |
| 71 | \ |
| 72 | experimental(bool, EpsilonElasticTLABDecay, true, \ |
| 73 | "Use timed decays to shrik TLAB sizes. This conserves memory " \ |
| 74 | "for the threads that allocate in bursts of different sizes, " \ |
| 75 | "for example the small/rare allocations coming after the initial "\ |
| 76 | "large burst.") \ |
| 77 | \ |
| 78 | experimental(double, EpsilonTLABElasticity, 1.1, \ |
| 79 | "Multiplier to use when deciding on next TLAB size. Larger value "\ |
| 80 | "improves performance at the expense of per-thread memory waste. "\ |
| 81 | "Lower value improves memory footprint, but penalizes actively " \ |
| 82 | "allocating threads.") \ |
| 83 | range(1.0, DBL_MAX) \ |
| 84 | \ |
| 85 | experimental(size_t, EpsilonTLABDecayTime, 1000, \ |
| 86 | "TLAB sizing policy decays to initial size after thread had not " \ |
| 87 | "allocated for this long. Time is in milliseconds. Lower value " \ |
| 88 | "improves memory footprint, but penalizes actively allocating " \ |
| 89 | "threads.") \ |
| 90 | range(1, max_intx) \ |
| 91 | \ |
| 92 | experimental(size_t, EpsilonMinHeapExpand, 128 * M, \ |
| 93 | "Min expansion step for heap. Larger value improves performance " \ |
| 94 | "at the potential expense of memory waste.") \ |
| 95 | range(1, max_intx) |
| 96 | |
| 97 | #endif // SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |
| 98 | |