src/hotspot/share/gc/shared/genMemoryPools.hpp
author stefank
Mon, 25 Nov 2019 12:31:39 +0100
changeset 59249 29b0d0b61615
parent 53244 9807daeb47c4
permissions -rw-r--r--
8234737: Harmonize parameter order in Atomic - add Reviewed-by: rehn, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48168
diff changeset
     2
 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     4
 *
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     8
 *
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    13
 * accompanied this code).
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    14
 *
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    18
 *
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    21
 * questions.
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    22
 *
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    23
 */
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48168
diff changeset
    25
#ifndef SHARE_GC_SHARED_GENMEMORYPOOLS_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48168
diff changeset
    26
#define SHARE_GC_SHARED_GENMEMORYPOOLS_HPP
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    27
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    28
#include "services/memoryPool.hpp"
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    29
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    30
class ContiguousSpace;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    31
class DefNewGeneration;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    32
class Generation;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    33
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    34
class ContiguousSpacePool : public CollectedMemoryPool {
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    35
private:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    36
  ContiguousSpace* _space;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    37
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    38
public:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    39
  ContiguousSpacePool(ContiguousSpace* space,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    40
                      const char* name,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    41
                      size_t max_size,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    42
                      bool support_usage_threshold);
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    43
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    44
  ContiguousSpace* space() { return _space; }
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    45
  MemoryUsage get_memory_usage();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    46
  size_t used_in_bytes();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    47
};
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    48
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    49
class SurvivorContiguousSpacePool : public CollectedMemoryPool {
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    50
private:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    51
  DefNewGeneration* _young_gen;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    52
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    53
public:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    54
  SurvivorContiguousSpacePool(DefNewGeneration* young_gen,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    55
                              const char* name,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    56
                              size_t max_size,
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    57
                              bool support_usage_threshold);
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    58
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    59
  MemoryUsage get_memory_usage();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    60
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    61
  size_t used_in_bytes();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    62
  size_t committed_in_bytes();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    63
};
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    64
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    65
class GenerationPool : public CollectedMemoryPool {
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    66
private:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    67
  Generation* _gen;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    68
public:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    69
  GenerationPool(Generation* gen, const char* name, bool support_usage_threshold);
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    70
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    71
  MemoryUsage get_memory_usage();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    72
  size_t used_in_bytes();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    73
};
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents:
diff changeset
    74
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48168
diff changeset
    75
#endif // SHARE_GC_SHARED_GENMEMORYPOOLS_HPP