src/hotspot/share/gc/shenandoah/vmStructs_shenandoah.hpp
author stefank
Tue, 26 Nov 2019 10:47:46 +0100
changeset 59290 97d13893ec3c
parent 54388 a1acc800c87a
permissions -rw-r--r--
8234748: Clean up atomic and orderAccess includes Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     1
/*
54388
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
     2
 * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     3
 *
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     6
 * published by the Free Software Foundation.
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     7
 *
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    12
 * accompanied this code).
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    13
 *
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    17
 *
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    20
 * questions.
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    21
 *
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    22
 */
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52925
diff changeset
    23
#ifndef SHARE_GC_SHENANDOAH_VMSTRUCTS_SHENANDOAH_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52925
diff changeset
    24
#define SHARE_GC_SHENANDOAH_VMSTRUCTS_SHENANDOAH_HPP
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    25
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    26
#include "gc/shenandoah/shenandoahHeap.hpp"
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    27
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    28
#include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    29
54388
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    30
#define VM_STRUCTS_SHENANDOAH(nonstatic_field, volatile_nonstatic_field, static_field)                \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    31
  nonstatic_field(ShenandoahHeap, _num_regions,                    size_t)                            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    32
  nonstatic_field(ShenandoahHeap, _regions,                        ShenandoahHeapRegion**)            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    33
  nonstatic_field(ShenandoahHeap, _log_min_obj_alignment_in_bytes, int)                               \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    34
  volatile_nonstatic_field(ShenandoahHeap, _used,                  size_t)                            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    35
  volatile_nonstatic_field(ShenandoahHeap, _committed,             size_t)                            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    36
  static_field(ShenandoahHeapRegion, RegionSizeBytes,              size_t)                            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    37
  static_field(ShenandoahHeapRegion, RegionSizeBytesShift,         size_t)                            \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    38
  nonstatic_field(ShenandoahHeapRegion, _state,                    ShenandoahHeapRegion::RegionState) \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    39
  nonstatic_field(ShenandoahHeapRegion, _region_number,            size_t)                            \
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    40
54388
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    41
#define VM_INT_CONSTANTS_SHENANDOAH(declare_constant, declare_constant_with_value) \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    42
  declare_constant(ShenandoahHeapRegion::_empty_uncommitted)                       \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    43
  declare_constant(ShenandoahHeapRegion::_empty_committed)                         \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    44
  declare_constant(ShenandoahHeapRegion::_regular)                                 \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    45
  declare_constant(ShenandoahHeapRegion::_humongous_start)                         \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    46
  declare_constant(ShenandoahHeapRegion::_humongous_cont)                          \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    47
  declare_constant(ShenandoahHeapRegion::_pinned_humongous_start)                  \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    48
  declare_constant(ShenandoahHeapRegion::_cset)                                    \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    49
  declare_constant(ShenandoahHeapRegion::_pinned)                                  \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    50
  declare_constant(ShenandoahHeapRegion::_pinned_cset)                             \
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    51
  declare_constant(ShenandoahHeapRegion::_trash)                                   \
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    52
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    53
#define VM_TYPES_SHENANDOAH(declare_type,                                     \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    54
                            declare_toplevel_type,                            \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    55
                            declare_integer_type)                             \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    56
  declare_type(ShenandoahHeap, CollectedHeap)                                 \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    57
  declare_type(ShenandoahHeapRegion, ContiguousSpace)                         \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    58
  declare_toplevel_type(ShenandoahHeap*)                                      \
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    59
  declare_toplevel_type(ShenandoahHeapRegion*)                                \
54388
a1acc800c87a 8220602: Shenandoah-SA: Enable best-effort implementation of heap walk
zgu
parents: 53244
diff changeset
    60
  declare_toplevel_type(ShenandoahHeapRegion::RegionState)                    \
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents:
diff changeset
    61
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52925
diff changeset
    62
#endif // SHARE_GC_SHENANDOAH_VMSTRUCTS_SHENANDOAH_HPP