Mon, 20 Oct 2014 23:02:07 -0700
Merge
.hgtags | file | annotate | diff | comparison | revisions | |
make/hotspot_version | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Mon Oct 20 15:14:56 2014 -0400 1.2 +++ b/.hgtags Mon Oct 20 23:02:07 2014 -0700 1.3 @@ -528,4 +528,5 @@ 1.4 087678da96603c9705b38b6cc4a6569ac7b4420a jdk8u31-b02 1.5 401cbaa475b4efe53153119ab87a82b217980a7f jdk8u31-b03 1.6 060cdf93040c1bfa5fdf580da5e9999042632cc8 jdk8u31-b04 1.7 +6e56d7f1634f6c4cd4196e699c06e6ca2e6d6efb jdk8u31-b05 1.8 b95f13f05f553309cd74d6ccf8fcedb259c6716c jdk8u45-b00
2.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Mon Oct 20 15:14:56 2014 -0400 2.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Mon Oct 20 23:02:07 2014 -0700 2.3 @@ -2760,10 +2760,12 @@ 2.4 } 2.5 } 2.6 2.7 -void CompactibleFreeListSpace:: par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl) { 2.8 - assert(fl->count() == 0, "Precondition."); 2.9 - assert(word_sz < CompactibleFreeListSpace::IndexSetSize, 2.10 - "Precondition"); 2.11 +// Used by par_get_chunk_of_blocks() for the chunks from the 2.12 +// indexed_free_lists. Looks for a chunk with size that is a multiple 2.13 +// of "word_sz" and if found, splits it into "word_sz" chunks and add 2.14 +// to the free list "fl". "n" is the maximum number of chunks to 2.15 +// be added to "fl". 2.16 +bool CompactibleFreeListSpace:: par_get_chunk_of_blocks_IFL(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl) { 2.17 2.18 // We'll try all multiples of word_sz in the indexed set, starting with 2.19 // word_sz itself and, if CMSSplitIndexedFreeListBlocks, try larger multiples, 2.20 @@ -2844,11 +2846,15 @@ 2.21 Mutex::_no_safepoint_check_flag); 2.22 ssize_t births = _indexedFreeList[word_sz].split_births() + num; 2.23 _indexedFreeList[word_sz].set_split_births(births); 2.24 - return; 2.25 + return true; 2.26 } 2.27 } 2.28 + return found; 2.29 } 2.30 - // Otherwise, we'll split a block from the dictionary. 2.31 +} 2.32 + 2.33 +FreeChunk* CompactibleFreeListSpace::get_n_way_chunk_to_split(size_t word_sz, size_t n) { 2.34 + 2.35 FreeChunk* fc = NULL; 2.36 FreeChunk* rem_fc = NULL; 2.37 size_t rem; 2.38 @@ -2859,16 +2865,12 @@ 2.39 fc = dictionary()->get_chunk(MAX2(n * word_sz, _dictionary->min_size()), 2.40 FreeBlockDictionary<FreeChunk>::atLeast); 2.41 if (fc != NULL) { 2.42 - _bt.allocated((HeapWord*)fc, fc->size(), true /* reducing */); // update _unallocated_blk 2.43 - dictionary()->dict_census_update(fc->size(), 2.44 - true /*split*/, 2.45 - false /*birth*/); 2.46 break; 2.47 } else { 2.48 n--; 2.49 } 2.50 } 2.51 - if (fc == NULL) return; 2.52 + if (fc == NULL) return NULL; 2.53 // Otherwise, split up that block. 2.54 assert((ssize_t)n >= 1, "Control point invariant"); 2.55 assert(fc->is_free(), "Error: should be a free block"); 2.56 @@ -2890,10 +2892,14 @@ 2.57 // dictionary and return, leaving "fl" empty. 2.58 if (n == 0) { 2.59 returnChunkToDictionary(fc); 2.60 - assert(fl->count() == 0, "We never allocated any blocks"); 2.61 - return; 2.62 + return NULL; 2.63 } 2.64 2.65 + _bt.allocated((HeapWord*)fc, fc->size(), true /* reducing */); // update _unallocated_blk 2.66 + dictionary()->dict_census_update(fc->size(), 2.67 + true /*split*/, 2.68 + false /*birth*/); 2.69 + 2.70 // First return the remainder, if any. 2.71 // Note that we hold the lock until we decide if we're going to give 2.72 // back the remainder to the dictionary, since a concurrent allocation 2.73 @@ -2926,7 +2932,24 @@ 2.74 _indexedFreeList[rem].return_chunk_at_head(rem_fc); 2.75 smallSplitBirth(rem); 2.76 } 2.77 - assert((ssize_t)n > 0 && fc != NULL, "Consistency"); 2.78 + assert(n * word_sz == fc->size(), 2.79 + err_msg("Chunk size " SIZE_FORMAT " is not exactly splittable by " 2.80 + SIZE_FORMAT " sized chunks of size " SIZE_FORMAT, 2.81 + fc->size(), n, word_sz)); 2.82 + return fc; 2.83 +} 2.84 + 2.85 +void CompactibleFreeListSpace:: par_get_chunk_of_blocks_dictionary(size_t word_sz, size_t targetted_number_of_chunks, AdaptiveFreeList<FreeChunk>* fl) { 2.86 + 2.87 + FreeChunk* fc = get_n_way_chunk_to_split(word_sz, targetted_number_of_chunks); 2.88 + 2.89 + if (fc == NULL) { 2.90 + return; 2.91 + } 2.92 + 2.93 + size_t n = fc->size() / word_sz; 2.94 + 2.95 + assert((ssize_t)n > 0, "Consistency"); 2.96 // Now do the splitting up. 2.97 // Must do this in reverse order, so that anybody attempting to 2.98 // access the main chunk sees it as a single free block until we 2.99 @@ -2974,6 +2997,20 @@ 2.100 assert(fl->tail()->next() == NULL, "List invariant."); 2.101 } 2.102 2.103 +void CompactibleFreeListSpace:: par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl) { 2.104 + assert(fl->count() == 0, "Precondition."); 2.105 + assert(word_sz < CompactibleFreeListSpace::IndexSetSize, 2.106 + "Precondition"); 2.107 + 2.108 + if (par_get_chunk_of_blocks_IFL(word_sz, n, fl)) { 2.109 + // Got it 2.110 + return; 2.111 + } 2.112 + 2.113 + // Otherwise, we'll split a block from the dictionary. 2.114 + par_get_chunk_of_blocks_dictionary(word_sz, n, fl); 2.115 +} 2.116 + 2.117 // Set up the space's par_seq_tasks structure for work claiming 2.118 // for parallel rescan. See CMSParRemarkTask where this is currently used. 2.119 // XXX Need to suitably abstract and generalize this and the next
3.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Mon Oct 20 15:14:56 2014 -0400 3.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Mon Oct 20 23:02:07 2014 -0700 3.3 @@ -172,6 +172,20 @@ 3.4 // list of size "word_sz", and must now be decremented. 3.5 void par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl); 3.6 3.7 + // Used by par_get_chunk_of_blocks() for the chunks from the 3.8 + // indexed_free_lists. 3.9 + bool par_get_chunk_of_blocks_IFL(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl); 3.10 + 3.11 + // Used by par_get_chunk_of_blocks_dictionary() to get a chunk 3.12 + // evenly splittable into "n" "word_sz" chunks. Returns that 3.13 + // evenly splittable chunk. May split a larger chunk to get the 3.14 + // evenly splittable chunk. 3.15 + FreeChunk* get_n_way_chunk_to_split(size_t word_sz, size_t n); 3.16 + 3.17 + // Used by par_get_chunk_of_blocks() for the chunks from the 3.18 + // dictionary. 3.19 + void par_get_chunk_of_blocks_dictionary(size_t word_sz, size_t n, AdaptiveFreeList<FreeChunk>* fl); 3.20 + 3.21 // Allocation helper functions 3.22 // Allocate using a strategy that takes from the indexed free lists 3.23 // first. This allocation strategy assumes a companion sweeping