< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Print this page




1050   // Fill TLAB's and such
1051   CollectedHeap::accumulate_statistics_all_tlabs();
1052   ensure_parsability(true);   // retire TLABs
1053 
1054   // Walk generations
1055   GenGCPrologueClosure blk(full);
1056   generation_iterate(&blk, false);  // not old-to-young.
1057 };
1058 
1059 class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure {
1060  private:
1061   bool _full;
1062  public:
1063   void do_generation(Generation* gen) {
1064     gen->gc_epilogue(_full);
1065   }
1066   GenGCEpilogueClosure(bool full) : _full(full) {};
1067 };
1068 
1069 void GenCollectedHeap::gc_epilogue(bool full) {
1070 #if defined(COMPILER2) || INCLUDE_JVMCI
1071   assert(DerivedPointerTable::is_empty(), "derived pointer present");
1072   size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr()));
1073   guarantee(is_client_compilation_mode_vm() || actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps");
1074 #endif /* COMPILER2 || INCLUDE_JVMCI */
1075 
1076   resize_all_tlabs();
1077 
1078   GenGCEpilogueClosure blk(full);
1079   generation_iterate(&blk, false);  // not old-to-young.
1080 
1081   if (!CleanChunkPoolAsync) {
1082     Chunk::clean_chunk_pool();
1083   }
1084 
1085   MetaspaceCounters::update_performance_counters();
1086   CompressedClassSpaceCounters::update_performance_counters();
1087 };
1088 
1089 #ifndef PRODUCT
1090 class GenGCSaveTopsBeforeGCClosure: public GenCollectedHeap::GenClosure {
1091  private:
1092  public:
1093   void do_generation(Generation* gen) {
1094     gen->record_spaces_top();




1050   // Fill TLAB's and such
1051   CollectedHeap::accumulate_statistics_all_tlabs();
1052   ensure_parsability(true);   // retire TLABs
1053 
1054   // Walk generations
1055   GenGCPrologueClosure blk(full);
1056   generation_iterate(&blk, false);  // not old-to-young.
1057 };
1058 
1059 class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure {
1060  private:
1061   bool _full;
1062  public:
1063   void do_generation(Generation* gen) {
1064     gen->gc_epilogue(_full);
1065   }
1066   GenGCEpilogueClosure(bool full) : _full(full) {};
1067 };
1068 
1069 void GenCollectedHeap::gc_epilogue(bool full) {
1070 #if COMPILER2_OR_JVMCI
1071   assert(DerivedPointerTable::is_empty(), "derived pointer present");
1072   size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr()));
1073   guarantee(is_client_compilation_mode_vm() || actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps");
1074 #endif // COMPILER2_OR_JVMCI
1075 
1076   resize_all_tlabs();
1077 
1078   GenGCEpilogueClosure blk(full);
1079   generation_iterate(&blk, false);  // not old-to-young.
1080 
1081   if (!CleanChunkPoolAsync) {
1082     Chunk::clean_chunk_pool();
1083   }
1084 
1085   MetaspaceCounters::update_performance_counters();
1086   CompressedClassSpaceCounters::update_performance_counters();
1087 };
1088 
1089 #ifndef PRODUCT
1090 class GenGCSaveTopsBeforeGCClosure: public GenCollectedHeap::GenClosure {
1091  private:
1092  public:
1093   void do_generation(Generation* gen) {
1094     gen->record_spaces_top();


< prev index next >