hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp
author jwilhelm
Thu, 03 Oct 2013 21:36:29 +0200
changeset 20398 b206c580c45f
parent 13336 e582172ff6ff
child 23450 c7c6202fc7e2
permissions -rw-r--r--
8025852: Remove unnecessary setters in collector policy classes Summary: Use instance variables directly within the collector policy classes and remove unused setters. Reviewed-by: tschatzl, jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     1
/*
12381
1438e0fbfa27 7157073: G1: type change size_t -> uint for region counts / indexes
tonyp
parents: 10273
diff changeset
     2
 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     4
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     8
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    13
 * accompanied this code).
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    14
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    18
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    21
 * questions.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    22
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    23
 */
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    24
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    25
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSET_INLINE_HPP
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    26
#define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSET_INLINE_HPP
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    27
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    28
#include "gc_implementation/g1/heapRegionSet.hpp"
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    29
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    30
//////////////////// HeapRegionSetBase ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    31
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    32
inline void HeapRegionSetBase::update_for_addition(HeapRegion* hr) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    33
  // Assumes the caller has already verified the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    34
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    35
  _length           += 1;
13336
e582172ff6ff 7114678: G1: various small fixes, code cleanup, and refactoring
tonyp
parents: 12381
diff changeset
    36
  _region_num       += hr->region_num();
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    37
  _total_used_bytes += hr->used();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    38
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    39
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    40
inline void HeapRegionSetBase::add_internal(HeapRegion* hr) {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    41
  hrs_assert_region_ok(this, hr, NULL);
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    42
  assert(hr->next() == NULL, hrs_ext_msg(this, "should not already be linked"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    43
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    44
  update_for_addition(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    45
  hr->set_containing_set(this);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    46
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    47
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    48
inline void HeapRegionSetBase::update_for_removal(HeapRegion* hr) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    49
  // Assumes the caller has already verified the region.
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    50
  assert(_length > 0, hrs_ext_msg(this, "pre-condition"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    51
  _length -= 1;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    52
13336
e582172ff6ff 7114678: G1: various small fixes, code cleanup, and refactoring
tonyp
parents: 12381
diff changeset
    53
  uint region_num_diff = hr->region_num();
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    54
  assert(region_num_diff <= _region_num,
12381
1438e0fbfa27 7157073: G1: type change size_t -> uint for region counts / indexes
tonyp
parents: 10273
diff changeset
    55
         hrs_err_msg("[%s] region's region num: %u "
1438e0fbfa27 7157073: G1: type change size_t -> uint for region counts / indexes
tonyp
parents: 10273
diff changeset
    56
                     "should be <= region num: %u",
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    57
                     name(), region_num_diff, _region_num));
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    58
  _region_num -= region_num_diff;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    59
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    60
  size_t used_bytes = hr->used();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    61
  assert(used_bytes <= _total_used_bytes,
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    62
         hrs_err_msg("[%s] region's used bytes: "SIZE_FORMAT" "
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    63
                     "should be <= used bytes: "SIZE_FORMAT,
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    64
                     name(), used_bytes, _total_used_bytes));
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    65
  _total_used_bytes -= used_bytes;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    66
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    67
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    68
inline void HeapRegionSetBase::remove_internal(HeapRegion* hr) {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    69
  hrs_assert_region_ok(this, hr, this);
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    70
  assert(hr->next() == NULL, hrs_ext_msg(this, "should already be unlinked"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    71
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    72
  hr->set_containing_set(NULL);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    73
  update_for_removal(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    74
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    75
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    76
//////////////////// HeapRegionSet ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    77
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    78
inline void HeapRegionSet::add(HeapRegion* hr) {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    79
  hrs_assert_mt_safety_ok(this);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    80
  // add_internal() will verify the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    81
  add_internal(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    82
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    83
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    84
inline void HeapRegionSet::remove(HeapRegion* hr) {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    85
  hrs_assert_mt_safety_ok(this);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    86
  // remove_internal() will verify the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    87
  remove_internal(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    88
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    89
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    90
inline void HeapRegionSet::remove_with_proxy(HeapRegion* hr,
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    91
                                             HeapRegionSet* proxy_set) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    92
  // No need to fo the MT safety check here given that this method
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    93
  // does not update the contents of the set but instead accumulates
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    94
  // the changes in proxy_set which is assumed to be thread-local.
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    95
  hrs_assert_sets_match(this, proxy_set);
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
    96
  hrs_assert_region_ok(this, hr, this);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    97
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    98
  hr->set_containing_set(NULL);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    99
  proxy_set->update_for_addition(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   100
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   101
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   102
//////////////////// HeapRegionLinkedList ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   103
8927
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   104
inline void HeapRegionLinkedList::add_as_head(HeapRegion* hr) {
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   105
  hrs_assert_mt_safety_ok(this);
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   106
  assert((length() == 0 && _head == NULL && _tail == NULL) ||
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   107
         (length() >  0 && _head != NULL && _tail != NULL),
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   108
         hrs_ext_msg(this, "invariant"));
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   109
  // add_internal() will verify the region.
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   110
  add_internal(hr);
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   111
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   112
  // Now link the region.
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   113
  if (_head != NULL) {
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   114
    hr->set_next(_head);
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   115
  } else {
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   116
    _tail = hr;
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   117
  }
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   118
  _head = hr;
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   119
}
461fa7ee5254 7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end
tonyp
parents: 8680
diff changeset
   120
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   121
inline void HeapRegionLinkedList::add_as_tail(HeapRegion* hr) {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   122
  hrs_assert_mt_safety_ok(this);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   123
  assert((length() == 0 && _head == NULL && _tail == NULL) ||
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   124
         (length() >  0 && _head != NULL && _tail != NULL),
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   125
         hrs_ext_msg(this, "invariant"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   126
  // add_internal() will verify the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   127
  add_internal(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   128
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   129
  // Now link the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   130
  if (_tail != NULL) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   131
    _tail->set_next(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   132
  } else {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   133
    _head = hr;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   134
  }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   135
  _tail = hr;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   136
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   137
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   138
inline HeapRegion* HeapRegionLinkedList::remove_head() {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   139
  hrs_assert_mt_safety_ok(this);
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   140
  assert(!is_empty(), hrs_ext_msg(this, "the list should not be empty"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   141
  assert(length() > 0 && _head != NULL && _tail != NULL,
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   142
         hrs_ext_msg(this, "invariant"));
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   143
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   144
  // We need to unlink it first.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   145
  HeapRegion* hr = _head;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   146
  _head = hr->next();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   147
  if (_head == NULL) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   148
    _tail = NULL;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   149
  }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   150
  hr->set_next(NULL);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   151
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   152
  // remove_internal() will verify the region.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   153
  remove_internal(hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   154
  return hr;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   155
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   156
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   157
inline HeapRegion* HeapRegionLinkedList::remove_head_or_null() {
8680
f1c414e16a4c 7014923: G1: code cleanup
tonyp
parents: 7923
diff changeset
   158
  hrs_assert_mt_safety_ok(this);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   159
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   160
  if (!is_empty()) {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   161
    return remove_head();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   162
  } else {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   163
    return NULL;
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   164
  }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   165
}
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   166
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   167
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSET_INLINE_HPP