src/hotspot/share/gc/shared/genArguments.hpp
author stefank
Mon, 15 Apr 2019 11:47:46 +0200
changeset 54678 93f09ca4a7f8
permissions -rw-r--r--
8198505: Remove CollectorPolicy and its subclasses Reviewed-by: pliden, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54678
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     1
/*
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     4
 *
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     8
 *
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    13
 * accompanied this code).
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    14
 *
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    18
 *
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    21
 * questions.
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    22
 *
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    23
 */
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    24
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    25
#ifndef SHARE_GC_SHARED_GENARGUMENTS_HPP
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    26
#define SHARE_GC_SHARED_GENARGUMENTS_HPP
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    27
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    28
#include "gc/shared/gcArguments.hpp"
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    29
#include "utilities/debug.hpp"
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    30
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    31
extern size_t MinNewSize;
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    32
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    33
extern size_t MinOldSize;
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    34
extern size_t MaxOldSize;
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    35
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    36
extern size_t GenAlignment;
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    37
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    38
class GenArguments : public GCArguments {
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    39
  friend class TestGenCollectorPolicy; // Testing
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    40
private:
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    41
  virtual void initialize_alignments();
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    42
  virtual void initialize_size_info();
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    43
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    44
  // Return the (conservative) maximum heap alignment
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    45
  virtual size_t conservative_max_heap_alignment();
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    46
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    47
  DEBUG_ONLY(void assert_flags();)
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    48
  DEBUG_ONLY(void assert_size_info();)
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    49
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    50
  static size_t scale_by_NewRatio_aligned(size_t base_size, size_t alignment);
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    51
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    52
protected:
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    53
  virtual void initialize_heap_flags_and_sizes();
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    54
};
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    55
93f09ca4a7f8 8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
diff changeset
    56
#endif // SHARE_GC_SHARED_GENARGUMENTS_HPP