author | stuefe |
Mon, 21 Oct 2019 18:15:53 +0200 | |
branch | stuefe-new-metaspace-branch |
changeset 58717 | 5e9e519e5dc9 |
parent 58716 | 960e372a6065 |
permissions | -rw-r--r-- |
50193 | 1 |
/* |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
2 |
* Copyright (c) 2019, SAP SE. All rights reserved. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
3 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
50193 | 4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
* |
|
6 |
* This code is free software; you can redistribute it and/or modify it |
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
|
8 |
* published by the Free Software Foundation. |
|
9 |
* |
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
* accompanied this code). |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License version |
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
* |
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
21 |
* or visit www.oracle.com if you need additional information or have any |
|
22 |
* questions. |
|
23 |
* |
|
24 |
*/ |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
25 |
#include <memory/metaspace/settings.hpp> |
50193 | 26 |
#include "precompiled.hpp" |
27 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
28 |
|
50193 | 29 |
#include "logging/log.hpp" |
30 |
#include "logging/logStream.hpp" |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
31 |
#include "memory/metaspace/chunkAllocSequence.hpp" |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
32 |
#include "memory/metaspace/chunkLevel.hpp" |
50193 | 33 |
#include "memory/metaspace/chunkManager.hpp" |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
34 |
#include "memory/metaspace/internStat.hpp" |
50193 | 35 |
#include "memory/metaspace/metachunk.hpp" |
58683 | 36 |
#include "memory/metaspace/metaDebug.hpp" |
50193 | 37 |
#include "memory/metaspace/metaspaceCommon.hpp" |
38 |
#include "memory/metaspace/metaspaceStatistics.hpp" |
|
39 |
#include "memory/metaspace/virtualSpaceNode.hpp" |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
40 |
#include "memory/metaspace/virtualSpaceList.hpp" |
50193 | 41 |
#include "runtime/mutexLocker.hpp" |
42 |
#include "utilities/debug.hpp" |
|
43 |
#include "utilities/globalDefinitions.hpp" |
|
44 |
||
45 |
namespace metaspace { |
|
46 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
47 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
48 |
// Return a single chunk to the freelist and adjust accounting. No merge is attempted. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
49 |
void ChunkManager::return_chunk_simple(Metachunk* c) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
50 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
51 |
assert_lock_strong(MetaspaceExpand_lock); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
52 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
53 |
DEBUG_ONLY(c->verify(false)); |
50380
bec342339138
8204195: Clean up macroAssembler.inline.hpp and other inline.hpp files included in .hpp files
coleenp
parents:
50193
diff
changeset
|
54 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
55 |
const chklvl_t lvl = c->level(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
56 |
_chunks.add(c); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
57 |
c->reset_used_words(); |
50193 | 58 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
59 |
// Tracing |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
60 |
log_debug(metaspace)("ChunkManager %s: returned chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
61 |
_name, METACHUNK_FORMAT_ARGS(c)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
62 |
|
50193 | 63 |
} |
64 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
65 |
// Take a single chunk from the given freelist and adjust counters. Returns NULL |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
66 |
// if there is no fitting chunk for this level. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
67 |
Metachunk* ChunkManager::remove_first_chunk_at_level(chklvl_t l) { |
50193 | 68 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
69 |
assert_lock_strong(MetaspaceExpand_lock); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
70 |
DEBUG_ONLY(chklvl::check_valid_level(l);) |
50193 | 71 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
72 |
Metachunk* c = _chunks.remove_first(l); |
50193 | 73 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
74 |
// Tracing |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
75 |
if (c != NULL) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
76 |
log_debug(metaspace)("ChunkManager %s: removed chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
77 |
_name, METACHUNK_FORMAT_ARGS(c)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
78 |
} else { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
79 |
log_trace(metaspace)("ChunkManager %s: no chunk found for level " CHKLVL_FORMAT, |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
80 |
_name, l); |
50193 | 81 |
} |
82 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
83 |
return c; |
50193 | 84 |
} |
85 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
86 |
// Creates a chunk manager with a given name (which is for debug purposes only) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
87 |
// and an associated space list which will be used to request new chunks from |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
88 |
// (see get_chunk()) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
89 |
ChunkManager::ChunkManager(const char* name, VirtualSpaceList* space_list) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
90 |
: _vslist(space_list), |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
91 |
_name(name), |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
92 |
_chunks() |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
93 |
{ |
50193 | 94 |
} |
95 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
96 |
// Given a chunk we are about to handout to the caller, make sure it is committed |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
97 |
// according to constants::committed_words_on_fresh_chunks |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
98 |
bool ChunkManager::commit_chunk_before_handout(Metachunk* c) { |
50193 | 99 |
assert_lock_strong(MetaspaceExpand_lock); |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
100 |
const size_t must_be_committed = MIN2(c->word_size(), Settings::committed_words_on_fresh_chunks()); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
101 |
return c->ensure_committed_locked(must_be_committed); |
50193 | 102 |
} |
103 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
104 |
// Given a chunk which must be outside of a freelist and must be free, split it to |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
105 |
// meet a target level and return it. Splinters are added to the freelist. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
106 |
Metachunk* ChunkManager::split_chunk_and_add_splinters(Metachunk* c, chklvl_t target_level) { |
50193 | 107 |
|
53970 | 108 |
assert_lock_strong(MetaspaceExpand_lock); |
50193 | 109 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
110 |
assert(c->is_free() && c->level() < target_level, "Invalid chunk for splitting"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
111 |
DEBUG_ONLY(chklvl::check_valid_level(target_level);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
112 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
113 |
DEBUG_ONLY(c->verify(true);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
114 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
115 |
// Chunk must be outside of our freelists |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
116 |
assert(_chunks.contains(c) == false, "Chunk is in freelist."); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
117 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
118 |
log_debug(metaspace)("ChunkManager %s: will split chunk " METACHUNK_FORMAT " to " CHKLVL_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
119 |
_name, METACHUNK_FORMAT_ARGS(c), target_level); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
120 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
121 |
const chklvl_t orig_level = c->level(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
122 |
c = c->vsnode()->split(target_level, c, &_chunks); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
123 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
124 |
// Splitting should never fail. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
125 |
assert(c != NULL, "Split failed"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
126 |
assert(c->level() == target_level, "Sanity"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
127 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
128 |
DEBUG_ONLY(c->verify(false)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
129 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
130 |
DEBUG_ONLY(verify_locked(true);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
131 |
|
58683 | 132 |
SOMETIMES(c->vsnode()->verify(true);) |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
133 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
134 |
return c; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
135 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
136 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
137 |
// Get a chunk and be smart about it. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
138 |
// - 1) Attempt to find a free chunk of exactly the pref_level level |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
139 |
// - 2) Failing that, attempt to find a chunk smaller or equal the max level. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
140 |
// - 3) Failing that, attempt to find a free chunk of larger size and split it. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
141 |
// - 4) Failing that, attempt to allocate a new chunk from the connected virtual space. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
142 |
// - Failing that, give up and return NULL. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
143 |
// Note: this is not guaranteed to return a *committed* chunk. The chunk manager will |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
144 |
// attempt to commit the returned chunk according to constants::committed_words_on_fresh_chunks; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
145 |
// but this may fail if we hit a commit limit. In that case, a partly uncommit chunk |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
146 |
// will be returned, and the commit is attempted again when we allocate from the chunk's |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
147 |
// uncommitted area. See also Metachunk::allocate. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
148 |
Metachunk* ChunkManager::get_chunk(chklvl_t max_level, chklvl_t pref_level) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
149 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
150 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
151 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
152 |
DEBUG_ONLY(verify_locked(false);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
153 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
154 |
DEBUG_ONLY(chklvl::check_valid_level(max_level);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
155 |
DEBUG_ONLY(chklvl::check_valid_level(pref_level);) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
156 |
assert(max_level >= pref_level, "invalid level."); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
157 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
158 |
Metachunk* c = NULL; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
159 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
160 |
// Tracing |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
161 |
log_debug(metaspace)("ChunkManager %s: get chunk: max " CHKLVL_FORMAT " (" SIZE_FORMAT ")," |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
162 |
"preferred " CHKLVL_FORMAT " (" SIZE_FORMAT ").", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
163 |
_name, max_level, chklvl::word_size_for_level(max_level), |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
164 |
pref_level, chklvl::word_size_for_level(pref_level)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
165 |
|
58717 | 166 |
// When handing a new chunk to the caller, we must balance the need to not let free space go to waste |
167 |
// with the need to keep fragmentation low. |
|
168 |
// Every request comes with a preferred chunk size and the minimum chunk size, which is the bare minimum |
|
169 |
// needed to house the metadata allocation which triggered this chunk allocation. |
|
170 |
// |
|
171 |
// Ideally, we have a free chunk of the preferred size just laying around and hand that one out. |
|
172 |
// Realistically, we are often faced with the choice of either taking a larger chunk and split it |
|
173 |
// or taking a smaller chunk than the preferred size. Both has pros and cons: splitting a larger chunk |
|
174 |
// reduces the number of large chunks available for large allocations, and, increases fragmentation. |
|
175 |
// Using a smaller chunk may also increase fragmentation (beside being inefficient at some point) if |
|
176 |
// e.g. a normal class loader - which lives normally off 64K chunks - eats from the bowl of small chunk |
|
177 |
// loaders, which prefer 4K or 1K chunks. |
|
178 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
179 |
// 1) Attempt to find a free chunk of exactly the pref_level level |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
180 |
c = remove_first_chunk_at_level(pref_level); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
181 |
|
58717 | 182 |
// 2) Failing that, we are also willing to accept a smaller chunk, but only up to a limit |
183 |
// (for now, half the preferred size)... |
|
58716
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
184 |
if (c == NULL && pref_level < max_level) { |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
185 |
c = remove_first_chunk_at_level(pref_level + 1); |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
186 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
187 |
|
58717 | 188 |
// 3) Failing that, attempt to find a free chunk of larger size and split it to the preferred size... |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
189 |
if (c == NULL) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
190 |
for (chklvl_t lvl = pref_level - 1; lvl >= chklvl::ROOT_CHUNK_LEVEL; lvl --) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
191 |
c = remove_first_chunk_at_level(lvl); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
192 |
if (c != NULL) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
193 |
// Split chunk; add splinters to freelist |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
194 |
c = split_chunk_and_add_splinters(c, pref_level); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
195 |
break; |
50193 | 196 |
} |
197 |
} |
|
198 |
} |
|
53970 | 199 |
|
58717 | 200 |
// 4) Failing that, before we give up and get a new root chunk, lets really scrape the barrel. Any |
201 |
// smaller chunk is acceptable now... |
|
58716
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
202 |
if (c == NULL) { |
58717 | 203 |
for (chklvl_t lvl = pref_level + 2; lvl <= max_level; lvl ++) { |
58716
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
204 |
c = remove_first_chunk_at_level(lvl); |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
205 |
if (c != NULL) { |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
206 |
break; |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
207 |
} |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
208 |
} |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
209 |
} |
960e372a6065
Fix error in chunk allocation strategy which caused small chunks to dominate
stuefe
parents:
58683
diff
changeset
|
210 |
|
58717 | 211 |
// 5) Failing all that, allocate a new root chunk from the connected virtual space. |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
212 |
if (c == NULL) { |
53970 | 213 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
214 |
// Tracing |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
215 |
log_debug(metaspace)("ChunkManager %s: need new root chunk.", _name); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
216 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
217 |
c = _vslist->allocate_root_chunk(); |
50193 | 218 |
|
58085
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
219 |
// This may have failed if the virtual space list is exhausted but it cannot be expanded |
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
220 |
// by a new node (class space). |
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
221 |
if (c == NULL) { |
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
222 |
return NULL; |
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
223 |
} |
a5f523f2ff91
Fix jtreg/vmTestbase/metaspace/shrink_grow/CompressedClassSpaceSize
stuefe
parents:
58063
diff
changeset
|
224 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
225 |
assert(c->level() == chklvl::LOWEST_CHUNK_LEVEL, "Not a root chunk?"); |
50193 | 226 |
|
58717 | 227 |
// Split this root chunk to the desired chunk size. Splinters are added to freelist. |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
228 |
if (pref_level > c->level()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
229 |
c = split_chunk_and_add_splinters(c, pref_level); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
230 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
231 |
} |
50193 | 232 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
233 |
// Note that we should at this point have a chunk; should always work. If we hit |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
234 |
// a commit limit in the meantime, the chunk may still be uncommitted, but the chunk |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
235 |
// itself should exist now. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
236 |
assert(c != NULL, "Unexpected"); |
50193 | 237 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
238 |
// Before returning the chunk, attempt to commit it according to the handout rules. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
239 |
// If that fails, we ignore the error and return the uncommitted chunk. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
240 |
if (commit_chunk_before_handout(c) == false) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
241 |
log_info(gc, metaspace)("Failed to commit chunk prior to handout."); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
242 |
} |
50193 | 243 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
244 |
// Any chunk returned from ChunkManager shall be marked as in use. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
245 |
c->set_in_use(); |
50193 | 246 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
247 |
DEBUG_ONLY(verify_locked(false);) |
58683 | 248 |
SOMETIMES(c->vsnode()->verify(true);) |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
249 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
250 |
log_debug(metaspace)("ChunkManager %s: handing out chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
251 |
_name, METACHUNK_FORMAT_ARGS(c)); |
50193 | 252 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
253 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
254 |
DEBUG_ONLY(InternalStats::inc_num_chunks_taken_from_freelist();) |
50193 | 255 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
256 |
return c; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
257 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
258 |
} // ChunkManager::get_chunk |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
259 |
|
50193 | 260 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
261 |
// Return a single chunk to the ChunkManager and adjust accounting. May merge chunk |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
262 |
// with neighbors. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
263 |
// As a side effect this removes the chunk from whatever list it has been in previously. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
264 |
// Happens after a Classloader was unloaded and releases its metaspace chunks. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
265 |
// !! Note: this may invalidate the chunk. Do not access the chunk after |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
266 |
// this function returns !! |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
267 |
void ChunkManager::return_chunk(Metachunk* c) { |
50193 | 268 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
269 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
50193 | 270 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
271 |
log_debug(metaspace)("ChunkManager %s: returning chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
272 |
_name, METACHUNK_FORMAT_ARGS(c)); |
50193 | 273 |
|
58683 | 274 |
DEBUG_ONLY(c->verify(true);) |
50193 | 275 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
276 |
assert(!_chunks.contains(c), "A chunk to be added to the freelist must not be in the freelist already."); |
50193 | 277 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
278 |
assert(c->is_in_use(), "Unexpected chunk state"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
279 |
assert(!c->in_list(), "Remove from list first"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
280 |
c->set_free(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
281 |
c->reset_used_words(); |
50193 | 282 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
283 |
const chklvl_t orig_lvl = c->level(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
284 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
285 |
Metachunk* merged = NULL; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
286 |
if (!c->is_root_chunk()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
287 |
// Only attempt merging if we are not of the lowest level already. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
288 |
merged = c->vsnode()->merge(c, &_chunks); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
289 |
} |
50193 | 290 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
291 |
if (merged != NULL) { |
50193 | 292 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
293 |
DEBUG_ONLY(merged->verify(false)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
294 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
295 |
// We did merge our chunk into a different chunk. |
50193 | 296 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
297 |
// We did merge chunks and now have a bigger chunk. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
298 |
assert(merged->level() < orig_lvl, "Sanity"); |
50193 | 299 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
300 |
log_trace(metaspace)("ChunkManager %s: merged into chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
301 |
_name, METACHUNK_FORMAT_ARGS(merged)); |
50193 | 302 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
303 |
c = merged; |
50193 | 304 |
|
305 |
} |
|
306 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
307 |
if (Settings::uncommit_on_return() && |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
308 |
Settings::uncommit_on_return_min_word_size() <= c->word_size()) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
309 |
{ |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
310 |
log_trace(metaspace)("ChunkManager %s: uncommitting free chunk " METACHUNK_FORMAT ".", |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
311 |
_name, METACHUNK_FORMAT_ARGS(c)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
312 |
c->uncommit_locked(); |
50193 | 313 |
} |
314 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
315 |
return_chunk_simple(c); |
50193 | 316 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
317 |
DEBUG_ONLY(verify_locked(false);) |
58683 | 318 |
SOMETIMES(c->vsnode()->verify(true);) |
50193 | 319 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
320 |
DEBUG_ONLY(InternalStats::inc_num_chunks_returned_to_freelist();) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
321 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
322 |
} |
53970 | 323 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
324 |
// Given a chunk c, which must be "in use" and must not be a root chunk, attempt to |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
325 |
// enlarge it in place by claiming its trailing buddy. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
326 |
// |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
327 |
// This will only work if c is the leader of the buddy pair and the trailing buddy is free. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
328 |
// |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
329 |
// If successful, the follower chunk will be removed from the freelists, the leader chunk c will |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
330 |
// double in size (level decreased by one). |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
331 |
// |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
332 |
// On success, true is returned, false otherwise. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
333 |
bool ChunkManager::attempt_enlarge_chunk(Metachunk* c) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
334 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
335 |
return c->vsnode()->attempt_enlarge_chunk(c, &_chunks); |
50193 | 336 |
} |
337 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
338 |
static void print_word_size_delta(outputStream* st, size_t word_size_1, size_t word_size_2) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
339 |
if (word_size_1 == word_size_2) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
340 |
print_scaled_words(st, word_size_1); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
341 |
st->print (" (no change)"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
342 |
} else { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
343 |
print_scaled_words(st, word_size_1); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
344 |
st->print("->"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
345 |
print_scaled_words(st, word_size_2); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
346 |
st->print(" ("); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
347 |
if (word_size_2 <= word_size_1) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
348 |
st->print("-"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
349 |
print_scaled_words(st, word_size_1 - word_size_2); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
350 |
} else { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
351 |
st->print("+"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
352 |
print_scaled_words(st, word_size_2 - word_size_1); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
353 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
354 |
st->print(")"); |
50193 | 355 |
} |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
356 |
} |
50193 | 357 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
358 |
// Attempt to reclaim free areas in metaspace wholesale: |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
359 |
// - first, attempt to purge nodes of the backing virtual space. This can only be successful |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
360 |
// if whole nodes are only containing free chunks, so it highly depends on fragmentation. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
361 |
// - then, it will uncommit areas of free chunks according to the rules laid down in |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
362 |
// settings (see settings.hpp). |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
363 |
void ChunkManager::wholesale_reclaim() { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
364 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
365 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
366 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
367 |
log_info(metaspace)("ChunkManager \"%s\": reclaiming memory...", _name); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
368 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
369 |
const size_t reserved_before = _vslist->reserved_words(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
370 |
const size_t committed_before = _vslist->committed_words(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
371 |
int num_nodes_purged = 0; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
372 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
373 |
if (Settings::delete_nodes_on_purge()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
374 |
num_nodes_purged = _vslist->purge(&_chunks); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
375 |
DEBUG_ONLY(InternalStats::inc_num_purges();) |
50193 | 376 |
} |
377 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
378 |
if (Settings::uncommit_on_purge()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
379 |
const chklvl_t max_level = |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
380 |
chklvl::level_fitting_word_size(Settings::uncommit_on_purge_min_word_size()); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
381 |
for (chklvl_t l = chklvl::LOWEST_CHUNK_LEVEL; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
382 |
l <= max_level; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
383 |
l ++) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
384 |
{ |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
385 |
for (Metachunk* c = _chunks.first_at_level(l); c != NULL; c = c->next()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
386 |
c->uncommit_locked(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
387 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
388 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
389 |
DEBUG_ONLY(InternalStats::inc_num_wholesale_uncommits();) |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
390 |
} |
53970 | 391 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
392 |
const size_t reserved_after = _vslist->reserved_words(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
393 |
const size_t committed_after = _vslist->committed_words(); |
53970 | 394 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
395 |
// Print a nice report. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
396 |
if (reserved_after == reserved_before && committed_after == committed_before) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
397 |
log_info(metaspace)("ChunkManager %s: ... nothing reclaimed.", _name); |
50193 | 398 |
} else { |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
399 |
LogTarget(Info, metaspace) lt; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
400 |
if (lt.is_enabled()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
401 |
LogStream ls(lt); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
402 |
ls.print_cr("ChunkManager %s: finished reclaiming memory: ", _name); |
50193 | 403 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
404 |
ls.print("reserved: "); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
405 |
print_word_size_delta(&ls, reserved_before, reserved_after); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
406 |
ls.cr(); |
50193 | 407 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
408 |
ls.print("committed: "); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
409 |
print_word_size_delta(&ls, committed_before, committed_after); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
410 |
ls.cr(); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
411 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
412 |
ls.print_cr("full nodes purged: %d", num_nodes_purged); |
50193 | 413 |
} |
414 |
} |
|
415 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
416 |
DEBUG_ONLY(_vslist->verify_locked(true)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
417 |
DEBUG_ONLY(verify_locked(true)); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
418 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
419 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
420 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
421 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
422 |
ChunkManager* ChunkManager::_chunkmanager_class = NULL; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
423 |
ChunkManager* ChunkManager::_chunkmanager_nonclass = NULL; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
424 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
425 |
void ChunkManager::set_chunkmanager_class(ChunkManager* cm) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
426 |
assert(_chunkmanager_class == NULL, "Sanity"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
427 |
_chunkmanager_class = cm; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
428 |
} |
53970 | 429 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
430 |
void ChunkManager::set_chunkmanager_nonclass(ChunkManager* cm) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
431 |
assert(_chunkmanager_nonclass == NULL, "Sanity"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
432 |
_chunkmanager_nonclass = cm; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
433 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
434 |
|
58333 | 435 |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
436 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
437 |
// Update statistics. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
438 |
void ChunkManager::add_to_statistics(cm_stats_t* out) const { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
439 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
440 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
441 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
442 |
for (chklvl_t l = chklvl::ROOT_CHUNK_LEVEL; l <= chklvl::HIGHEST_CHUNK_LEVEL; l ++) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
443 |
out->num_chunks[l] += _chunks.num_chunks_at_level(l); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
444 |
out->committed_word_size[l] += _chunks.committed_word_size_at_level(l); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
445 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
446 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
447 |
DEBUG_ONLY(out->verify();) |
53970 | 448 |
|
50193 | 449 |
} |
450 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
451 |
#ifdef ASSERT |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
452 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
453 |
void ChunkManager::verify(bool slow) const { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
454 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
455 |
verify_locked(slow); |
50193 | 456 |
} |
457 |
||
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
458 |
void ChunkManager::verify_locked(bool slow) const { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
459 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
460 |
assert_lock_strong(MetaspaceExpand_lock); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
461 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
462 |
assert(_vslist != NULL, "No vslist"); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
463 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
464 |
// This checks that the lists are wired up correctly, that the counters are valid and |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
465 |
// that each chunk is (only) in its correct list. |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
466 |
_chunks.verify(true); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
467 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
468 |
// Need to check that each chunk is free..._size = 0; |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
469 |
for (chklvl_t l = chklvl::LOWEST_CHUNK_LEVEL; l <= chklvl::HIGHEST_CHUNK_LEVEL; l ++) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
470 |
for (const Metachunk* c = _chunks.first_at_level(l); c != NULL; c = c->next()) { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
471 |
assert(c->is_free(), "Chunk is not free."); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
472 |
assert(c->used_words() == 0, "Chunk should have not used words."); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
473 |
} |
50193 | 474 |
} |
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
475 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
476 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
477 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
478 |
#endif // ASSERT |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
479 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
480 |
void ChunkManager::print_on(outputStream* st) const { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
481 |
MutexLocker fcl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
482 |
print_on_locked(st); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
483 |
} |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
484 |
|
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
485 |
void ChunkManager::print_on_locked(outputStream* st) const { |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
486 |
assert_lock_strong(MetaspaceExpand_lock); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
487 |
st->print_cr("cm %s: %d chunks, total word size: " SIZE_FORMAT ", committed word size: " SIZE_FORMAT, _name, |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
488 |
total_num_chunks(), total_word_size(), _chunks.total_committed_word_size()); |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
54623
diff
changeset
|
489 |
_chunks.print_on(st); |
50193 | 490 |
} |
491 |
||
492 |
} // namespace metaspace |
|
493 |
||
494 |
||
495 |