< prev index next >

src/share/vm/gc/serial/tenuredGeneration.cpp

Print this page
rev 8393 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:

*** 39,51 **** #if INCLUDE_ALL_GCS #include "gc/cms/parOopClosures.hpp" #endif TenuredGeneration::TenuredGeneration(ReservedSpace rs, ! size_t initial_byte_size, int level, GenRemSet* remset) : ! CardGeneration(rs, initial_byte_size, level, remset) { HeapWord* bottom = (HeapWord*) _virtual_space.low(); HeapWord* end = (HeapWord*) _virtual_space.high(); _the_space = new TenuredSpace(_bts, MemRegion(bottom, end)); _the_space->reset_saved_mark(); --- 39,51 ---- #if INCLUDE_ALL_GCS #include "gc/cms/parOopClosures.hpp" #endif TenuredGeneration::TenuredGeneration(ReservedSpace rs, ! size_t initial_byte_size, GenRemSet* remset) : ! CardGeneration(rs, initial_byte_size, remset) { HeapWord* bottom = (HeapWord*) _virtual_space.low(); HeapWord* end = (HeapWord*) _virtual_space.high(); _the_space = new TenuredSpace(_bts, MemRegion(bottom, end)); _the_space->reset_saved_mark();
*** 132,146 **** assert(used() == used_after_gc && used_after_gc <= capacity(), err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity())); } ! void TenuredGeneration::update_gc_stats(int current_level, bool full) { ! // If the next lower level(s) has been collected, gather any statistics // that are of interest at this point. ! if (!full && (current_level + 1) == level()) { // Calculate size of data promoted from the younger generations // before doing the collection. size_t used_before_gc = used(); // If the younger gen collections were skipped, then the --- 132,147 ---- assert(used() == used_after_gc && used_after_gc <= capacity(), err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity())); } ! void TenuredGeneration::update_gc_stats(Generation* current_generation, bool full) { ! // If the young generation has been collected, gather any statistics // that are of interest at this point. ! bool current_is_young = (current_generation == GenCollectedHeap::heap()->young_gen()); ! if (!full && current_is_young) { // Calculate size of data promoted from the younger generations // before doing the collection. size_t used_before_gc = used(); // If the younger gen collections were skipped, then the
*** 190,200 **** gc_timer->register_gc_start(); SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer(); gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start()); ! GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs); gc_timer->register_gc_end(); gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); } --- 191,201 ---- gc_timer->register_gc_start(); SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer(); gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start()); ! GenMarkSweep::invoke_at_safepoint(ref_processor(), clear_all_soft_refs); gc_timer->register_gc_end(); gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); }
< prev index next >