Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 6818:22b8d3d181d9
8000351: Tenuring threshold should be unsigned
Summary: Change the flags and variables related to tenuring threshold to be unsigned
Reviewed-by: jmasa, johnc
author | jwilhelm |
---|---|
date | Wed, 03 Oct 2012 20:31:41 +0200 |
parents | da91efe96a93 |
children | 37f7535e5f18 |
comparison
equal
deleted
inserted
replaced
6817:f81a7c0c618d | 6818:22b8d3d181d9 |
---|---|
838 // | 838 // |
839 // Survivor regions policy. | 839 // Survivor regions policy. |
840 // | 840 // |
841 | 841 |
842 // Current tenuring threshold, set to 0 if the collector reaches the | 842 // Current tenuring threshold, set to 0 if the collector reaches the |
843 // maximum amount of suvivors regions. | 843 // maximum amount of survivors regions. |
844 int _tenuring_threshold; | 844 uint _tenuring_threshold; |
845 | 845 |
846 // The limit on the number of regions allocated for survivors. | 846 // The limit on the number of regions allocated for survivors. |
847 uint _max_survivor_regions; | 847 uint _max_survivor_regions; |
848 | 848 |
849 // For reporting purposes. | 849 // For reporting purposes. |
850 size_t _eden_bytes_before_gc; | 850 size_t _eden_bytes_before_gc; |
851 size_t _survivor_bytes_before_gc; | 851 size_t _survivor_bytes_before_gc; |
852 size_t _capacity_before_gc; | 852 size_t _capacity_before_gc; |
853 | 853 |
854 // The amount of survor regions after a collection. | 854 // The amount of survivor regions after a collection. |
855 uint _recorded_survivor_regions; | 855 uint _recorded_survivor_regions; |
856 // List of survivor regions. | 856 // List of survivor regions. |
857 HeapRegion* _recorded_survivor_head; | 857 HeapRegion* _recorded_survivor_head; |
858 HeapRegion* _recorded_survivor_tail; | 858 HeapRegion* _recorded_survivor_tail; |
859 | 859 |
860 ageTable _survivors_age_table; | 860 ageTable _survivors_age_table; |
861 | 861 |
862 public: | 862 public: |
863 | 863 |
864 inline GCAllocPurpose | 864 inline GCAllocPurpose |
865 evacuation_destination(HeapRegion* src_region, int age, size_t word_sz) { | 865 evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) { |
866 if (age < _tenuring_threshold && src_region->is_young()) { | 866 if (age < _tenuring_threshold && src_region->is_young()) { |
867 return GCAllocForSurvived; | 867 return GCAllocForSurvived; |
868 } else { | 868 } else { |
869 return GCAllocForTenured; | 869 return GCAllocForTenured; |
870 } | 870 } |