10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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_IMPLEMENTATION_G1_CONCURRENTMARK_INLINE_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_INLINE_HPP
27
28 #include "gc_implementation/g1/concurrentMark.hpp"
29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
30
31 // Utility routine to set an exclusive range of cards on the given
32 // card liveness bitmap
33 inline void ConcurrentMark::set_card_bitmap_range(BitMap* card_bm,
34 BitMap::idx_t start_idx,
35 BitMap::idx_t end_idx,
36 bool is_par) {
37
38 // Set the exclusive bit range [start_idx, end_idx).
39 assert((end_idx - start_idx) > 0, "at least one card");
40 assert(end_idx <= card_bm->size(), "sanity");
41
42 // Silently clip the end index
43 end_idx = MIN2(end_idx, card_bm->size());
44
45 // For small ranges use a simple loop; otherwise use set_range or
46 // use par_at_put_range (if parallel). The range is made up of the
47 // cards that are spanned by an object/mem region so 8 cards will
48 // allow up to object sizes up to 4K to be handled using the loop.
49 if ((end_idx - start_idx) <= 8) {
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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_IMPLEMENTATION_G1_CONCURRENTMARK_INLINE_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_INLINE_HPP
27
28 #include "gc_implementation/g1/concurrentMark.hpp"
29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
30 #include "utilities/taskqueue.inline.hpp"
31
32 // Utility routine to set an exclusive range of cards on the given
33 // card liveness bitmap
34 inline void ConcurrentMark::set_card_bitmap_range(BitMap* card_bm,
35 BitMap::idx_t start_idx,
36 BitMap::idx_t end_idx,
37 bool is_par) {
38
39 // Set the exclusive bit range [start_idx, end_idx).
40 assert((end_idx - start_idx) > 0, "at least one card");
41 assert(end_idx <= card_bm->size(), "sanity");
42
43 // Silently clip the end index
44 end_idx = MIN2(end_idx, card_bm->size());
45
46 // For small ranges use a simple loop; otherwise use set_range or
47 // use par_at_put_range (if parallel). The range is made up of the
48 // cards that are spanned by an object/mem region so 8 cards will
49 // allow up to object sizes up to 4K to be handled using the loop.
50 if ((end_idx - start_idx) <= 8) {
|