Print this page
8236073: G1: Use SoftMaxHeapSize to guide GC heuristics

Split Close
Expand all
Collapse all
          --- old/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp
          +++ new/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp
↓ open down ↓ 89 lines elided ↑ open up ↑
  90   90                                                size_t region_granularity,
  91   91                                                size_t byte_translation_factor,
  92   92                                                MemoryType type);
  93   93  
  94   94    static G1RegionToSpaceMapper* create_heap_mapper(ReservedSpace rs,
  95   95                                                     size_t actual_size,
  96   96                                                     size_t page_size,
  97   97                                                     size_t region_granularity,
  98   98                                                     size_t byte_translation_factor,
  99   99                                                     MemoryType type);
      100 +
      101 +  // If the mapper can commit/uncommit region parallelly
      102 +  virtual bool can_parallelly_commit_and_uncommit() const = 0;
 100  103  };
 101  104  
 102  105  // G1RegionToSpaceMapper implementation where
 103  106  // part of space is mapped to dram and part to nv-dimm
 104  107  class G1RegionToHeteroSpaceMapper : public G1RegionToSpaceMapper {
 105  108  private:
 106  109    ReservedSpace _rs;
 107  110    G1RegionToSpaceMapper* _dram_mapper;
 108  111    uint _num_committed_dram;
 109  112    uint _num_committed_nvdimm;
↓ open down ↓ 3 lines elided ↑ open up ↑
 113  116    MemoryType _type;
 114  117  
 115  118  public:
 116  119    G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commit_factor, MemoryType type);
 117  120    bool initialize();
 118  121    uint num_committed_dram() const;
 119  122    uint num_committed_nvdimm() const;
 120  123  
 121  124    virtual void commit_regions(uint start_idx, size_t num_regions = 1, WorkGang* pretouch_workers = NULL);
 122  125    virtual void uncommit_regions(uint start_idx, size_t num_regions = 1);
      126 +
      127 +  virtual bool can_parallelly_commit_and_uncommit() const;
 123  128  };
 124  129  #endif // SHARE_GC_G1_G1REGIONTOSPACEMAPPER_HPP
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX