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 "aot/aotLoader.hpp"
27 #include "classfile/symbolTable.hpp"
28 #include "classfile/stringTable.hpp"
29 #include "classfile/systemDictionary.hpp"
30 #include "classfile/vmSymbols.hpp"
31 #include "code/codeCache.hpp"
32 #include "code/icBuffer.hpp"
33 #include "gc/shared/adaptiveSizePolicy.hpp"
34 #include "gc/shared/cardTableBarrierSet.hpp"
35 #include "gc/shared/cardTableRS.hpp"
36 #include "gc/shared/collectedHeap.inline.hpp"
37 #include "gc/shared/collectorCounters.hpp"
38 #include "gc/shared/gcId.hpp"
39 #include "gc/shared/gcLocker.hpp"
40 #include "gc/shared/gcPolicyCounters.hpp"
41 #include "gc/shared/gcTrace.hpp"
42 #include "gc/shared/gcTraceTime.inline.hpp"
43 #include "gc/shared/genCollectedHeap.hpp"
44 #include "gc/shared/genOopClosures.inline.hpp"
45 #include "gc/shared/generationSpec.hpp"
46 #include "gc/shared/space.hpp"
47 #include "gc/shared/strongRootsScope.hpp"
48 #include "gc/shared/vmGCOperations.hpp"
49 #include "gc/shared/weakProcessor.hpp"
50 #include "gc/shared/workgroup.hpp"
51 #include "memory/filemap.hpp"
52 #include "memory/metaspaceCounters.hpp"
1226 }
1227 }
1228
1229 bool GenCollectedHeap::is_maximal_no_gc() const {
1230 return _young_gen->is_maximal_no_gc() && _old_gen->is_maximal_no_gc();
1231 }
1232
1233 void GenCollectedHeap::save_marks() {
1234 _young_gen->save_marks();
1235 _old_gen->save_marks();
1236 }
1237
1238 GenCollectedHeap* GenCollectedHeap::heap() {
1239 CollectedHeap* heap = Universe::heap();
1240 assert(heap != NULL, "Uninitialized access to GenCollectedHeap::heap()");
1241 assert(heap->kind() == CollectedHeap::Serial ||
1242 heap->kind() == CollectedHeap::CMS, "Invalid name");
1243 return (GenCollectedHeap*) heap;
1244 }
1245
1246 void GenCollectedHeap::prepare_for_compaction() {
1247 // Start by compacting into same gen.
1248 CompactPoint cp(_old_gen);
1249 _old_gen->prepare_for_compaction(&cp);
1250 _young_gen->prepare_for_compaction(&cp);
1251 }
1252
1253 void GenCollectedHeap::verify(VerifyOption option /* ignored */) {
1254 log_debug(gc, verify)("%s", _old_gen->name());
1255 _old_gen->verify();
1256
1257 log_debug(gc, verify)("%s", _old_gen->name());
1258 _young_gen->verify();
1259
1260 log_debug(gc, verify)("RemSet");
1261 rem_set()->verify();
1262 }
1263
1264 void GenCollectedHeap::print_on(outputStream* st) const {
1265 _young_gen->print_on(st);
1266 _old_gen->print_on(st);
1267 MetaspaceUtils::print_on(st);
1268 }
1269
1270 void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
1271 }
|
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 "aot/aotLoader.hpp"
27 #include "classfile/symbolTable.hpp"
28 #include "classfile/stringTable.hpp"
29 #include "classfile/systemDictionary.hpp"
30 #include "classfile/vmSymbols.hpp"
31 #include "code/codeCache.hpp"
32 #include "code/icBuffer.hpp"
33 #include "gc/serial/defNewGeneration.hpp"
34 #include "gc/shared/adaptiveSizePolicy.hpp"
35 #include "gc/shared/cardTableBarrierSet.hpp"
36 #include "gc/shared/cardTableRS.hpp"
37 #include "gc/shared/collectedHeap.inline.hpp"
38 #include "gc/shared/collectorCounters.hpp"
39 #include "gc/shared/gcId.hpp"
40 #include "gc/shared/gcLocker.hpp"
41 #include "gc/shared/gcPolicyCounters.hpp"
42 #include "gc/shared/gcTrace.hpp"
43 #include "gc/shared/gcTraceTime.inline.hpp"
44 #include "gc/shared/genCollectedHeap.hpp"
45 #include "gc/shared/genOopClosures.inline.hpp"
46 #include "gc/shared/generationSpec.hpp"
47 #include "gc/shared/space.hpp"
48 #include "gc/shared/strongRootsScope.hpp"
49 #include "gc/shared/vmGCOperations.hpp"
50 #include "gc/shared/weakProcessor.hpp"
51 #include "gc/shared/workgroup.hpp"
52 #include "memory/filemap.hpp"
53 #include "memory/metaspaceCounters.hpp"
1227 }
1228 }
1229
1230 bool GenCollectedHeap::is_maximal_no_gc() const {
1231 return _young_gen->is_maximal_no_gc() && _old_gen->is_maximal_no_gc();
1232 }
1233
1234 void GenCollectedHeap::save_marks() {
1235 _young_gen->save_marks();
1236 _old_gen->save_marks();
1237 }
1238
1239 GenCollectedHeap* GenCollectedHeap::heap() {
1240 CollectedHeap* heap = Universe::heap();
1241 assert(heap != NULL, "Uninitialized access to GenCollectedHeap::heap()");
1242 assert(heap->kind() == CollectedHeap::Serial ||
1243 heap->kind() == CollectedHeap::CMS, "Invalid name");
1244 return (GenCollectedHeap*) heap;
1245 }
1246
1247 #if INCLUDE_SERIALGC
1248 void GenCollectedHeap::prepare_for_compaction() {
1249 // Start by compacting into same gen.
1250 CompactPoint cp(_old_gen);
1251 _old_gen->prepare_for_compaction(&cp);
1252 _young_gen->prepare_for_compaction(&cp);
1253 }
1254 #endif // INCLUDE_SERIALGC
1255
1256 void GenCollectedHeap::verify(VerifyOption option /* ignored */) {
1257 log_debug(gc, verify)("%s", _old_gen->name());
1258 _old_gen->verify();
1259
1260 log_debug(gc, verify)("%s", _old_gen->name());
1261 _young_gen->verify();
1262
1263 log_debug(gc, verify)("RemSet");
1264 rem_set()->verify();
1265 }
1266
1267 void GenCollectedHeap::print_on(outputStream* st) const {
1268 _young_gen->print_on(st);
1269 _old_gen->print_on(st);
1270 MetaspaceUtils::print_on(st);
1271 }
1272
1273 void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
1274 }
|