< prev index next >

src/hotspot/share/gc/epsilon/epsilonArguments.cpp

Print this page

 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 #include "gc/epsilon/epsilonArguments.hpp"
26 #include "gc/epsilon/epsilonHeap.hpp"

27 #include "gc/shared/gcArguments.hpp"
28 #include "gc/shared/tlab_globals.hpp"
29 #include "logging/log.hpp"
30 #include "runtime/globals.hpp"
31 #include "runtime/globals_extension.hpp"
32 
33 size_t EpsilonArguments::conservative_max_heap_alignment() {
34   return UseLargePages ? os::large_page_size() : os::vm_page_size();
35 }
36 
37 void EpsilonArguments::initialize() {
38   GCArguments::initialize();

39 
40   assert(UseEpsilonGC, "Sanity");
41 
42   // Forcefully exit when OOME is detected. Nothing we can do at that point.
43   if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) {
44     FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true);
45   }
46 
47   if (EpsilonMaxTLABSize < MinTLABSize) {
48     log_warning(gc)("EpsilonMaxTLABSize < MinTLABSize, adjusting it to %zu", MinTLABSize);
49     EpsilonMaxTLABSize = MinTLABSize;
50   }
51 
52   if (!EpsilonElasticTLAB && EpsilonElasticTLABDecay) {
53     log_warning(gc)("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
54     FLAG_SET_DEFAULT(EpsilonElasticTLABDecay, false);
55   }
56 
57 #ifdef COMPILER2
58   // Enable loop strip mining: there are still non-GC safepoints, no need to make it worse

 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 #include "gc/epsilon/epsilonArguments.hpp"
26 #include "gc/epsilon/epsilonHeap.hpp"
27 #include "gc/shared/fullGCForwarding.hpp"
28 #include "gc/shared/gcArguments.hpp"
29 #include "gc/shared/tlab_globals.hpp"
30 #include "logging/log.hpp"
31 #include "runtime/globals.hpp"
32 #include "runtime/globals_extension.hpp"
33 
34 size_t EpsilonArguments::conservative_max_heap_alignment() {
35   return UseLargePages ? os::large_page_size() : os::vm_page_size();
36 }
37 
38 void EpsilonArguments::initialize() {
39   GCArguments::initialize();
40   FullGCForwarding::initialize_flags(MaxHeapSize);
41 
42   assert(UseEpsilonGC, "Sanity");
43 
44   // Forcefully exit when OOME is detected. Nothing we can do at that point.
45   if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) {
46     FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true);
47   }
48 
49   if (EpsilonMaxTLABSize < MinTLABSize) {
50     log_warning(gc)("EpsilonMaxTLABSize < MinTLABSize, adjusting it to %zu", MinTLABSize);
51     EpsilonMaxTLABSize = MinTLABSize;
52   }
53 
54   if (!EpsilonElasticTLAB && EpsilonElasticTLABDecay) {
55     log_warning(gc)("Disabling EpsilonElasticTLABDecay because EpsilonElasticTLAB is disabled");
56     FLAG_SET_DEFAULT(EpsilonElasticTLABDecay, false);
57   }
58 
59 #ifdef COMPILER2
60   // Enable loop strip mining: there are still non-GC safepoints, no need to make it worse
< prev index next >