author | shade |
Fri, 19 Jan 2018 12:24:15 +0100 | |
branch | epsilon-gc-branch |
changeset 56028 | 267a6ce379ba |
parent 56022 | dd005db4ec5c |
child 56350 | 56014b46de69 |
permissions | -rw-r--r-- |
55935 | 1 |
/* |
2 |
* Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. |
|
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 |
#include "precompiled.hpp" |
|
26 |
#include "gc/epsilon/epsilonArguments.hpp" |
|
55939 | 27 |
#include "gc/epsilon/epsilonHeap.hpp" |
55935 | 28 |
#include "gc/epsilon/epsilonCollectorPolicy.hpp" |
29 |
#include "gc/shared/gcArguments.inline.hpp" |
|
30 |
#include "runtime/globals.hpp" |
|
31 |
#include "runtime/globals_extension.hpp" |
|
32 |
#include "runtime/vm_version.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_flags() { |
|
39 |
GCArguments::initialize_flags(); |
|
40 |
||
56028
267a6ce379ba
Use proper flag aliasing machinery. Avoid setting immutable develop flags in release builds.
shade
parents:
56022
diff
changeset
|
41 |
assert(UseEpsilonGC, "Error"); |
55935 | 42 |
|
43 |
// Forcefully exit when OOME is detected. Nothing we can do at that point. |
|
44 |
if (FLAG_IS_DEFAULT(ExitOnOutOfMemoryError)) { |
|
45 |
FLAG_SET_DEFAULT(ExitOnOutOfMemoryError, true); |
|
46 |
} |
|
47 |
||
48 |
#if INCLUDE_ALL_GCS |
|
49 |
if (EpsilonMaxTLABSize < MinTLABSize) { |
|
50 |
warning("EpsilonMaxTLABSize < MinTLABSize, adjusting it to " SIZE_FORMAT, MinTLABSize); |
|
51 |
EpsilonMaxTLABSize = MinTLABSize; |
|
52 |
} |
|
53 |
#endif |
|
54 |
} |
|
55 |
||
56 |
CollectedHeap* EpsilonArguments::create_heap() { |
|
55939 | 57 |
return create_heap_with_policy<EpsilonHeap, EpsilonCollectorPolicy>(); |
55935 | 58 |
} |