author | stefank |
Wed, 22 May 2019 13:05:37 +0200 | |
changeset 54982 | b18c8301b8c2 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
1 |
/* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
4 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
8 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
13 |
* accompanied this code). |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
14 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
18 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
21 |
* questions. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
22 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
23 |
*/ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
24 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51645
diff
changeset
|
25 |
#ifndef SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51645
diff
changeset
|
26 |
#define SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
27 |
|
54982 | 28 |
#include "runtime/globals_shared.hpp" |
29 |
||
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
30 |
// |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
31 |
// Defines all globals flags used by the Epsilon GC. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
32 |
// |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
33 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
34 |
#define GC_EPSILON_FLAGS(develop, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
35 |
develop_pd, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
36 |
product, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
37 |
product_pd, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
38 |
diagnostic, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
39 |
diagnostic_pd, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
40 |
experimental, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
41 |
notproduct, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
42 |
manageable, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
43 |
product_rw, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
44 |
lp64_product, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
45 |
range, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
46 |
constraint, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
47 |
writeable) \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
48 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
49 |
experimental(size_t, EpsilonPrintHeapSteps, 20, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
50 |
"Print heap occupancy stats with this number of steps. " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
51 |
"0 turns the printing off.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
52 |
range(0, max_intx) \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
53 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
54 |
experimental(size_t, EpsilonUpdateCountersStep, 1 * M, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
55 |
"Update heap occupancy counters after allocating this much " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
56 |
"memory. Higher values would make allocations faster at " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
57 |
"the expense of lower resolution in heap counters.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
58 |
range(1, max_intx) \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
59 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
60 |
experimental(size_t, EpsilonMaxTLABSize, 4 * M, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
61 |
"Max TLAB size to use with Epsilon GC. Larger value improves " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
62 |
"performance at the expense of per-thread memory waste. This " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
63 |
"asks TLAB machinery to cap TLAB sizes at this value.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
64 |
range(1, max_intx) \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
65 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
66 |
experimental(bool, EpsilonElasticTLAB, true, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
67 |
"Use elastic policy to manage TLAB sizes. This conserves memory " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
68 |
"for non-actively allocating threads, even when they request " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
69 |
"large TLABs for themselves. Active threads would experience " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
70 |
"smaller TLABs until policy catches up.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
71 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
72 |
experimental(bool, EpsilonElasticTLABDecay, true, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
73 |
"Use timed decays to shrik TLAB sizes. This conserves memory " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
74 |
"for the threads that allocate in bursts of different sizes, " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
75 |
"for example the small/rare allocations coming after the initial "\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
76 |
"large burst.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
77 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
78 |
experimental(double, EpsilonTLABElasticity, 1.1, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
79 |
"Multiplier to use when deciding on next TLAB size. Larger value "\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
80 |
"improves performance at the expense of per-thread memory waste. "\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
81 |
"Lower value improves memory footprint, but penalizes actively " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
82 |
"allocating threads.") \ |
51645
c5f700de5450
8209942: [epsilon] range function for EpsilonTLABElasticity causes compiler warning
mbaesken
parents:
50523
diff
changeset
|
83 |
range(1.0, DBL_MAX) \ |
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
84 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
85 |
experimental(size_t, EpsilonTLABDecayTime, 1000, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
86 |
"TLAB sizing policy decays to initial size after thread had not " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
87 |
"allocated for this long. Time is in milliseconds. Lower value " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
88 |
"improves memory footprint, but penalizes actively allocating " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
89 |
"threads.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
90 |
range(1, max_intx) \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
91 |
\ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
92 |
experimental(size_t, EpsilonMinHeapExpand, 128 * M, \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
93 |
"Min expansion step for heap. Larger value improves performance " \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
94 |
"at the potential expense of memory waste.") \ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
95 |
range(1, max_intx) |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
96 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51645
diff
changeset
|
97 |
#endif // SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP |