src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.hpp
author sangheki
Wed, 13 Nov 2019 10:49:12 -0800
changeset 59060 fce1fa1bdc91
parent 53244 9807daeb47c4
permissions -rw-r--r--
8220310: Implementation: NUMA-Aware Memory Allocation for G1, Mutator (1/3) Reviewed-by: kbarrett, sjohanss, tschatzl, pliden
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53116
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53116
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
53116
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     4
 *
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     7
 * published by the Free Software Foundation.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     8
 *
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    13
 * accompanied this code).
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    14
 *
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    18
 *
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    21
 * questions.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    22
 *
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    23
 */
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53116
diff changeset
    25
#ifndef SHARE_GC_G1_HETEROGENEOUSHEAPREGIONMANAGER_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53116
diff changeset
    26
#define SHARE_GC_G1_HETEROGENEOUSHEAPREGIONMANAGER_HPP
53116
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    27
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    28
#include "gc/g1/heapRegionManager.hpp"
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    29
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    30
// This class manages heap regions on heterogenous memory comprising of dram and nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    31
// Regions in dram (dram_set) are used for young objects and archive regions (CDS).
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    32
// Regions in nv-dimm (nvdimm_set) are used for old objects and humongous objects.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    33
// At any point there are some regions committed on dram and some on nv-dimm with the following guarantees:
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    34
//   1. The total number of regions committed in dram and nv-dimm equals the current size of heap.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    35
//   2. Consequently, total number of regions committed is less than or equal to Xmx.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    36
//   3. To maintain the guarantee stated by 1., whenever one set grows (new regions committed), the other set shrinks (regions un-committed).
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    37
//      3a. If more dram regions are needed (young generation expansion), corresponding number of regions in nv-dimm are un-committed.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    38
//      3b. When old generation or humongous set grows, and new regions need to be committed to nv-dimm, corresponding number of regions
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    39
//            are un-committed in dram.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    40
class HeterogeneousHeapRegionManager : public HeapRegionManager {
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    41
  const uint _max_regions;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    42
  uint _max_dram_regions;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    43
  uint _max_nvdimm_regions;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    44
  uint _start_index_of_nvdimm;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    45
  uint _total_commited_before_full_gc;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    46
  uint _no_borrowed_regions;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    47
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    48
  uint total_regions_committed() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    49
  uint num_committed_dram() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    50
  uint num_committed_nvdimm() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    51
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    52
  // Similar to find_unavailable_from_idx() function from base class, difference is this function searches in range [start, end].
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    53
  uint find_unavailable_in_range(uint start_idx, uint end_idx, uint* res_idx) const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    54
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    55
  // Expand into dram. Maintains the invariant that total number of committed regions is less than current heap size.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    56
  uint expand_dram(uint num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    57
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    58
  // Expand into nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    59
  uint expand_nvdimm(uint num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    60
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    61
  // Expand by finding unavailable regions in [start, end] range.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    62
  uint expand_in_range(uint start, uint end, uint num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    63
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    64
  // Shrink dram set of regions.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    65
  uint shrink_dram(uint num_regions, bool update_free_list = true);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    66
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    67
  // Shrink nv-dimm set of regions.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    68
  uint shrink_nvdimm(uint num_regions, bool update_free_list = true);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    69
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    70
  // Shrink regions from [start, end] range.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    71
  uint shrink_in_range(uint start, uint end, uint num_regions, bool update_free_list = true);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    72
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    73
  // Similar to find_empty_from_idx_reverse() in base class. Only here it searches in a range.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    74
  uint find_empty_in_range_reverse(uint start_idx, uint end_idx, uint* res_idx);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    75
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    76
  // Similar to find_contiguous() in base class, with [start, end] range
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    77
  uint find_contiguous(size_t start, size_t end, size_t num, bool empty_only);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    78
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    79
  // This function is called when there are no free nv-dimm regions.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    80
  // It borrows a region from the set of unavailable regions in nv-dimm for GC purpose.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    81
  HeapRegion* borrow_old_region_for_gc();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    82
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    83
  uint free_list_dram_length() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    84
  uint free_list_nvdimm_length() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    85
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    86
  // is region with given index in nv-dimm?
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    87
  bool is_in_nvdimm(uint index) const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    88
  bool is_in_dram(uint index) const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    89
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    90
public:
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    91
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    92
  // Empty constructor, we'll initialize it with the initialize() method.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    93
  HeterogeneousHeapRegionManager(uint num_regions) : _max_regions(num_regions), _max_dram_regions(0),
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    94
                                                     _max_nvdimm_regions(0), _start_index_of_nvdimm(0),
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    95
                                                     _total_commited_before_full_gc(0), _no_borrowed_regions(0)
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    96
  {}
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    97
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    98
  static HeterogeneousHeapRegionManager* manager();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
    99
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   100
  virtual void initialize(G1RegionToSpaceMapper* heap_storage,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   101
                          G1RegionToSpaceMapper* prev_bitmap,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   102
                          G1RegionToSpaceMapper* next_bitmap,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   103
                          G1RegionToSpaceMapper* bot,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   104
                          G1RegionToSpaceMapper* cardtable,
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   105
                          G1RegionToSpaceMapper* card_counts);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   106
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   107
  uint start_index_of_nvdimm() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   108
  uint start_index_of_dram() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   109
  uint end_index_of_nvdimm() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   110
  uint end_index_of_dram() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   111
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   112
  // Override.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   113
  HeapRegion* get_dummy_region();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   114
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   115
  // Adjust dram_set to provision 'expected_num_regions' regions.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   116
  void adjust_dram_regions(uint expected_num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   117
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   118
  // Prepare heap regions before and after full collection.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   119
  void prepare_for_full_collection_start();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   120
  void prepare_for_full_collection_end();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   121
59060
fce1fa1bdc91 8220310: Implementation: NUMA-Aware Memory Allocation for G1, Mutator (1/3)
sangheki
parents: 53244
diff changeset
   122
  virtual HeapRegion* allocate_free_region(HeapRegionType type, uint node_index);
53116
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   123
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   124
  // Return maximum number of regions that heap can expand to.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   125
  uint max_expandable_length() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   126
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   127
  // Override. Expand in nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   128
  uint expand_by(uint num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   129
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   130
  // Override.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   131
  uint expand_at(uint start, uint num_regions, WorkGang* pretouch_workers);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   132
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   133
  // Override. This function is called for humongous allocation, so we need to find empty regions in nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   134
  uint find_contiguous_only_empty(size_t num);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   135
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   136
  // Override. This function is called for humongous allocation, so we need to find empty or unavailable regions in nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   137
  uint find_contiguous_empty_or_unavailable(size_t num);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   138
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   139
  // Overrides base class implementation to find highest free region in dram.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   140
  uint find_highest_free(bool* expanded);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   141
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   142
  // Override. This fuction is called to shrink the heap, we shrink in dram first then in nv-dimm.
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   143
  uint shrink_by(uint num_regions_to_remove);
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   144
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   145
  bool has_borrowed_regions() const;
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   146
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   147
  void verify();
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   148
};
bb03098c4dde 8211425: Allocation of old generation of java heap on alternate memory devices - G1 GC
sangheki
parents:
diff changeset
   149
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53116
diff changeset
   150
#endif // SHARE_GC_G1_HETEROGENEOUSHEAPREGIONMANAGER_HPP