# HG changeset patch # User brutisso # Date 1337284420 -7200 # Node ID c92a7990098659ad59d328e2b7921e66fee9609c # Parent 03d61caacd1e5170fd5b94ba709f8997bd170dee 7169062: CMS: Assertion failed with -XX:+ObjectAlignmentInBytes=64 Summary: Removed the assert in CompactibleFreeListSpace::check_free_list_consistency() since it was too strict. Simplified CompactibleFreeListSpace::set_cms_values() to reducde the need for asserts. Reviewed-by: jcoomes, stefank diff -r 03d61caacd1e -r c92a79900986 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri May 18 14:57:28 2012 -0700 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Thu May 17 21:53:40 2012 +0200 @@ -58,8 +58,11 @@ void CompactibleFreeListSpace::set_cms_values() { // Set CMS global values assert(MinChunkSize == 0, "already set"); - #define numQuanta(x,y) ((x+y-1)/y) - MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; + + // MinChunkSize should be a multiple of MinObjAlignment and be large enough + // for chunks to contain a FreeChunk. + size_t min_chunk_size_in_bytes = align_size_up(sizeof(FreeChunk), MinObjAlignmentInBytes); + MinChunkSize = min_chunk_size_in_bytes / BytesPerWord; assert(IndexSetStart == 0 && IndexSetStride == 0, "already set"); IndexSetStart = MinChunkSize; @@ -2534,12 +2537,8 @@ " linear allocation buffers"); assert(BinaryTreeDictionary::min_tree_chunk_size*HeapWordSize == sizeof(TreeChunk), "else MIN_TREE_CHUNK_SIZE is wrong"); - assert((IndexSetStride == 2 && IndexSetStart == 4) || // 32-bit - (IndexSetStride == 1 && IndexSetStart == 3), "just checking"); // 64-bit - assert((IndexSetStride != 2) || (IndexSetStart % 2 == 0), - "Some for-loops may be incorrectly initialized"); - assert((IndexSetStride != 2) || (IndexSetSize % 2 == 1), - "For-loops that iterate over IndexSet with stride 2 may be wrong"); + assert(IndexSetStart != 0, "IndexSetStart not initialized"); + assert(IndexSetStride != 0, "IndexSetStride not initialized"); } #endif