11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_G1_HEAPREGIONREMSET_INLINE_HPP
26 #define SHARE_VM_GC_G1_HEAPREGIONREMSET_INLINE_HPP
27
28 #include "gc/g1/heapRegion.inline.hpp"
29 #include "gc/g1/heapRegionRemSet.hpp"
30 #include "gc/g1/sparsePRT.hpp"
31 #include "utilities/bitMap.inline.hpp"
32
33 template <class Closure>
34 inline void HeapRegionRemSet::iterate_prts(Closure& cl) {
35 _other_regions.iterate(cl);
36 }
37
38 inline void PerRegionTable::add_card(CardIdx_t from_card_index) {
39 if (_bm.par_set_bit(from_card_index)) {
40 Atomic::inc(&_occupied);
41 }
42 }
43
44 inline void PerRegionTable::add_reference(OopOrNarrowOopStar from) {
45 // Must make this robust in case "from" is not in "_hr", because of
46 // concurrency.
47
48 HeapRegion* loc_hr = hr();
49 // If the test below fails, then this table was reused concurrently
50 // with this operation. This is OK, since the old table was coarsened,
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_G1_HEAPREGIONREMSET_INLINE_HPP
26 #define SHARE_VM_GC_G1_HEAPREGIONREMSET_INLINE_HPP
27
28 #include "gc/g1/heapRegion.inline.hpp"
29 #include "gc/g1/heapRegionRemSet.hpp"
30 #include "gc/g1/sparsePRT.hpp"
31 #include "runtime/atomic.hpp"
32 #include "utilities/bitMap.inline.hpp"
33
34 template <class Closure>
35 inline void HeapRegionRemSet::iterate_prts(Closure& cl) {
36 _other_regions.iterate(cl);
37 }
38
39 inline void PerRegionTable::add_card(CardIdx_t from_card_index) {
40 if (_bm.par_set_bit(from_card_index)) {
41 Atomic::inc(&_occupied);
42 }
43 }
44
45 inline void PerRegionTable::add_reference(OopOrNarrowOopStar from) {
46 // Must make this robust in case "from" is not in "_hr", because of
47 // concurrency.
48
49 HeapRegion* loc_hr = hr();
50 // If the test below fails, then this table was reused concurrently
51 // with this operation. This is OK, since the old table was coarsened,
|