comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 4728:441e946dc1af

7121618: Change type of number of GC workers to unsigned int. Summary: Change variables representing the number of GC workers to uint from int and size_t. Change the parameter in work(int i) to work(uint worker_id). Reviewed-by: brutisso, tonyp
author jmasa
date Wed, 14 Dec 2011 13:34:57 -0800
parents bca17e38de00
children b632e80fc9dc
comparison
equal deleted inserted replaced
4727:67fdcb391461 4728:441e946dc1af
2596 // command-line, this will get reinitialized via a call to 2596 // command-line, this will get reinitialized via a call to
2597 // modify_initialization() below. 2597 // modify_initialization() below.
2598 AdaptiveWeightedAverage CFLS_LAB::_blocks_to_claim[] = 2598 AdaptiveWeightedAverage CFLS_LAB::_blocks_to_claim[] =
2599 VECTOR_257(AdaptiveWeightedAverage(OldPLABWeight, (float)CMSParPromoteBlocksToClaim)); 2599 VECTOR_257(AdaptiveWeightedAverage(OldPLABWeight, (float)CMSParPromoteBlocksToClaim));
2600 size_t CFLS_LAB::_global_num_blocks[] = VECTOR_257(0); 2600 size_t CFLS_LAB::_global_num_blocks[] = VECTOR_257(0);
2601 int CFLS_LAB::_global_num_workers[] = VECTOR_257(0); 2601 uint CFLS_LAB::_global_num_workers[] = VECTOR_257(0);
2602 2602
2603 CFLS_LAB::CFLS_LAB(CompactibleFreeListSpace* cfls) : 2603 CFLS_LAB::CFLS_LAB(CompactibleFreeListSpace* cfls) :
2604 _cfls(cfls) 2604 _cfls(cfls)
2605 { 2605 {
2606 assert(CompactibleFreeListSpace::IndexSetSize == 257, "Modify VECTOR_257() macro above"); 2606 assert(CompactibleFreeListSpace::IndexSetSize == 257, "Modify VECTOR_257() macro above");
2730 // Mutex::_no_safepoint_check_flag); 2730 // Mutex::_no_safepoint_check_flag);
2731 2731
2732 // Update globals stats for num_blocks used 2732 // Update globals stats for num_blocks used
2733 _global_num_blocks[i] += (_num_blocks[i] - num_retire); 2733 _global_num_blocks[i] += (_num_blocks[i] - num_retire);
2734 _global_num_workers[i]++; 2734 _global_num_workers[i]++;
2735 assert(_global_num_workers[i] <= (ssize_t)ParallelGCThreads, "Too big"); 2735 assert(_global_num_workers[i] <= ParallelGCThreads, "Too big");
2736 if (num_retire > 0) { 2736 if (num_retire > 0) {
2737 _cfls->_indexedFreeList[i].prepend(&_indexedFreeList[i]); 2737 _cfls->_indexedFreeList[i].prepend(&_indexedFreeList[i]);
2738 // Reset this list. 2738 // Reset this list.
2739 _indexedFreeList[i] = FreeList(); 2739 _indexedFreeList[i] = FreeList();
2740 _indexedFreeList[i].set_size(i); 2740 _indexedFreeList[i].set_size(i);