src/hotspot/share/gc/parallel/heterogeneousGenerationSizer.hpp
author lkorinth
Mon, 25 Mar 2019 14:46:55 +0100
changeset 54264 41af8d0546bc
parent 53244 9807daeb47c4
permissions -rw-r--r--
8221260: Initialize more class members on construction, remove some unused ones Reviewed-by: kbarrett, tschatzl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     4
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     7
 * published by the Free Software Foundation.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     8
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    13
 * accompanied this code).
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    14
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    18
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    21
 * questions.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    22
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    23
 */
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    25
#ifndef SHARE_GC_PARALLEL_HETEROGENEOUSGENERATIONSIZER_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    26
#define SHARE_GC_PARALLEL_HETEROGENEOUSGENERATIONSIZER_HPP
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    27
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    28
#include "gc/parallel/generationSizer.hpp"
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    29
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    30
// There is a nice batch of tested generation sizing code in
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    31
// GenCollectorPolicy. Lets reuse it!
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    32
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    33
class HeterogeneousGenerationSizer : public GenerationSizer {
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    34
private:
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    35
  // Max fraction of dram to use for young generation when MaxRAMFraction and
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    36
  // MaxRAMPercentage are not specified on commandline.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    37
  static const double MaxRamFractionForYoung;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    38
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    39
protected:
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    40
  virtual void initialize_flags();
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    41
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    42
public:
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    43
  virtual size_t heap_reserved_size_bytes() const;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    44
  virtual bool is_hetero_heap() const;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    45
};
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    46
#endif // SHARE_GC_PARALLEL_HETEROGENEOUSGENERATIONSIZER_HPP