2542 (double)(total.desired() - total.count())/(total.desired() != 0 ? (double)total.desired() : 1.0)); 2543 _dictionary->print_dict_census(); 2544 } 2545 2546 /////////////////////////////////////////////////////////////////////////// 2547 // CFLS_LAB 2548 /////////////////////////////////////////////////////////////////////////// 2549 2550 #define VECTOR_257(x) \ 2551 /* 1 2 3 4 5 6 7 8 9 1x 11 12 13 14 15 16 17 18 19 2x 21 22 23 24 25 26 27 28 29 3x 31 32 */ \ 2552 { x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2553 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2554 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2555 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2556 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2557 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2558 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2559 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2560 x } 2561 2562 // Initialize with default setting of CMSParPromoteBlocksToClaim, _not_ 2563 // OldPLABSize, whose static default is different; if overridden at the 2564 // command-line, this will get reinitialized via a call to 2565 // modify_initialization() below. 2566 AdaptiveWeightedAverage CFLS_LAB::_blocks_to_claim[] = 2567 VECTOR_257(AdaptiveWeightedAverage(OldPLABWeight, (float)CMSParPromoteBlocksToClaim)); 2568 size_t CFLS_LAB::_global_num_blocks[] = VECTOR_257(0); 2569 uint CFLS_LAB::_global_num_workers[] = VECTOR_257(0); 2570 2571 CFLS_LAB::CFLS_LAB(CompactibleFreeListSpace* cfls) : 2572 _cfls(cfls) 2573 { 2574 assert(CompactibleFreeListSpace::IndexSetSize == 257, "Modify VECTOR_257() macro above"); 2575 for (size_t i = CompactibleFreeListSpace::IndexSetStart; 2576 i < CompactibleFreeListSpace::IndexSetSize; 2577 i += CompactibleFreeListSpace::IndexSetStride) { 2578 _indexedFreeList[i].set_size(i); 2579 _num_blocks[i] = 0; 2580 } 2581 } 2582 2583 static bool _CFLS_LAB_modified = false; 2584 2585 void CFLS_LAB::modify_initialization(size_t n, unsigned wt) { 2586 assert(!_CFLS_LAB_modified, "Call only once"); 2587 _CFLS_LAB_modified = true; | 2542 (double)(total.desired() - total.count())/(total.desired() != 0 ? (double)total.desired() : 1.0)); 2543 _dictionary->print_dict_census(); 2544 } 2545 2546 /////////////////////////////////////////////////////////////////////////// 2547 // CFLS_LAB 2548 /////////////////////////////////////////////////////////////////////////// 2549 2550 #define VECTOR_257(x) \ 2551 /* 1 2 3 4 5 6 7 8 9 1x 11 12 13 14 15 16 17 18 19 2x 21 22 23 24 25 26 27 28 29 3x 31 32 */ \ 2552 { x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2553 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2554 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2555 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2556 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2557 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2558 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2559 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, \ 2560 x } 2561 2562 // Initialize with default setting for CMS, _not_ 2563 // generic OldPLABSize, whose static default is different; if overridden at the 2564 // command-line, this will get reinitialized via a call to 2565 // modify_initialization() below. 2566 AdaptiveWeightedAverage CFLS_LAB::_blocks_to_claim[] = 2567 VECTOR_257(AdaptiveWeightedAverage(OldPLABWeight, (float)CFLS_LAB::_default_dynamic_old_plab_size)); 2568 size_t CFLS_LAB::_global_num_blocks[] = VECTOR_257(0); 2569 uint CFLS_LAB::_global_num_workers[] = VECTOR_257(0); 2570 2571 CFLS_LAB::CFLS_LAB(CompactibleFreeListSpace* cfls) : 2572 _cfls(cfls) 2573 { 2574 assert(CompactibleFreeListSpace::IndexSetSize == 257, "Modify VECTOR_257() macro above"); 2575 for (size_t i = CompactibleFreeListSpace::IndexSetStart; 2576 i < CompactibleFreeListSpace::IndexSetSize; 2577 i += CompactibleFreeListSpace::IndexSetStride) { 2578 _indexedFreeList[i].set_size(i); 2579 _num_blocks[i] = 0; 2580 } 2581 } 2582 2583 static bool _CFLS_LAB_modified = false; 2584 2585 void CFLS_LAB::modify_initialization(size_t n, unsigned wt) { 2586 assert(!_CFLS_LAB_modified, "Call only once"); 2587 _CFLS_LAB_modified = true; |