Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 14309:63a4eb8bcd23
8025856: Fix typos in the GC code
Summary: Fix about 440 typos in comments in the VM code
Reviewed-by: mgerdin, tschatzl, coleenp, kmo, jcoomes
author | jwilhelm |
---|---|
date | Thu, 23 Jan 2014 14:47:23 +0100 |
parents | 71180a6e5080 |
children | 8a9bb7821e28 aa8fab3bed11 |
comparison
equal
deleted
inserted
replaced
14308:870aedf4ba4f | 14309:63a4eb8bcd23 |
---|---|
405 assert_locked(); | 405 assert_locked(); |
406 size_t res = _dictionary->max_chunk_size(); | 406 size_t res = _dictionary->max_chunk_size(); |
407 res = MAX2(res, MIN2(_smallLinearAllocBlock._word_size, | 407 res = MAX2(res, MIN2(_smallLinearAllocBlock._word_size, |
408 (size_t) SmallForLinearAlloc - 1)); | 408 (size_t) SmallForLinearAlloc - 1)); |
409 // XXX the following could potentially be pretty slow; | 409 // XXX the following could potentially be pretty slow; |
410 // should one, pesimally for the rare cases when res | 410 // should one, pessimistically for the rare cases when res |
411 // caclulated above is less than IndexSetSize, | 411 // calculated above is less than IndexSetSize, |
412 // just return res calculated above? My reasoning was that | 412 // just return res calculated above? My reasoning was that |
413 // those cases will be so rare that the extra time spent doesn't | 413 // those cases will be so rare that the extra time spent doesn't |
414 // really matter.... | 414 // really matter.... |
415 // Note: do not change the loop test i >= res + IndexSetStride | 415 // Note: do not change the loop test i >= res + IndexSetStride |
416 // to i > res below, because i is unsigned and res may be zero. | 416 // to i > res below, because i is unsigned and res may be zero. |
757 | 757 |
758 | 758 |
759 // Note on locking for the space iteration functions: | 759 // Note on locking for the space iteration functions: |
760 // since the collector's iteration activities are concurrent with | 760 // since the collector's iteration activities are concurrent with |
761 // allocation activities by mutators, absent a suitable mutual exclusion | 761 // allocation activities by mutators, absent a suitable mutual exclusion |
762 // mechanism the iterators may go awry. For instace a block being iterated | 762 // mechanism the iterators may go awry. For instance a block being iterated |
763 // may suddenly be allocated or divided up and part of it allocated and | 763 // may suddenly be allocated or divided up and part of it allocated and |
764 // so on. | 764 // so on. |
765 | 765 |
766 // Apply the given closure to each block in the space. | 766 // Apply the given closure to each block in the space. |
767 void CompactibleFreeListSpace::blk_iterate_careful(BlkClosureCareful* cl) { | 767 void CompactibleFreeListSpace::blk_iterate_careful(BlkClosureCareful* cl) { |
2088 } | 2088 } |
2089 } | 2089 } |
2090 | 2090 |
2091 // Support for concurrent collection policy decisions. | 2091 // Support for concurrent collection policy decisions. |
2092 bool CompactibleFreeListSpace::should_concurrent_collect() const { | 2092 bool CompactibleFreeListSpace::should_concurrent_collect() const { |
2093 // In the future we might want to add in frgamentation stats -- | 2093 // In the future we might want to add in fragmentation stats -- |
2094 // including erosion of the "mountain" into this decision as well. | 2094 // including erosion of the "mountain" into this decision as well. |
2095 return !adaptive_freelists() && linearAllocationWouldFail(); | 2095 return !adaptive_freelists() && linearAllocationWouldFail(); |
2096 } | 2096 } |
2097 | 2097 |
2098 // Support for compaction | 2098 // Support for compaction |
2099 | 2099 |
2100 void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) { | 2100 void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) { |
2101 SCAN_AND_FORWARD(cp,end,block_is_obj,block_size); | 2101 SCAN_AND_FORWARD(cp,end,block_is_obj,block_size); |
2102 // prepare_for_compaction() uses the space between live objects | 2102 // Prepare_for_compaction() uses the space between live objects |
2103 // so that later phase can skip dead space quickly. So verification | 2103 // so that later phase can skip dead space quickly. So verification |
2104 // of the free lists doesn't work after. | 2104 // of the free lists doesn't work after. |
2105 } | 2105 } |
2106 | 2106 |
2107 #define obj_size(q) adjustObjectSize(oop(q)->size()) | 2107 #define obj_size(q) adjustObjectSize(oop(q)->size()) |
2120 | 2120 |
2121 void CompactibleFreeListSpace::compact() { | 2121 void CompactibleFreeListSpace::compact() { |
2122 SCAN_AND_COMPACT(obj_size); | 2122 SCAN_AND_COMPACT(obj_size); |
2123 } | 2123 } |
2124 | 2124 |
2125 // fragmentation_metric = 1 - [sum of (fbs**2) / (sum of fbs)**2] | 2125 // Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2] |
2126 // where fbs is free block sizes | 2126 // where fbs is free block sizes |
2127 double CompactibleFreeListSpace::flsFrag() const { | 2127 double CompactibleFreeListSpace::flsFrag() const { |
2128 size_t itabFree = totalSizeInIndexedFreeLists(); | 2128 size_t itabFree = totalSizeInIndexedFreeLists(); |
2129 double frag = 0.0; | 2129 double frag = 0.0; |
2130 size_t i; | 2130 size_t i; |
2649 // may not be quick enough, giving rise to large scavenge pauses | 2649 // may not be quick enough, giving rise to large scavenge pauses |
2650 // during these phase changes. It is beneficial to detect such | 2650 // during these phase changes. It is beneficial to detect such |
2651 // changes on-the-fly during a scavenge and avoid such a phase-change | 2651 // changes on-the-fly during a scavenge and avoid such a phase-change |
2652 // pothole. The following code is a heuristic attempt to do that. | 2652 // pothole. The following code is a heuristic attempt to do that. |
2653 // It is protected by a product flag until we have gained | 2653 // It is protected by a product flag until we have gained |
2654 // enough experience with this heuristic and fine-tuned its behaviour. | 2654 // enough experience with this heuristic and fine-tuned its behavior. |
2655 // WARNING: This might increase fragmentation if we overreact to | 2655 // WARNING: This might increase fragmentation if we overreact to |
2656 // small spikes, so some kind of historical smoothing based on | 2656 // small spikes, so some kind of historical smoothing based on |
2657 // previous experience with the greater reactivity might be useful. | 2657 // previous experience with the greater reactivity might be useful. |
2658 // Lacking sufficient experience, CMSOldPLABResizeQuicker is disabled by | 2658 // Lacking sufficient experience, CMSOldPLABResizeQuicker is disabled by |
2659 // default. | 2659 // default. |