src/share/vm/memory/defNewGeneration.cpp

changeset 1580
e018e6884bd8
parent 1424
148e5441d916
child 1822
0bfd3fb24150
     1.1 --- a/src/share/vm/memory/defNewGeneration.cpp	Wed Dec 16 15:12:51 2009 -0800
     1.2 +++ b/src/share/vm/memory/defNewGeneration.cpp	Wed Dec 23 09:23:54 2009 -0800
     1.3 @@ -609,7 +609,7 @@
     1.4  
     1.5      remove_forwarding_pointers();
     1.6      if (PrintGCDetails) {
     1.7 -      gclog_or_tty->print(" (promotion failed)");
     1.8 +      gclog_or_tty->print(" (promotion failed) ");
     1.9      }
    1.10      // Add to-space to the list of space to compact
    1.11      // when a promotion failure has occurred.  In that
    1.12 @@ -620,6 +620,9 @@
    1.13      from()->set_next_compaction_space(to());
    1.14      gch->set_incremental_collection_will_fail();
    1.15  
    1.16 +    // Inform the next generation that a promotion failure occurred.
    1.17 +    _next_gen->promotion_failure_occurred();
    1.18 +
    1.19      // Reset the PromotionFailureALot counters.
    1.20      NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();)
    1.21    }
    1.22 @@ -679,6 +682,11 @@
    1.23  
    1.24  void DefNewGeneration::handle_promotion_failure(oop old) {
    1.25    preserve_mark_if_necessary(old, old->mark());
    1.26 +  if (!_promotion_failed && PrintPromotionFailure) {
    1.27 +    gclog_or_tty->print(" (promotion failure size = " SIZE_FORMAT ") ",
    1.28 +                        old->size());
    1.29 +  }
    1.30 +
    1.31    // forward to self
    1.32    old->forward_to(old);
    1.33    _promotion_failed = true;

mercurial