Merge

Wed, 08 Jun 2011 08:39:53 -0700

author
ysr
date
Wed, 08 Jun 2011 08:39:53 -0700
changeset 2960
e66f38dd58a9
parent 2944
f153114134c8
parent 2959
5c0a3c1858b1
child 2961
053d84a76d3d

Merge

     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue Jun 07 13:17:05 2011 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Wed Jun 08 08:39:53 2011 -0700
     1.3 @@ -1833,8 +1833,6 @@
     1.4      }
     1.5    )
     1.6    _indexedFreeList[size].removeChunk(fc);
     1.7 -  debug_only(fc->clearNext());
     1.8 -  debug_only(fc->clearPrev());
     1.9    NOT_PRODUCT(
    1.10      if (FLSVerifyIndexTable) {
    1.11        verifyIndexedFreeList(size);
     2.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp	Tue Jun 07 13:17:05 2011 -0700
     2.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp	Wed Jun 08 08:39:53 2011 -0700
     2.3 @@ -114,17 +114,11 @@
     2.4      linkNext(ptr);
     2.5      if (ptr != NULL) ptr->linkPrev(this);
     2.6    }
     2.7 -  void linkAfterNonNull(FreeChunk* ptr) {
     2.8 -    assert(ptr != NULL, "precondition violation");
     2.9 -    linkNext(ptr);
    2.10 -    ptr->linkPrev(this);
    2.11 -  }
    2.12    void linkNext(FreeChunk* ptr) { _next = ptr; }
    2.13    void linkPrev(FreeChunk* ptr) {
    2.14      LP64_ONLY(if (UseCompressedOops) _prev = ptr; else)
    2.15      _prev = (FreeChunk*)((intptr_t)ptr | 0x1);
    2.16    }
    2.17 -  void clearPrev()              { _prev = NULL; }
    2.18    void clearNext()              { _next = NULL; }
    2.19    void markNotFree() {
    2.20      // Set _prev (klass) to null before (if) clearing the mark word below
     3.1 --- a/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Tue Jun 07 13:17:05 2011 -0700
     3.2 +++ b/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Wed Jun 08 08:39:53 2011 -0700
     3.3 @@ -348,15 +348,31 @@
     3.4          // cleared before we had a chance to examine it. In that case, the value
     3.5          // will have been logged in the LNC for that chunk.
     3.6          // We need to examine as many chunks to the right as this object
     3.7 -        // covers.
     3.8 -        const uintptr_t last_chunk_index_to_check = addr_to_chunk_index(last_block + last_block_size - 1)
     3.9 -                                                    - lowest_non_clean_base_chunk_index;
    3.10 -        DEBUG_ONLY(const uintptr_t last_chunk_index = addr_to_chunk_index(used.last())
    3.11 -                                                      - lowest_non_clean_base_chunk_index;)
    3.12 -        assert(last_chunk_index_to_check <= last_chunk_index,
    3.13 -               err_msg("Out of bounds: last_chunk_index_to_check " INTPTR_FORMAT
    3.14 -                       " exceeds last_chunk_index " INTPTR_FORMAT,
    3.15 -                       last_chunk_index_to_check, last_chunk_index));
    3.16 +        // covers. However, we need to bound this checking to the largest
    3.17 +        // entry in the LNC array: this is because the heap may expand
    3.18 +        // after the LNC array has been created but before we reach this point,
    3.19 +        // and the last block in our chunk may have been expanded to include
    3.20 +        // the expansion delta (and possibly subsequently allocated from, so
    3.21 +        // it wouldn't be sufficient to check whether that last block was
    3.22 +        // or was not an object at this point).
    3.23 +        uintptr_t last_chunk_index_to_check = addr_to_chunk_index(last_block + last_block_size - 1)
    3.24 +                                              - lowest_non_clean_base_chunk_index;
    3.25 +        const uintptr_t last_chunk_index    = addr_to_chunk_index(used.last())
    3.26 +                                              - lowest_non_clean_base_chunk_index;
    3.27 +        if (last_chunk_index_to_check > last_chunk_index) {
    3.28 +          assert(last_block + last_block_size > used.end(),
    3.29 +                 err_msg("Inconsistency detected: last_block [" PTR_FORMAT "," PTR_FORMAT "]"
    3.30 +                         " does not exceed used.end() = " PTR_FORMAT ","
    3.31 +                         " yet last_chunk_index_to_check " INTPTR_FORMAT
    3.32 +                         " exceeds last_chunk_index " INTPTR_FORMAT,
    3.33 +                         last_chunk_index_to_check, last_chunk_index));
    3.34 +          assert(sp->used_region().end() > used.end(),
    3.35 +                 err_msg("Expansion did not happen: "
    3.36 +                         "[" PTR_FORMAT "," PTR_FORMAT ") -> [" PTR_FORMAT "," PTR_FORMAT ")",
    3.37 +                         sp->used_region().start(), sp->used_region().end(), used.start(), used.end()));
    3.38 +          NOISY(tty->print_cr(" process_chunk_boundary: heap expanded; explicitly bounding last_chunk");)
    3.39 +          last_chunk_index_to_check = last_chunk_index;
    3.40 +        }
    3.41          for (uintptr_t lnc_index = cur_chunk_index + 1;
    3.42               lnc_index <= last_chunk_index_to_check;
    3.43               lnc_index++) {

mercurial