hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp
changeset 31346 a70d45c06136
parent 30874 18714bae50db
child 31592 43f48e165466
equal deleted inserted replaced
31345:1bba15125d8d 31346:a70d45c06136
   101   CollectionSetChooser();
   101   CollectionSetChooser();
   102 
   102 
   103   void sort_regions();
   103   void sort_regions();
   104 
   104 
   105   // Determine whether to add the given region to the CSet chooser or
   105   // Determine whether to add the given region to the CSet chooser or
   106   // not. Currently, we skip humongous regions (we never add them to
   106   // not. Currently, we skip pinned regions and regions whose live
   107   // the CSet, we only reclaim them during cleanup) and regions whose
   107   // bytes are over the threshold. Humongous regions may be reclaimed during cleanup.
   108   // live bytes are over the threshold.
       
   109   bool should_add(HeapRegion* hr) {
   108   bool should_add(HeapRegion* hr) {
   110     assert(hr->is_marked(), "pre-condition");
   109     assert(hr->is_marked(), "pre-condition");
   111     assert(!hr->is_young(), "should never consider young regions");
   110     assert(!hr->is_young(), "should never consider young regions");
   112     return !hr->is_humongous() &&
   111     return !hr->is_pinned() &&
   113             hr->live_bytes() < _region_live_threshold_bytes;
   112             hr->live_bytes() < _region_live_threshold_bytes;
   114   }
   113   }
   115 
   114 
   116   // Returns the number candidate old regions added
   115   // Returns the number candidate old regions added
   117   uint length() { return _length; }
   116   uint length() { return _length; }