src/hotspot/share/gc/serial/serialHeap.hpp
author stefank
Thu, 22 Feb 2018 18:37:23 +0100
changeset 49049 effb50eeea4e
parent 48961 120b61d50f85
child 49628 88478047bc8f
permissions -rw-r--r--
8198528: Move GenerationSpecs from GenCollectorPolicy to GenCollectedHeap Reviewed-by: pliden, sjohanss, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     1
/*
48961
120b61d50f85 8195103: Refactor out card table from CardTableModRefBS to flatten the BarrierSet hierarchy
eosterlund
parents: 48168
diff changeset
     2
 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     4
 *
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     8
 *
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    13
 * accompanied this code).
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    14
 *
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    18
 *
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    21
 * questions.
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    22
 *
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    23
 */
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    24
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    25
#ifndef SHARE_VM_GC_SERIAL_SERIALHEAP_HPP
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    26
#define SHARE_VM_GC_SERIAL_SERIALHEAP_HPP
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    27
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    28
#include "gc/shared/genCollectedHeap.hpp"
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    29
#include "utilities/growableArray.hpp"
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    30
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    31
class GenCollectorPolicy;
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    32
class GCMemoryManager;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    33
class MemoryPool;
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    34
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    35
class SerialHeap : public GenCollectedHeap {
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    36
private:
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    37
  MemoryPool* _eden_pool;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    38
  MemoryPool* _survivor_pool;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    39
  MemoryPool* _old_pool;
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    40
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    41
  virtual void initialize_serviceability();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    42
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    43
protected:
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    44
  virtual void check_gen_kinds();
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    45
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    46
public:
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    47
  SerialHeap(GenCollectorPolicy* policy);
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    48
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    49
  virtual Name kind() const {
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    50
    return CollectedHeap::SerialHeap;
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    51
  }
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    52
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    53
  virtual const char* name() const {
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    54
    return "Serial";
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    55
  }
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    56
48168
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    57
  virtual GrowableArray<GCMemoryManager*> memory_managers();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    58
  virtual GrowableArray<MemoryPool*> memory_pools();
cb5d2d4453d0 8191564: Refactor GC related servicability code into GC specific subclasses
rkennke
parents: 47819
diff changeset
    59
47819
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    60
  // override
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    61
  virtual bool is_in_closed_subset(const void* p) const {
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    62
    return is_in(p);
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    63
  }
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    64
};
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    65
ee36a8e36561 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass
rkennke
parents:
diff changeset
    66
#endif // SHARE_VM_GC_CMS_CMSHEAP_HPP