annotate src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @ 20542:0fcaab91d485

8055816: Remove dead code in g1BlockOffsetTable Reviewed-by: tschatzl, mgerdin
author brutisso
date Fri, 10 Oct 2014 15:45:45 +0200
parents 1f1d373cd044
children 7848fc12602b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
1 /*
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
4 *
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
7 * published by the Free Software Foundation.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
8 *
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
13 * accompanied this code).
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
14 *
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1489
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1489
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1489
diff changeset
21 * questions.
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
22 *
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
23 */
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1886
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1886
diff changeset
26 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
27 #include "gc_implementation/g1/heapRegion.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1886
diff changeset
28 #include "memory/space.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1886
diff changeset
29 #include "oops/oop.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1886
diff changeset
30 #include "runtime/java.hpp"
6197
d2a62e0f25eb 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 2133
diff changeset
31 #include "services/memTracker.hpp"
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
32
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
33 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
34
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
35 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
36 // G1BlockOffsetSharedArray
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
37 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
38
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
39 G1BlockOffsetSharedArray::G1BlockOffsetSharedArray(MemRegion heap, G1RegionToSpaceMapper* storage) :
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
40 _reserved(), _end(NULL), _listener(), _offset_array(NULL) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
41
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
42 _reserved = heap;
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
43 _end = NULL;
6197
d2a62e0f25eb 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 2133
diff changeset
44
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
45 MemRegion bot_reserved = storage->reserved();
6197
d2a62e0f25eb 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 2133
diff changeset
46
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
47 _offset_array = (u_char*)bot_reserved.start();
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
48 _end = _reserved.end();
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
49
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
50 storage->set_mapping_changed_listener(&_listener);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
51
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
52 if (TraceBlockOffsetTable) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
53 gclog_or_tty->print_cr("G1BlockOffsetSharedArray::G1BlockOffsetSharedArray: ");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
54 gclog_or_tty->print_cr(" "
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
55 " rs.base(): " INTPTR_FORMAT
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
56 " rs.size(): " INTPTR_FORMAT
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
57 " rs end(): " INTPTR_FORMAT,
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
58 bot_reserved.start(), bot_reserved.byte_size(), bot_reserved.end());
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
59 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
60 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
61
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
62 bool G1BlockOffsetSharedArray::is_card_boundary(HeapWord* p) const {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
63 assert(p >= _reserved.start(), "just checking");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
64 size_t delta = pointer_delta(p, _reserved.start());
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
65 return (delta & right_n_bits(LogN_words)) == (size_t)NoBits;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
66 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
67
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
68 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
69 // G1BlockOffsetArray
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
70 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
71
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
72 G1BlockOffsetArray::G1BlockOffsetArray(G1BlockOffsetSharedArray* array,
20542
0fcaab91d485 8055816: Remove dead code in g1BlockOffsetTable
brutisso
parents: 20337
diff changeset
73 MemRegion mr) :
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
74 G1BlockOffsetTable(mr.start(), mr.end()),
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
75 _unallocated_block(_bottom),
20542
0fcaab91d485 8055816: Remove dead code in g1BlockOffsetTable
brutisso
parents: 20337
diff changeset
76 _array(array), _gsp(NULL) {
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
77 assert(_bottom <= _end, "arguments out of order");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
78 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
79
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
80 void G1BlockOffsetArray::set_space(G1OffsetTableContigSpace* sp) {
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
81 _gsp = sp;
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
82 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
83
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
84 // The arguments follow the normal convention of denoting
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
85 // a right-open interval: [start, end)
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
86 void
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
87 G1BlockOffsetArray:: set_remainder_to_point_to_start(HeapWord* start, HeapWord* end) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
88
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
89 if (start >= end) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
90 // The start address is equal to the end address (or to
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
91 // the right of the end address) so there are not cards
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
92 // that need to be updated..
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
93 return;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
94 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
95
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
96 // Write the backskip value for each region.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
97 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
98 // offset
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
99 // card 2nd 3rd
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
100 // | +- 1st | |
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
101 // v v v v
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
102 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
103 // |x|0|0|0|0|0|0|0|1|1|1|1|1|1| ... |1|1|1|1|2|2|2|2|2|2| ...
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
104 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
105 // 11 19 75
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
106 // 12
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
107 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
108 // offset card is the card that points to the start of an object
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
109 // x - offset value of offset card
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
110 // 1st - start of first logarithmic region
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
111 // 0 corresponds to logarithmic value N_words + 0 and 2**(3 * 0) = 1
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
112 // 2nd - start of second logarithmic region
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
113 // 1 corresponds to logarithmic value N_words + 1 and 2**(3 * 1) = 8
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
114 // 3rd - start of third logarithmic region
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
115 // 2 corresponds to logarithmic value N_words + 2 and 2**(3 * 2) = 64
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
116 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
117 // integer below the block offset entry is an example of
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
118 // the index of the entry
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
119 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
120 // Given an address,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
121 // Find the index for the address
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
122 // Find the block offset table entry
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
123 // Convert the entry to a back slide
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
124 // (e.g., with today's, offset = 0x81 =>
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
125 // back slip = 2**(3*(0x81 - N_words)) = 2**3) = 8
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
126 // Move back N (e.g., 8) entries and repeat with the
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
127 // value of the new entry
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
128 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
129 size_t start_card = _array->index_for(start);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
130 size_t end_card = _array->index_for(end-1);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
131 assert(start ==_array->address_for_index(start_card), "Precondition");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
132 assert(end ==_array->address_for_index(end_card)+N_words, "Precondition");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
133 set_remainder_to_point_to_start_incl(start_card, end_card); // closed interval
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
134 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
135
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
136 // Unlike the normal convention in this code, the argument here denotes
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
137 // a closed, inclusive interval: [start_card, end_card], cf set_remainder_to_point_to_start()
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
138 // above.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
139 void
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
140 G1BlockOffsetArray::set_remainder_to_point_to_start_incl(size_t start_card, size_t end_card) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
141 if (start_card > end_card) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
142 return;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
143 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
144 assert(start_card > _array->index_for(_bottom), "Cannot be first card");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
145 assert(_array->offset_array(start_card-1) <= N_words,
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
146 "Offset card has an unexpected value");
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
147 size_t start_card_for_region = start_card;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
148 u_char offset = max_jubyte;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
149 for (int i = 0; i < BlockOffsetArray::N_powers; i++) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
150 // -1 so that the the card with the actual offset is counted. Another -1
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
151 // so that the reach ends in this region and not at the start
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
152 // of the next.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
153 size_t reach = start_card - 1 + (BlockOffsetArray::power_to_cards_back(i+1) - 1);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
154 offset = N_words + i;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
155 if (reach >= end_card) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
156 _array->set_offset_array(start_card_for_region, end_card, offset);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
157 start_card_for_region = reach + 1;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
158 break;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
159 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
160 _array->set_offset_array(start_card_for_region, reach, offset);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
161 start_card_for_region = reach + 1;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
162 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
163 assert(start_card_for_region > end_card, "Sanity check");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
164 DEBUG_ONLY(check_all_cards(start_card, end_card);)
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
165 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
166
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
167 // The card-interval [start_card, end_card] is a closed interval; this
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
168 // is an expensive check -- use with care and only under protection of
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
169 // suitable flag.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
170 void G1BlockOffsetArray::check_all_cards(size_t start_card, size_t end_card) const {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
171
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
172 if (end_card < start_card) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
173 return;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
174 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
175 guarantee(_array->offset_array(start_card) == N_words, "Wrong value in second card");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
176 for (size_t c = start_card + 1; c <= end_card; c++ /* yeah! */) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
177 u_char entry = _array->offset_array(c);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
178 if (c - start_card > BlockOffsetArray::power_to_cards_back(1)) {
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
179 guarantee(entry > N_words,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
180 err_msg("Should be in logarithmic region - "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
181 "entry: " UINT32_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
182 "_array->offset_array(c): " UINT32_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
183 "N_words: " UINT32_FORMAT,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
184 entry, _array->offset_array(c), N_words));
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
185 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
186 size_t backskip = BlockOffsetArray::entry_to_cards_back(entry);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
187 size_t landing_card = c - backskip;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
188 guarantee(landing_card >= (start_card - 1), "Inv");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
189 if (landing_card >= start_card) {
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
190 guarantee(_array->offset_array(landing_card) <= entry,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
191 err_msg("Monotonicity - landing_card offset: " UINT32_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
192 "entry: " UINT32_FORMAT,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
193 _array->offset_array(landing_card), entry));
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
194 } else {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
195 guarantee(landing_card == start_card - 1, "Tautology");
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
196 // Note that N_words is the maximum offset value
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
197 guarantee(_array->offset_array(landing_card) <= N_words,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
198 err_msg("landing card offset: " UINT32_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
199 "N_words: " UINT32_FORMAT,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
200 _array->offset_array(landing_card), N_words));
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
201 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
202 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
203 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
204
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
205 HeapWord* G1BlockOffsetArray::block_start_unsafe(const void* addr) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
206 assert(_bottom <= addr && addr < _end,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
207 "addr must be covered by this Array");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
208 // Must read this exactly once because it can be modified by parallel
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
209 // allocation.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
210 HeapWord* ub = _unallocated_block;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
211 if (BlockOffsetArrayUseUnallocatedBlock && addr >= ub) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
212 assert(ub < _end, "tautology (see above)");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
213 return ub;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
214 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
215 // Otherwise, find the block start using the table.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
216 HeapWord* q = block_at_or_preceding(addr, false, 0);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
217 return forward_to_block_containing_addr(q, addr);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
218 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
219
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
220 // This duplicates a little code from the above: unavoidable.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
221 HeapWord*
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
222 G1BlockOffsetArray::block_start_unsafe_const(const void* addr) const {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
223 assert(_bottom <= addr && addr < _end,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
224 "addr must be covered by this Array");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
225 // Must read this exactly once because it can be modified by parallel
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
226 // allocation.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
227 HeapWord* ub = _unallocated_block;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
228 if (BlockOffsetArrayUseUnallocatedBlock && addr >= ub) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
229 assert(ub < _end, "tautology (see above)");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
230 return ub;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
231 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
232 // Otherwise, find the block start using the table.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
233 HeapWord* q = block_at_or_preceding(addr, false, 0);
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
234 HeapWord* n = q + block_size(q);
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
235 return forward_to_block_containing_addr_const(q, n, addr);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
236 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
237
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
238
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
239 HeapWord*
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
240 G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord* q,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
241 HeapWord* n,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
242 const void* addr) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
243 // We're not in the normal case. We need to handle an important subcase
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
244 // here: LAB allocation. An allocation previously recorded in the
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
245 // offset table was actually a lab allocation, and was divided into
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
246 // several objects subsequently. Fix this situation as we answer the
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
247 // query, by updating entries as we cross them.
352
e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start")
iveresov
parents: 342
diff changeset
248
e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start")
iveresov
parents: 342
diff changeset
249 // If the fist object's end q is at the card boundary. Start refining
e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start")
iveresov
parents: 342
diff changeset
250 // with the corresponding card (the value of the entry will be basically
e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start")
iveresov
parents: 342
diff changeset
251 // set to 0). If the object crosses the boundary -- start from the next card.
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
252 size_t n_index = _array->index_for(n);
352
e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start")
iveresov
parents: 342
diff changeset
253 size_t next_index = _array->index_for(n) + !_array->is_card_boundary(n);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
254 // Calculate a consistent next boundary. If "n" is not at the boundary
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
255 // already, step to the boundary.
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
256 HeapWord* next_boundary = _array->address_for_index(n_index) +
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
257 (n_index == next_index ? 0 : N_words);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
258 assert(next_boundary <= _array->_end,
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
259 err_msg("next_boundary is beyond the end of the covered region "
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
260 " next_boundary " PTR_FORMAT " _array->_end " PTR_FORMAT,
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
261 next_boundary, _array->_end));
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
262 if (addr >= gsp()->top()) return gsp()->top();
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
263 while (next_boundary < addr) {
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
264 while (n <= next_boundary) {
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
265 q = n;
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
266 oop obj = oop(q);
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
267 if (obj->klass_or_null() == NULL) return q;
20278
2c6ef90f030a 8049421: G1 Class Unloading after completing a concurrent mark cycle
stefank
parents: 20273
diff changeset
268 n += block_size(q);
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
269 }
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
270 assert(q <= next_boundary && n > next_boundary, "Consequence of loop");
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
271 // [q, n) is the block that crosses the boundary.
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
272 alloc_block_work2(&next_boundary, &next_index, q, n);
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
273 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
274 return forward_to_block_containing_addr_const(q, n, addr);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
275 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
276
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
277 // Note that the committed size of the covered space may have changed,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
278 // so the table size might also wish to change.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
279 void G1BlockOffsetArray::resize(size_t new_word_size) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
280 HeapWord* new_end = _bottom + new_word_size;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
281 _end = new_end; // update _end
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
282 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
283
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
284 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
285 // threshold_
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
286 // | _index_
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
287 // v v
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
288 // +-------+-------+-------+-------+-------+
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
289 // | i-1 | i | i+1 | i+2 | i+3 |
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
290 // +-------+-------+-------+-------+-------+
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
291 // ( ^ ]
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
292 // block-start
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
293 //
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
294 void G1BlockOffsetArray::alloc_block_work2(HeapWord** threshold_, size_t* index_,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
295 HeapWord* blk_start, HeapWord* blk_end) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
296 // For efficiency, do copy-in/copy-out.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
297 HeapWord* threshold = *threshold_;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
298 size_t index = *index_;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
299
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
300 assert(blk_start != NULL && blk_end > blk_start,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
301 "phantom block");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
302 assert(blk_end > threshold, "should be past threshold");
1489
cff162798819 6888953: some calls to function-like macros are missing semicolons
jcoomes
parents: 845
diff changeset
303 assert(blk_start <= threshold, "blk_start should be at or before threshold");
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
304 assert(pointer_delta(threshold, blk_start) <= N_words,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
305 "offset should be <= BlockOffsetSharedArray::N");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
306 assert(Universe::heap()->is_in_reserved(blk_start),
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
307 "reference must be into the heap");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
308 assert(Universe::heap()->is_in_reserved(blk_end-1),
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
309 "limit must be within the heap");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
310 assert(threshold == _array->_reserved.start() + index*N_words,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
311 "index must agree with threshold");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
312
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
313 DEBUG_ONLY(size_t orig_index = index;)
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
314
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
315 // Mark the card that holds the offset into the block. Note
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
316 // that _next_offset_index and _next_offset_threshold are not
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
317 // updated until the end of this method.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
318 _array->set_offset_array(index, threshold, blk_start);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
319
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
320 // We need to now mark the subsequent cards that this blk spans.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
321
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
322 // Index of card on which blk ends.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
323 size_t end_index = _array->index_for(blk_end - 1);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
324
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
325 // Are there more cards left to be updated?
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
326 if (index + 1 <= end_index) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
327 HeapWord* rem_st = _array->address_for_index(index + 1);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
328 // Calculate rem_end this way because end_index
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
329 // may be the last valid index in the covered region.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
330 HeapWord* rem_end = _array->address_for_index(end_index) + N_words;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
331 set_remainder_to_point_to_start(rem_st, rem_end);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
332 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
333
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
334 index = end_index + 1;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
335 // Calculate threshold_ this way because end_index
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
336 // may be the last valid index in the covered region.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
337 threshold = _array->address_for_index(end_index) + N_words;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
338 assert(threshold >= blk_end, "Incorrect offset threshold");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
339
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
340 // index_ and threshold_ updated here.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
341 *threshold_ = threshold;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
342 *index_ = index;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
343
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
344 #ifdef ASSERT
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
345 // The offset can be 0 if the block starts on a boundary. That
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
346 // is checked by an assertion above.
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
347 size_t start_index = _array->index_for(blk_start);
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
348 HeapWord* boundary = _array->address_for_index(start_index);
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
349 assert((_array->offset_array(orig_index) == 0 &&
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
350 blk_start == boundary) ||
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
351 (_array->offset_array(orig_index) > 0 &&
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
352 _array->offset_array(orig_index) <= N_words),
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
353 err_msg("offset array should have been set - "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
354 "orig_index offset: " UINT32_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
355 "blk_start: " PTR_FORMAT ", "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
356 "boundary: " PTR_FORMAT,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
357 _array->offset_array(orig_index),
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
358 blk_start, boundary));
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
359 for (size_t j = orig_index + 1; j <= end_index; j++) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
360 assert(_array->offset_array(j) > 0 &&
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
361 _array->offset_array(j) <=
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
362 (u_char) (N_words+BlockOffsetArray::N_powers-1),
7181
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
363 err_msg("offset array should have been set - "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
364 UINT32_FORMAT " not > 0 OR "
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
365 UINT32_FORMAT " not <= " UINT32_FORMAT,
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
366 _array->offset_array(j),
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
367 _array->offset_array(j),
2fc0334f613a 7194633: G1: Assertion and guarantee failures in block offset table
johnc
parents: 6725
diff changeset
368 (u_char) (N_words+BlockOffsetArray::N_powers-1)));
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
369 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
370 #endif
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
371 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
372
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
373 bool
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
374 G1BlockOffsetArray::verify_for_object(HeapWord* obj_start,
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
375 size_t word_size) const {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
376 size_t first_card = _array->index_for(obj_start);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
377 size_t last_card = _array->index_for(obj_start + word_size - 1);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
378 if (!_array->is_card_boundary(obj_start)) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
379 // If the object is not on a card boundary the BOT entry of the
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
380 // first card should point to another object so we should not
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
381 // check that one.
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
382 first_card += 1;
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
383 }
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
384 for (size_t card = first_card; card <= last_card; card += 1) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
385 HeapWord* card_addr = _array->address_for_index(card);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
386 HeapWord* block_start = block_start_const(card_addr);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
387 if (block_start != obj_start) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
388 gclog_or_tty->print_cr("block start: "PTR_FORMAT" is incorrect - "
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
389 "card index: "SIZE_FORMAT" "
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
390 "card addr: "PTR_FORMAT" BOT entry: %u "
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
391 "obj: "PTR_FORMAT" word size: "SIZE_FORMAT" "
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
392 "cards: ["SIZE_FORMAT","SIZE_FORMAT"]",
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
393 block_start, card, card_addr,
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
394 _array->offset_array(card),
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
395 obj_start, word_size, first_card, last_card);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
396 return false;
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
397 }
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
398 }
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
399 return true;
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
400 }
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
401
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
402 #ifndef PRODUCT
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
403 void
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
404 G1BlockOffsetArray::print_on(outputStream* out) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
405 size_t from_index = _array->index_for(_bottom);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
406 size_t to_index = _array->index_for(_end);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
407 out->print_cr(">> BOT for area ["PTR_FORMAT","PTR_FORMAT") "
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
408 "cards ["SIZE_FORMAT","SIZE_FORMAT")",
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
409 _bottom, _end, from_index, to_index);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
410 for (size_t i = from_index; i < to_index; ++i) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
411 out->print_cr(" entry "SIZE_FORMAT_W(8)" | "PTR_FORMAT" : %3u",
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
412 i, _array->address_for_index(i),
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
413 (uint) _array->offset_array(i));
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
414 }
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
415 }
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
416 #endif // !PRODUCT
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
417
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
418 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
419 // G1BlockOffsetArrayContigSpace
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
420 //////////////////////////////////////////////////////////////////////
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
421
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
422 HeapWord*
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
423 G1BlockOffsetArrayContigSpace::block_start_unsafe(const void* addr) {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
424 assert(_bottom <= addr && addr < _end,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
425 "addr must be covered by this Array");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
426 HeapWord* q = block_at_or_preceding(addr, true, _next_offset_index-1);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
427 return forward_to_block_containing_addr(q, addr);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
428 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
429
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
430 HeapWord*
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
431 G1BlockOffsetArrayContigSpace::
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
432 block_start_unsafe_const(const void* addr) const {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
433 assert(_bottom <= addr && addr < _end,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
434 "addr must be covered by this Array");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
435 HeapWord* q = block_at_or_preceding(addr, true, _next_offset_index-1);
20273
9441d22e429a 8047820: G1 Block offset table does not need to support generic Space classes
mgerdin
parents: 17937
diff changeset
436 HeapWord* n = q + block_size(q);
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
437 return forward_to_block_containing_addr_const(q, n, addr);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
438 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
439
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
440 G1BlockOffsetArrayContigSpace::
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
441 G1BlockOffsetArrayContigSpace(G1BlockOffsetSharedArray* array,
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
442 MemRegion mr) :
20542
0fcaab91d485 8055816: Remove dead code in g1BlockOffsetTable
brutisso
parents: 20337
diff changeset
443 G1BlockOffsetArray(array, mr)
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
444 {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
445 _next_offset_threshold = NULL;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
446 _next_offset_index = 0;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
447 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
448
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
449 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold_raw() {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
450 assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
451 "just checking");
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
452 _next_offset_index = _array->index_for_raw(_bottom);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
453 _next_offset_index++;
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
454 _next_offset_threshold =
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
455 _array->address_for_index_raw(_next_offset_index);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
456 return _next_offset_threshold;
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
457 }
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
458
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
459 void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
460 assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
461 "just checking");
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
462 size_t bottom_index = _array->index_for_raw(_bottom);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
463 assert(_array->address_for_index_raw(bottom_index) == _bottom,
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
464 "Precondition of call");
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
465 _array->set_offset_array_raw(bottom_index, 0);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
466 }
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 20336
diff changeset
467
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
468 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() {
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
469 assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
470 "just checking");
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
471 _next_offset_index = _array->index_for(_bottom);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
472 _next_offset_index++;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
473 _next_offset_threshold =
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
474 _array->address_for_index(_next_offset_index);
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
475 return _next_offset_threshold;
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
476 }
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
477
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
478 void
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
479 G1BlockOffsetArrayContigSpace::set_for_starts_humongous(HeapWord* new_top) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
480 assert(new_top <= _end, "_end should have already been updated");
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
481
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
482 // The first BOT entry should have offset 0.
20336
6701abbc4441 8054818: Refactor HeapRegionSeq to manage heap region and auxiliary data
tschatzl
parents: 20278
diff changeset
483 reset_bot();
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
484 alloc_block(_bottom, new_top);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
485 }
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
486
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
487 #ifndef PRODUCT
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
488 void
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
489 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) {
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
490 G1BlockOffsetArray::print_on(out);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
491 out->print_cr(" next offset threshold: "PTR_FORMAT, _next_offset_threshold);
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
492 out->print_cr(" next offset index: "SIZE_FORMAT, _next_offset_index);
1886
72a161e62cc4 6991377: G1: race between concurrent refinement and humongous object allocation
tonyp
parents: 1552
diff changeset
493 }
2133
2250ee17e258 7007068: G1: refine the BOT during evac failure handling
tonyp
parents: 1972
diff changeset
494 #endif // !PRODUCT