src/hotspot/share/gc/z/zForwarding.inline.hpp
author pliden
Mon, 18 Mar 2019 11:50:39 +0100
changeset 54162 f344a0c6e19e
parent 53244 src/hotspot/share/gc/z/zForwardingTable.inline.hpp@9807daeb47c4
child 54163 790679f86a51
permissions -rw-r--r--
8220587: ZGC: Break out forwarding information from ZPage Reviewed-by: stefank, eosterlund
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50875
diff changeset
     2
 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     4
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     7
 * published by the Free Software Foundation.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     8
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    13
 * accompanied this code).
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    14
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    18
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    21
 * questions.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    22
 */
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    23
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    24
#ifndef SHARE_GC_Z_ZFORWARDING_INLINE_HPP
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    25
#define SHARE_GC_Z_ZFORWARDING_INLINE_HPP
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    26
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    27
#include "gc/z/zForwarding.hpp"
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    28
#include "gc/z/zGlobals.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    29
#include "gc/z/zHash.inline.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    30
#include "runtime/atomic.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    31
#include "utilities/debug.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    32
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    33
inline uintptr_t ZForwarding::start() const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    34
  return _start;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    35
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    36
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    37
inline size_t ZForwarding::object_alignment_shift() const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    38
  return _object_alignment_shift;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    39
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    40
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    41
inline bool ZForwarding::inc_refcount() {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    42
  uint32_t refcount = Atomic::load(&_refcount);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    43
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    44
  while (refcount > 0) {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    45
    const uint32_t old_refcount = refcount;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    46
    const uint32_t new_refcount = old_refcount + 1;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    47
    const uint32_t prev_refcount = Atomic::cmpxchg(new_refcount, &_refcount, old_refcount);
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    48
    if (prev_refcount == old_refcount) {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    49
      return true;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    50
    }
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    51
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    52
    refcount = prev_refcount;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    53
  }
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    54
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    55
  return false;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    56
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    57
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    58
inline bool ZForwarding::dec_refcount() {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    59
  assert(_refcount > 0, "Invalid state");
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    60
  return Atomic::sub(1u, &_refcount) == 0u;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    61
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    62
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    63
inline bool ZForwarding::is_pinned() const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    64
  return Atomic::load(&_pinned);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    65
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    66
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    67
inline void ZForwarding::set_pinned() {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    68
  Atomic::store(true, &_pinned);
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    69
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    70
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    71
inline ZForwardingEntry* ZForwarding::entries() const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    72
  return reinterpret_cast<ZForwardingEntry*>(reinterpret_cast<uintptr_t>(this) + sizeof(*this));
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    73
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    74
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    75
inline ZForwardingEntry ZForwarding::at(ZForwardingCursor* cursor) const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    76
  return Atomic::load(entries() + *cursor);
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    77
}
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    78
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    79
inline ZForwardingEntry ZForwarding::first(uintptr_t from_index, ZForwardingCursor* cursor) const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    80
  const uint32_t mask = _nentries - 1;
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    81
  const uint32_t hash = ZHash::uint32_to_uint32((uint32_t)from_index);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    82
  *cursor = hash & mask;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    83
  return at(cursor);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    84
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    85
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    86
inline ZForwardingEntry ZForwarding::next(ZForwardingCursor* cursor) const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    87
  const uint32_t mask = _nentries - 1;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    88
  *cursor = (*cursor + 1) & mask;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    89
  return at(cursor);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    90
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    91
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    92
inline ZForwardingEntry ZForwarding::find(uintptr_t from_index) const {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    93
  ZForwardingCursor dummy;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    94
  return find(from_index, &dummy);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    95
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    96
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
    97
inline ZForwardingEntry ZForwarding::find(uintptr_t from_index, ZForwardingCursor* cursor) const {
50875
2217b2fc29ea 8205993: ZGC: Fix typos and incorrect indentations
pliden
parents: 50525
diff changeset
    98
  // Reading entries in the table races with the atomic CAS done for
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    99
  // insertion into the table. This is safe because each entry is at
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   100
  // most updated once (from -1 to something else).
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   101
  ZForwardingEntry entry = first(from_index, cursor);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   102
  while (!entry.is_empty()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   103
    if (entry.from_index() == from_index) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   104
      // Match found, return matching entry
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   105
      return entry;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   106
    }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   107
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   108
    entry = next(cursor);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   109
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   110
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   111
  // Match not found, return empty entry
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   112
  return entry;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   113
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   114
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   115
inline uintptr_t ZForwarding::insert(uintptr_t from_index, uintptr_t to_offset, ZForwardingCursor* cursor) {
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   116
  const ZForwardingEntry new_entry(from_index, to_offset);
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   117
  const ZForwardingEntry old_entry; // empty
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   118
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   119
  for (;;) {
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   120
    const ZForwardingEntry prev_entry = Atomic::cmpxchg(new_entry, entries() + *cursor, old_entry);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   121
    if (prev_entry.is_empty()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   122
      // Success
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   123
      return to_offset;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   124
    }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   125
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   126
    // Find next empty or matching entry
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   127
    ZForwardingEntry entry = at(cursor);
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   128
    while (!entry.is_empty()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   129
      if (entry.from_index() == from_index) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   130
        // Match found, return already inserted address
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   131
        return entry.to_offset();
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   132
      }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   133
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   134
      entry = next(cursor);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   135
    }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   136
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   137
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   138
54162
f344a0c6e19e 8220587: ZGC: Break out forwarding information from ZPage
pliden
parents: 53244
diff changeset
   139
#endif // SHARE_GC_Z_ZFORWARDING_INLINE_HPP