Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 6104:c92a79900986
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
author | brutisso |
---|---|
date | Thu, 17 May 2012 21:53:40 +0200 |
parents | f69a5d43dc19 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6069:03d61caacd1e | 6104:c92a79900986 |
---|---|
56 size_t MinChunkSize = 0; | 56 size_t MinChunkSize = 0; |
57 | 57 |
58 void CompactibleFreeListSpace::set_cms_values() { | 58 void CompactibleFreeListSpace::set_cms_values() { |
59 // Set CMS global values | 59 // Set CMS global values |
60 assert(MinChunkSize == 0, "already set"); | 60 assert(MinChunkSize == 0, "already set"); |
61 #define numQuanta(x,y) ((x+y-1)/y) | 61 |
62 MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; | 62 // MinChunkSize should be a multiple of MinObjAlignment and be large enough |
63 // for chunks to contain a FreeChunk. | |
64 size_t min_chunk_size_in_bytes = align_size_up(sizeof(FreeChunk), MinObjAlignmentInBytes); | |
65 MinChunkSize = min_chunk_size_in_bytes / BytesPerWord; | |
63 | 66 |
64 assert(IndexSetStart == 0 && IndexSetStride == 0, "already set"); | 67 assert(IndexSetStart == 0 && IndexSetStride == 0, "already set"); |
65 IndexSetStart = MinChunkSize; | 68 IndexSetStart = MinChunkSize; |
66 IndexSetStride = MinObjAlignment; | 69 IndexSetStride = MinObjAlignment; |
67 } | 70 } |
2532 assert(_dictionary->min_size() <= IndexSetSize, | 2535 assert(_dictionary->min_size() <= IndexSetSize, |
2533 "Some sizes can't be allocated without recourse to" | 2536 "Some sizes can't be allocated without recourse to" |
2534 " linear allocation buffers"); | 2537 " linear allocation buffers"); |
2535 assert(BinaryTreeDictionary<FreeChunk>::min_tree_chunk_size*HeapWordSize == sizeof(TreeChunk<FreeChunk>), | 2538 assert(BinaryTreeDictionary<FreeChunk>::min_tree_chunk_size*HeapWordSize == sizeof(TreeChunk<FreeChunk>), |
2536 "else MIN_TREE_CHUNK_SIZE is wrong"); | 2539 "else MIN_TREE_CHUNK_SIZE is wrong"); |
2537 assert((IndexSetStride == 2 && IndexSetStart == 4) || // 32-bit | 2540 assert(IndexSetStart != 0, "IndexSetStart not initialized"); |
2538 (IndexSetStride == 1 && IndexSetStart == 3), "just checking"); // 64-bit | 2541 assert(IndexSetStride != 0, "IndexSetStride not initialized"); |
2539 assert((IndexSetStride != 2) || (IndexSetStart % 2 == 0), | |
2540 "Some for-loops may be incorrectly initialized"); | |
2541 assert((IndexSetStride != 2) || (IndexSetSize % 2 == 1), | |
2542 "For-loops that iterate over IndexSet with stride 2 may be wrong"); | |
2543 } | 2542 } |
2544 #endif | 2543 #endif |
2545 | 2544 |
2546 void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const { | 2545 void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const { |
2547 assert_lock_strong(&_freelistLock); | 2546 assert_lock_strong(&_freelistLock); |