src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
author chegar
Thu, 17 Oct 2019 20:53:35 +0100
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 49722 a47d1e21b3f1
child 58679 9c3209ff7550
permissions -rw-r--r--
datagramsocketimpl-branch: update to default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47885
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     1
/*
58678
9cf78a70fa4f datagramsocketimpl-branch: update to default
chegar
parents: 49722
diff changeset
     2
 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
47885
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     4
 *
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     8
 *
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    13
 * accompanied this code).
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    14
 *
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    18
 *
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    21
 * questions.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    22
 *
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    23
 */
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    24
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    25
#include "precompiled.hpp"
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    26
#include "gc/g1/g1FullGCCompactionPoint.hpp"
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    27
#include "gc/g1/heapRegion.hpp"
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    28
#include "oops/oop.inline.hpp"
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    29
#include "utilities/debug.hpp"
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    30
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    31
G1FullGCCompactionPoint::G1FullGCCompactionPoint() :
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    32
    _current_region(NULL),
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    33
    _threshold(NULL),
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    34
    _compaction_top(NULL) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    35
  _compaction_regions = new (ResourceObj::C_HEAP, mtGC) GrowableArray<HeapRegion*>(32, true, mtGC);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    36
  _compaction_region_iterator = _compaction_regions->begin();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    37
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    38
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    39
G1FullGCCompactionPoint::~G1FullGCCompactionPoint() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    40
  delete _compaction_regions;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    41
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    42
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    43
void G1FullGCCompactionPoint::update() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    44
  if (is_initialized()) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    45
    _current_region->set_compaction_top(_compaction_top);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    46
  }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    47
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    48
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    49
void G1FullGCCompactionPoint::initialize_values(bool init_threshold) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    50
  _compaction_top = _current_region->compaction_top();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    51
  if (init_threshold) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    52
    _threshold = _current_region->initialize_threshold();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    53
  }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    54
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    55
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    56
bool G1FullGCCompactionPoint::has_regions() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    57
  return !_compaction_regions->is_empty();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    58
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    59
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    60
bool G1FullGCCompactionPoint::is_initialized() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    61
  return _current_region != NULL;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    62
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    63
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    64
void G1FullGCCompactionPoint::initialize(HeapRegion* hr, bool init_threshold) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    65
  _current_region = hr;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    66
  initialize_values(init_threshold);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    67
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    68
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    69
HeapRegion* G1FullGCCompactionPoint::current_region() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    70
  return *_compaction_region_iterator;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    71
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    72
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    73
HeapRegion* G1FullGCCompactionPoint::next_region() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    74
  HeapRegion* next = *(++_compaction_region_iterator);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    75
  assert(next != NULL, "Must return valid region");
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    76
  return next;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    77
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    78
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    79
GrowableArray<HeapRegion*>* G1FullGCCompactionPoint::regions() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    80
  return _compaction_regions;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    81
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    82
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    83
bool G1FullGCCompactionPoint::object_will_fit(size_t size) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    84
  size_t space_left = pointer_delta(_current_region->end(), _compaction_top);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    85
  return size <= space_left;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    86
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    87
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    88
void G1FullGCCompactionPoint::switch_region() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    89
  // Save compaction top in the region.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    90
  _current_region->set_compaction_top(_compaction_top);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    91
  // Get the next region and re-initialize the values.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    92
  _current_region = next_region();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    93
  initialize_values(true);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    94
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    95
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    96
void G1FullGCCompactionPoint::forward(oop object, size_t size) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    97
  assert(_current_region != NULL, "Must have been initialized");
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    98
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
    99
  // Ensure the object fit in the current region.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   100
  while (!object_will_fit(size)) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   101
    switch_region();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   102
  }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   103
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   104
  // Store a forwarding pointer if the object should be moved.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   105
  if ((HeapWord*)object != _compaction_top) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   106
    object->forward_to(oop(_compaction_top));
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   107
  } else {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   108
    if (object->forwardee() != NULL) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   109
      // Object should not move but mark-word is used so it looks like the
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   110
      // object is forwarded. Need to clear the mark and it's no problem
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   111
      // since it will be restored by preserved marks. There is an exception
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   112
      // with BiasedLocking, in this case forwardee() will return NULL
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   113
      // even if the mark-word is used. This is no problem since
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   114
      // forwardee() will return NULL in the compaction phase as well.
49722
a47d1e21b3f1 8199735: Mark word updates need to use Access API
rkennke
parents: 47885
diff changeset
   115
      object->init_mark_raw();
47885
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   116
    } else {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   117
      // Make sure object has the correct mark-word set or that it will be
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   118
      // fixed when restoring the preserved marks.
58678
9cf78a70fa4f datagramsocketimpl-branch: update to default
chegar
parents: 49722
diff changeset
   119
      assert(object->mark_raw() == markWord::prototype_for_klass(object->klass()) || // Correct mark
9cf78a70fa4f datagramsocketimpl-branch: update to default
chegar
parents: 49722
diff changeset
   120
             object->mark_must_be_preserved() || // Will be restored by PreservedMarksSet
49722
a47d1e21b3f1 8199735: Mark word updates need to use Access API
rkennke
parents: 47885
diff changeset
   121
             (UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking
47885
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   122
             "should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
58678
9cf78a70fa4f datagramsocketimpl-branch: update to default
chegar
parents: 49722
diff changeset
   123
             p2i(object), object->mark_raw().value(), markWord::prototype_for_klass(object->klass()).value());
47885
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   124
    }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   125
    assert(object->forwardee() == NULL, "should be forwarded to NULL");
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   126
  }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   127
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   128
  // Update compaction values.
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   129
  _compaction_top += size;
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   130
  if (_compaction_top > _threshold) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   131
    _threshold = _current_region->cross_threshold(_compaction_top - size, _compaction_top);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   132
  }
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   133
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   134
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   135
void G1FullGCCompactionPoint::add(HeapRegion* hr) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   136
  _compaction_regions->append(hr);
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   137
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   138
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   139
void G1FullGCCompactionPoint::merge(G1FullGCCompactionPoint* other) {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   140
   _compaction_regions->appendAll(other->regions());
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   141
}
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   142
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   143
HeapRegion* G1FullGCCompactionPoint::remove_last() {
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   144
  return _compaction_regions->pop();
5caa1d5f74c1 8186571: Implementation: JEP 307: Parallel Full GC for G1
sjohanss
parents:
diff changeset
   145
}