0 /*
1 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
|
0 /*
1 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
|
221 return false;
222 }
223 _evacuation_failure_alot_count = 0;
224 return true;
225 }
226
227 inline void G1CollectedHeap::reset_evacuation_should_fail() {
228 if (G1EvacuationFailureALot) {
229 _evacuation_failure_alot_gc_number = total_collections();
230 _evacuation_failure_alot_count = 0;
231 _evacuation_failure_alot_for_current_gc = false;
232 }
233 }
234 #endif // #ifndef PRODUCT
235
236 inline bool G1CollectedHeap::is_in_young(const oop obj) {
237 if (obj == NULL) {
238 return false;
239 }
240 return heap_region_containing(obj)->is_young();
241 }
242
243 // We don't need barriers for initializing stores to objects
244 // in the young gen: for the SATB pre-barrier, there is no
245 // pre-value that needs to be remembered; for the remembered-set
246 // update logging post-barrier, we don't maintain remembered set
247 // information for young gen objects.
248 inline bool G1CollectedHeap::can_elide_initializing_store_barrier(oop new_obj) {
249 return is_in_young(new_obj);
250 }
251
252 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {
253 if (obj == NULL) {
254 return false;
255 }
256 return is_obj_dead(obj, heap_region_containing(obj));
257 }
258
259 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {
260 if (obj == NULL) {
261 return false;
262 }
263 return is_obj_ill(obj, heap_region_containing(obj));
264 }
265
266 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj, const HeapRegion* hr) const {
267 return !isMarkedNext(obj) && !hr->is_archive();
268 }
|
221 return false;
222 }
223 _evacuation_failure_alot_count = 0;
224 return true;
225 }
226
227 inline void G1CollectedHeap::reset_evacuation_should_fail() {
228 if (G1EvacuationFailureALot) {
229 _evacuation_failure_alot_gc_number = total_collections();
230 _evacuation_failure_alot_count = 0;
231 _evacuation_failure_alot_for_current_gc = false;
232 }
233 }
234 #endif // #ifndef PRODUCT
235
236 inline bool G1CollectedHeap::is_in_young(const oop obj) {
237 if (obj == NULL) {
238 return false;
239 }
240 return heap_region_containing(obj)->is_young();
241 }
242
243 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {
244 if (obj == NULL) {
245 return false;
246 }
247 return is_obj_dead(obj, heap_region_containing(obj));
248 }
249
250 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {
251 if (obj == NULL) {
252 return false;
253 }
254 return is_obj_ill(obj, heap_region_containing(obj));
255 }
256
257 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj, const HeapRegion* hr) const {
258 return !isMarkedNext(obj) && !hr->is_archive();
259 }
|