src/share/vm/memory/genCollectedHeap.cpp

Print this page
rev 2652 : 7085906: Replace the permgen allocated sentinelRef with a self-looped end
Summary: Remove the sentinelRef and let the last Reference in a discovered chain point back to itself.
Reviewed-by: TBD1, TBD2


1252   return _gens[level]->gc_stats();
1253 }
1254 
1255 void GenCollectedHeap::verify(bool allow_dirty, bool silent, VerifyOption option /* ignored */) {
1256   if (!silent) {
1257     gclog_or_tty->print("permgen ");
1258   }
1259   perm_gen()->verify(allow_dirty);
1260   for (int i = _n_gens-1; i >= 0; i--) {
1261     Generation* g = _gens[i];
1262     if (!silent) {
1263       gclog_or_tty->print(g->name());
1264       gclog_or_tty->print(" ");
1265     }
1266     g->verify(allow_dirty);
1267   }
1268   if (!silent) {
1269     gclog_or_tty->print("remset ");
1270   }
1271   rem_set()->verify();
1272   if (!silent) {
1273      gclog_or_tty->print("ref_proc ");
1274   }
1275   ReferenceProcessor::verify();
1276 }
1277 
1278 void GenCollectedHeap::print() const { print_on(tty); }
1279 void GenCollectedHeap::print_on(outputStream* st) const {
1280   for (int i = 0; i < _n_gens; i++) {
1281     _gens[i]->print_on(st);
1282   }
1283   perm_gen()->print_on(st);
1284 }
1285 
1286 void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
1287   if (workers() != NULL) {
1288     workers()->threads_do(tc);
1289   }
1290 #ifndef SERIALGC
1291   if (UseConcMarkSweepGC) {
1292     ConcurrentMarkSweepThread::threads_do(tc);
1293   }
1294 #endif // SERIALGC
1295 }




1252   return _gens[level]->gc_stats();
1253 }
1254 
1255 void GenCollectedHeap::verify(bool allow_dirty, bool silent, VerifyOption option /* ignored */) {
1256   if (!silent) {
1257     gclog_or_tty->print("permgen ");
1258   }
1259   perm_gen()->verify(allow_dirty);
1260   for (int i = _n_gens-1; i >= 0; i--) {
1261     Generation* g = _gens[i];
1262     if (!silent) {
1263       gclog_or_tty->print(g->name());
1264       gclog_or_tty->print(" ");
1265     }
1266     g->verify(allow_dirty);
1267   }
1268   if (!silent) {
1269     gclog_or_tty->print("remset ");
1270   }
1271   rem_set()->verify();




1272 }
1273 
1274 void GenCollectedHeap::print() const { print_on(tty); }
1275 void GenCollectedHeap::print_on(outputStream* st) const {
1276   for (int i = 0; i < _n_gens; i++) {
1277     _gens[i]->print_on(st);
1278   }
1279   perm_gen()->print_on(st);
1280 }
1281 
1282 void GenCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
1283   if (workers() != NULL) {
1284     workers()->threads_do(tc);
1285   }
1286 #ifndef SERIALGC
1287   if (UseConcMarkSweepGC) {
1288     ConcurrentMarkSweepThread::threads_do(tc);
1289   }
1290 #endif // SERIALGC
1291 }