Mercurial > hg > truffle
changeset 7948:ef1e11845e18
Merge
author | jmasa |
---|---|
date | Mon, 04 Feb 2013 12:01:07 -0800 |
parents | 6fbe8a57549d (current diff) 3c327c2b6782 (diff) |
children | 454d7cc622ab 80518f4ecf32 |
files | src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp src/share/vm/runtime/vmStructs.cpp |
diffstat | 6 files changed, 21 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Mon Feb 04 12:01:07 2013 -0800 @@ -102,7 +102,7 @@ // temporarily disabled). switch (dictionaryChoice) { case FreeBlockDictionary<FreeChunk>::dictionaryBinaryTree: - _dictionary = new BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>(mr); + _dictionary = new AFLBinaryTreeDictionary(mr); break; case FreeBlockDictionary<FreeChunk>::dictionarySplayTree: case FreeBlockDictionary<FreeChunk>::dictionarySkipList: @@ -122,7 +122,8 @@ // moved to its new location before the klass is moved. // Set the _refillSize for the linear allocation blocks if (!use_adaptive_freelists) { - FreeChunk* fc = _dictionary->get_chunk(mr.word_size()); + FreeChunk* fc = _dictionary->get_chunk(mr.word_size(), + FreeBlockDictionary<FreeChunk>::atLeast); // The small linAB initially has all the space and will allocate // a chunk of any size. HeapWord* addr = (HeapWord*) fc; @@ -1647,7 +1648,8 @@ FreeChunk* CompactibleFreeListSpace::getChunkFromDictionary(size_t size) { assert_locked(); - FreeChunk* fc = _dictionary->get_chunk(size); + FreeChunk* fc = _dictionary->get_chunk(size, + FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return NULL; } @@ -1664,7 +1666,8 @@ FreeChunk* CompactibleFreeListSpace::getChunkFromDictionaryExact(size_t size) { assert_locked(); - FreeChunk* fc = _dictionary->get_chunk(size); + FreeChunk* fc = _dictionary->get_chunk(size, + FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return fc; } @@ -1677,7 +1680,8 @@ if (fc->size() < size + MinChunkSize) { // Return the chunk to the dictionary and go get a bigger one. returnChunkToDictionary(fc); - fc = _dictionary->get_chunk(size + MinChunkSize); + fc = _dictionary->get_chunk(size + MinChunkSize, + FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return NULL; }
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Mon Feb 04 12:01:07 2013 -0800 @@ -131,7 +131,7 @@ LinearAllocBlock _smallLinearAllocBlock; FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice; - FreeBlockDictionary<FreeChunk>* _dictionary; // ptr to dictionary for large size blocks + AFLBinaryTreeDictionary* _dictionary; // ptr to dictionary for large size blocks AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize]; // indexed array for small size blocks
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp Mon Feb 04 12:01:07 2013 -0800 @@ -25,8 +25,6 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMSTRUCTS_CMS_HPP #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMSTRUCTS_CMS_HPP -typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionary; - #define VM_STRUCTS_CMS(nonstatic_field, \ volatile_nonstatic_field, \ static_field) \ @@ -42,6 +40,7 @@ static_field(ConcurrentMarkSweepThread, _collector, CMSCollector*) \ nonstatic_field(LinearAllocBlock, _word_size, size_t) \ nonstatic_field(AFLBinaryTreeDictionary, _total_size, size_t) \ + nonstatic_field(CompactibleFreeListSpace, _dictionary, AFLBinaryTreeDictionary*) \ nonstatic_field(CompactibleFreeListSpace, _indexedFreeList[0], FreeList<FreeChunk>) \ nonstatic_field(CompactibleFreeListSpace, _smallLinearAllocBlock, LinearAllocBlock) @@ -62,10 +61,9 @@ declare_toplevel_type(SurrogateLockerThread*) \ declare_toplevel_type(CompactibleFreeListSpace*) \ declare_toplevel_type(CMSCollector*) \ - declare_toplevel_type(AFLBinaryTreeDictionary*) \ + declare_toplevel_type(AFLBinaryTreeDictionary) \ declare_toplevel_type(LinearAllocBlock) \ - declare_toplevel_type(FreeBlockDictionary<FreeChunk>) \ - declare_type(AFLBinaryTreeDictionary, FreeBlockDictionary<FreeChunk>) + declare_toplevel_type(FreeBlockDictionary<FreeChunk>) #define VM_INT_CONSTANTS_CMS(declare_constant) \ declare_constant(Generation::ConcurrentMarkSweep) \
--- a/src/share/vm/memory/binaryTreeDictionary.cpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/memory/binaryTreeDictionary.cpp Mon Feb 04 12:01:07 2013 -0800 @@ -873,7 +873,7 @@ #ifndef SERIALGC template <> -void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::dict_census_update(size_t size, bool split, bool birth){ +void AFLBinaryTreeDictionary::dict_census_update(size_t size, bool split, bool birth){ TreeList<FreeChunk, AdaptiveFreeList>* nd = find_list(size); if (nd) { if (split) { @@ -911,7 +911,7 @@ #ifndef SERIALGC template <> -bool BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::coal_dict_over_populated(size_t size) { +bool AFLBinaryTreeDictionary::coal_dict_over_populated(size_t size) { if (FLSAlwaysCoalesceLarge) return true; TreeList<FreeChunk, AdaptiveFreeList>* list_of_size = find_list(size); @@ -1288,7 +1288,7 @@ #ifndef SERIALGC template <> -void BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>::print_dict_census(void) const { +void AFLBinaryTreeDictionary::print_dict_census(void) const { gclog_or_tty->print("\nBinaryTree\n"); AdaptiveFreeList<FreeChunk>::print_labels_on(gclog_or_tty, "size");
--- a/src/share/vm/memory/binaryTreeDictionary.hpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/memory/binaryTreeDictionary.hpp Mon Feb 04 12:01:07 2013 -0800 @@ -43,6 +43,10 @@ template <class Chunk_t, template <class> class FreeList_t> class DescendTreeCensusClosure; template <class Chunk_t, template <class> class FreeList_t> class DescendTreeSearchClosure; +class FreeChunk; +template <class> class AdaptiveFreeList; +typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionary; + template <class Chunk_t, template <class> class FreeList_t> class TreeList : public FreeList_t<Chunk_t> { friend class TreeChunk<Chunk_t, FreeList_t>;
--- a/src/share/vm/runtime/vmStructs.cpp Fri Jan 25 03:03:23 2013 -0800 +++ b/src/share/vm/runtime/vmStructs.cpp Mon Feb 04 12:01:07 2013 -0800 @@ -2087,8 +2087,7 @@ declare_toplevel_type(FreeBlockDictionary<Metablock>*) \ declare_toplevel_type(FreeList<Metablock>*) \ declare_toplevel_type(FreeList<Metablock>) \ - declare_toplevel_type(MetablockTreeDictionary*) \ - declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>) + declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>) //--------------------------------------------------------------------------------