1207 // Fill TLAB's and such 1208 CollectedHeap::accumulate_statistics_all_tlabs(); 1209 ensure_parsability(true); // retire TLABs 1210 1211 // Walk generations 1212 GenGCPrologueClosure blk(full); 1213 generation_iterate(&blk, false); // not old-to-young. 1214 }; 1215 1216 class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure { 1217 private: 1218 bool _full; 1219 public: 1220 void do_generation(Generation* gen) { 1221 gen->gc_epilogue(_full); 1222 } 1223 GenGCEpilogueClosure(bool full) : _full(full) {}; 1224 }; 1225 1226 void GenCollectedHeap::gc_epilogue(bool full) { 1227 #ifdef COMPILER2 1228 assert(DerivedPointerTable::is_empty(), "derived pointer present"); 1229 size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr())); 1230 guarantee(actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps"); 1231 #endif /* COMPILER2 */ 1232 1233 resize_all_tlabs(); 1234 1235 GenGCEpilogueClosure blk(full); 1236 generation_iterate(&blk, false); // not old-to-young. 1237 1238 if (!CleanChunkPoolAsync) { 1239 Chunk::clean_chunk_pool(); 1240 } 1241 1242 MetaspaceCounters::update_performance_counters(); 1243 CompressedClassSpaceCounters::update_performance_counters(); 1244 1245 always_do_update_barrier = UseConcMarkSweepGC; 1246 }; 1247 1248 #ifndef PRODUCT 1249 class GenGCSaveTopsBeforeGCClosure: public GenCollectedHeap::GenClosure { 1250 private: 1251 public: | 1207 // Fill TLAB's and such 1208 CollectedHeap::accumulate_statistics_all_tlabs(); 1209 ensure_parsability(true); // retire TLABs 1210 1211 // Walk generations 1212 GenGCPrologueClosure blk(full); 1213 generation_iterate(&blk, false); // not old-to-young. 1214 }; 1215 1216 class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure { 1217 private: 1218 bool _full; 1219 public: 1220 void do_generation(Generation* gen) { 1221 gen->gc_epilogue(_full); 1222 } 1223 GenGCEpilogueClosure(bool full) : _full(full) {}; 1224 }; 1225 1226 void GenCollectedHeap::gc_epilogue(bool full) { 1227 #if defined(COMPILER2) || INCLUDE_JVMCI 1228 assert(DerivedPointerTable::is_empty(), "derived pointer present"); 1229 size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr())); 1230 guarantee(actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps"); 1231 #endif /* COMPILER2 || INCLUDE_JVMCI */ 1232 1233 resize_all_tlabs(); 1234 1235 GenGCEpilogueClosure blk(full); 1236 generation_iterate(&blk, false); // not old-to-young. 1237 1238 if (!CleanChunkPoolAsync) { 1239 Chunk::clean_chunk_pool(); 1240 } 1241 1242 MetaspaceCounters::update_performance_counters(); 1243 CompressedClassSpaceCounters::update_performance_counters(); 1244 1245 always_do_update_barrier = UseConcMarkSweepGC; 1246 }; 1247 1248 #ifndef PRODUCT 1249 class GenGCSaveTopsBeforeGCClosure: public GenCollectedHeap::GenClosure { 1250 private: 1251 public: |