662 // The space that this buffer allocates into. 663 CompactibleFreeListSpace* _cfls; 664 665 // Our local free lists. 666 AdaptiveFreeList<FreeChunk> _indexedFreeList[CompactibleFreeListSpace::IndexSetSize]; 667 668 // Initialized from a command-line arg. 669 670 // Allocation statistics in support of dynamic adjustment of 671 // #blocks to claim per get_from_global_pool() call below. 672 static AdaptiveWeightedAverage 673 _blocks_to_claim [CompactibleFreeListSpace::IndexSetSize]; 674 static size_t _global_num_blocks [CompactibleFreeListSpace::IndexSetSize]; 675 static uint _global_num_workers[CompactibleFreeListSpace::IndexSetSize]; 676 size_t _num_blocks [CompactibleFreeListSpace::IndexSetSize]; 677 678 // Internal work method 679 void get_from_global_pool(size_t word_sz, AdaptiveFreeList<FreeChunk>* fl); 680 681 public: 682 CFLS_LAB(CompactibleFreeListSpace* cfls); 683 684 // Allocate and return a block of the given size, or else return NULL. 685 HeapWord* alloc(size_t word_sz); 686 687 // Return any unused portions of the buffer to the global pool. 688 void retire(int tid); 689 690 // Dynamic OldPLABSize sizing 691 static void compute_desired_plab_size(); 692 // When the settings are modified from default static initialization 693 static void modify_initialization(size_t n, unsigned wt); 694 }; 695 696 size_t PromotionInfo::refillSize() const { 697 const size_t CMSSpoolBlockSize = 256; 698 const size_t sz = heap_word_size(sizeof(SpoolBlock) + sizeof(markOop) 699 * CMSSpoolBlockSize); 700 return CompactibleFreeListSpace::adjustObjectSize(sz); 701 } | 662 // The space that this buffer allocates into. 663 CompactibleFreeListSpace* _cfls; 664 665 // Our local free lists. 666 AdaptiveFreeList<FreeChunk> _indexedFreeList[CompactibleFreeListSpace::IndexSetSize]; 667 668 // Initialized from a command-line arg. 669 670 // Allocation statistics in support of dynamic adjustment of 671 // #blocks to claim per get_from_global_pool() call below. 672 static AdaptiveWeightedAverage 673 _blocks_to_claim [CompactibleFreeListSpace::IndexSetSize]; 674 static size_t _global_num_blocks [CompactibleFreeListSpace::IndexSetSize]; 675 static uint _global_num_workers[CompactibleFreeListSpace::IndexSetSize]; 676 size_t _num_blocks [CompactibleFreeListSpace::IndexSetSize]; 677 678 // Internal work method 679 void get_from_global_pool(size_t word_sz, AdaptiveFreeList<FreeChunk>* fl); 680 681 public: 682 static const int defaultDynamicOldPLABSize = 16; 683 static const int defaultStaticOldPLABSize = 50; 684 685 CFLS_LAB(CompactibleFreeListSpace* cfls); 686 687 // Allocate and return a block of the given size, or else return NULL. 688 HeapWord* alloc(size_t word_sz); 689 690 // Return any unused portions of the buffer to the global pool. 691 void retire(int tid); 692 693 // Dynamic OldPLABSize sizing 694 static void compute_desired_plab_size(); 695 // When the settings are modified from default static initialization 696 static void modify_initialization(size_t n, unsigned wt); 697 }; 698 699 size_t PromotionInfo::refillSize() const { 700 const size_t CMSSpoolBlockSize = 256; 701 const size_t sz = heap_word_size(sizeof(SpoolBlock) + sizeof(markOop) 702 * CMSSpoolBlockSize); 703 return CompactibleFreeListSpace::adjustObjectSize(sz); 704 } |