equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
140 |
140 |
141 inline bool G1CollectedHeap::isMarkedNext(oop obj) const { |
141 inline bool G1CollectedHeap::isMarkedNext(oop obj) const { |
142 return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj); |
142 return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj); |
143 } |
143 } |
144 |
144 |
145 // This is a fast test on whether a reference points into the |
|
146 // collection set or not. Assume that the reference |
|
147 // points into the heap. |
|
148 inline bool G1CollectedHeap::is_in_cset(oop obj) { |
145 inline bool G1CollectedHeap::is_in_cset(oop obj) { |
149 bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj); |
146 return _in_cset_fast_test.is_in_cset((HeapWord*)obj); |
150 // let's make sure the result is consistent with what the slower |
|
151 // test returns |
|
152 assert( ret || !obj_in_cs(obj), "sanity"); |
|
153 assert(!ret || obj_in_cs(obj), "sanity"); |
|
154 return ret; |
|
155 } |
147 } |
156 |
148 |
157 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) { |
149 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) { |
158 return _in_cset_fast_test.is_in_cset(hr); |
150 return _in_cset_fast_test.is_in_cset(hr); |
159 } |
151 } |