src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/memory

src/share/vm/memory/genMarkSweep.cpp

Print this page
rev 5732 : [mq]: comments2


 131     // region and clear those corresponding to the evacuated region.
 132     rs->invalidate_or_clear(old_gen);
 133   }
 134 
 135   Threads::gc_epilogue();
 136   CodeCache::gc_epilogue();
 137   JvmtiExport::gc_epilogue();
 138 
 139   if (PrintGC && !PrintGCDetails) {
 140     gch->print_heap_change(gch_prev_used);
 141   }
 142 
 143   // refs processing: clean slate
 144   _ref_processor = NULL;
 145 
 146   // Update heap occupancy information which is used as
 147   // input to soft ref clearing policy at the next gc.
 148   Universe::update_heap_info_at_gc();
 149 
 150   // Update time of last gc for all generations we collected
 151   // (which curently is all the generations in the heap).
 152   // We need to use a monotonically non-deccreasing time in ms
 153   // or we will see time-warp warnings and os::javaTimeMillis()
 154   // does not guarantee monotonicity.
 155   jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
 156   gch->update_time_of_last_gc(now);
 157 
 158   gch->trace_heap_after_gc(_gc_tracer);
 159 }
 160 
 161 void GenMarkSweep::allocate_stacks() {
 162   GenCollectedHeap* gch = GenCollectedHeap::heap();
 163   // Scratch request on behalf of oldest generation; will do no
 164   // allocation.
 165   ScratchBlock* scratch = gch->gather_scratch(gch->_gens[gch->_n_gens-1], 0);
 166 
 167   // $$$ To cut a corner, we'll only use the first scratch block, and then
 168   // revert to malloc.
 169   if (scratch != NULL) {
 170     _preserved_count_max =
 171       scratch->num_words * HeapWordSize / sizeof(PreservedMark);
 172   } else {




 131     // region and clear those corresponding to the evacuated region.
 132     rs->invalidate_or_clear(old_gen);
 133   }
 134 
 135   Threads::gc_epilogue();
 136   CodeCache::gc_epilogue();
 137   JvmtiExport::gc_epilogue();
 138 
 139   if (PrintGC && !PrintGCDetails) {
 140     gch->print_heap_change(gch_prev_used);
 141   }
 142 
 143   // refs processing: clean slate
 144   _ref_processor = NULL;
 145 
 146   // Update heap occupancy information which is used as
 147   // input to soft ref clearing policy at the next gc.
 148   Universe::update_heap_info_at_gc();
 149 
 150   // Update time of last gc for all generations we collected
 151   // (which currently is all the generations in the heap).
 152   // We need to use a monotonically non-decreasing time in ms
 153   // or we will see time-warp warnings and os::javaTimeMillis()
 154   // does not guarantee monotonicity.
 155   jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
 156   gch->update_time_of_last_gc(now);
 157 
 158   gch->trace_heap_after_gc(_gc_tracer);
 159 }
 160 
 161 void GenMarkSweep::allocate_stacks() {
 162   GenCollectedHeap* gch = GenCollectedHeap::heap();
 163   // Scratch request on behalf of oldest generation; will do no
 164   // allocation.
 165   ScratchBlock* scratch = gch->gather_scratch(gch->_gens[gch->_n_gens-1], 0);
 166 
 167   // $$$ To cut a corner, we'll only use the first scratch block, and then
 168   // revert to malloc.
 169   if (scratch != NULL) {
 170     _preserved_count_max =
 171       scratch->num_words * HeapWordSize / sizeof(PreservedMark);
 172   } else {


src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File