diff options
author | johnc <none@none> | 2010-02-02 18:39:50 -0800 |
---|---|---|
committer | johnc <none@none> | 2010-02-02 18:39:50 -0800 |
commit | a477e794a537ae7748b15116b3ce59ad3414e991 (patch) | |
tree | 7ee2c66cd630b79929bbe42a5f1f677e1d7a326b | |
parent | 500606cb9d71732e658b3189f126e72179b02c82 (diff) |
6914402: G1: assert(!is_young_card(cached_ptr),"shouldn't get a card in young region")
Summary: Invalid assert. Filter cards evicted from the card count cache instead.
Reviewed-by: apetrusenko, tonyp
-rw-r--r-- | src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp index 11c288073..79874f0df 100644 --- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp +++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @@ -300,7 +300,23 @@ jbyte* ConcurrentG1Refine::cache_insert(jbyte* card_ptr, bool* defer) { int count; jbyte* cached_ptr = add_card_count(card_ptr, &count, defer); assert(cached_ptr != NULL, "bad cached card ptr"); - assert(!is_young_card(cached_ptr), "shouldn't get a card in young region"); + + if (is_young_card(cached_ptr)) { + // The region containing cached_ptr has been freed during a clean up + // pause, reallocated, and tagged as young. + assert(cached_ptr != card_ptr, "shouldn't be"); + + // We've just inserted a new old-gen card pointer into the card count + // cache and evicted the previous contents of that count slot. + // The evicted card pointer has been determined to be in a young region + // and so cannot be the newly inserted card pointer (that will be + // in an old region). + // The count for newly inserted card will be set to zero during the + // insertion, so we don't want to defer the cleaning of the newly + // inserted card pointer. + assert(*defer == false, "deferring non-hot card"); + return NULL; + } // The card pointer we obtained from card count cache is not hot // so do not store it in the cache; return it for immediate |