equal
deleted
inserted
replaced
565 _gc_timer->register_gc_start(os::elapsed_counter()); |
565 _gc_timer->register_gc_start(os::elapsed_counter()); |
566 DefNewTracer gc_tracer; |
566 DefNewTracer gc_tracer; |
567 gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start()); |
567 gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start()); |
568 |
568 |
569 _next_gen = gch->next_gen(this); |
569 _next_gen = gch->next_gen(this); |
570 assert(_next_gen != NULL, |
|
571 "This must be the youngest gen, and not the only gen"); |
|
572 |
570 |
573 // If the next generation is too full to accommodate promotion |
571 // If the next generation is too full to accommodate promotion |
574 // from this generation, pass on collection; let the next generation |
572 // from this generation, pass on collection; let the next generation |
575 // do it. |
573 // do it. |
576 if (!collection_attempt_is_safe()) { |
574 if (!collection_attempt_is_safe()) { |
899 return false; |
897 return false; |
900 } |
898 } |
901 if (_next_gen == NULL) { |
899 if (_next_gen == NULL) { |
902 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
900 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
903 _next_gen = gch->next_gen(this); |
901 _next_gen = gch->next_gen(this); |
904 assert(_next_gen != NULL, |
|
905 "This must be the youngest gen, and not the only gen"); |
|
906 } |
902 } |
907 return _next_gen->promotion_attempt_is_safe(used()); |
903 return _next_gen->promotion_attempt_is_safe(used()); |
908 } |
904 } |
909 |
905 |
910 void DefNewGeneration::gc_epilogue(bool full) { |
906 void DefNewGeneration::gc_epilogue(bool full) { |