< prev index next >

src/hotspot/share/gc/parallel/parMarkBitMap.cpp

Print this page
rev 57098 : [mq]: max_size

*** 1,7 **** /* ! * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 37,47 **** ParMarkBitMap::initialize(MemRegion covered_region) { const idx_t bits = bits_required(covered_region); // The bits will be divided evenly between two bitmaps; each of them should be // an integral number of words. ! assert(bits % (BitsPerWord * 2) == 0, "region size unaligned"); const size_t words = bits / BitsPerWord; const size_t raw_bytes = words * sizeof(idx_t); const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10); const size_t granularity = os::vm_allocation_granularity(); --- 37,47 ---- ParMarkBitMap::initialize(MemRegion covered_region) { const idx_t bits = bits_required(covered_region); // The bits will be divided evenly between two bitmaps; each of them should be // an integral number of words. ! assert(is_aligned(bits, (BitsPerWord * 2)), "region size unaligned"); const size_t words = bits / BitsPerWord; const size_t raw_bytes = words * sizeof(idx_t); const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10); const size_t granularity = os::vm_allocation_granularity();
*** 116,126 **** idx_t live_bits = 0; // The bitmap routines require the right boundary to be word-aligned. const idx_t end_bit = addr_to_bit((HeapWord*)end_obj); ! const idx_t range_end = BitMap::word_align_up(end_bit); idx_t beg_bit = find_obj_beg(addr_to_bit(beg_addr), range_end); while (beg_bit < end_bit) { idx_t tmp_end = find_obj_end(beg_bit, range_end); assert(tmp_end < end_bit, "missing end bit"); --- 116,126 ---- idx_t live_bits = 0; // The bitmap routines require the right boundary to be word-aligned. const idx_t end_bit = addr_to_bit((HeapWord*)end_obj); ! const idx_t range_end = align_range_end(end_bit); idx_t beg_bit = find_obj_beg(addr_to_bit(beg_addr), range_end); while (beg_bit < end_bit) { idx_t tmp_end = find_obj_end(beg_bit, range_end); assert(tmp_end < end_bit, "missing end bit");
*** 175,185 **** DEBUG_ONLY(verify_bit(range_beg);) DEBUG_ONLY(verify_bit(range_end);) assert(range_beg <= range_end, "live range invalid"); // The bitmap routines require the right boundary to be word-aligned. ! const idx_t search_end = BitMap::word_align_up(range_end); idx_t cur_beg = find_obj_beg(range_beg, search_end); while (cur_beg < range_end) { const idx_t cur_end = find_obj_end(cur_beg, search_end); if (cur_end >= range_end) { --- 175,185 ---- DEBUG_ONLY(verify_bit(range_beg);) DEBUG_ONLY(verify_bit(range_end);) assert(range_beg <= range_end, "live range invalid"); // The bitmap routines require the right boundary to be word-aligned. ! const idx_t search_end = align_range_end(range_end); idx_t cur_beg = find_obj_beg(range_beg, search_end); while (cur_beg < range_end) { const idx_t cur_end = find_obj_end(cur_beg, search_end); if (cur_end >= range_end) {
*** 214,225 **** DEBUG_ONLY(verify_bit(dead_range_end);) assert(range_beg <= range_end, "live range invalid"); assert(range_end <= dead_range_end, "dead range invalid"); // The bitmap routines require the right boundary to be word-aligned. ! const idx_t live_search_end = BitMap::word_align_up(range_end); ! const idx_t dead_search_end = BitMap::word_align_up(dead_range_end); idx_t cur_beg = range_beg; if (range_beg < range_end && is_unmarked(range_beg)) { // The range starts with dead space. Look for the next object, then fill. cur_beg = find_obj_beg(range_beg + 1, dead_search_end); --- 214,225 ---- DEBUG_ONLY(verify_bit(dead_range_end);) assert(range_beg <= range_end, "live range invalid"); assert(range_end <= dead_range_end, "dead range invalid"); // The bitmap routines require the right boundary to be word-aligned. ! const idx_t live_search_end = align_range_end(range_end); ! const idx_t dead_search_end = align_range_end(dead_range_end); idx_t cur_beg = range_beg; if (range_beg < range_end && is_unmarked(range_beg)) { // The range starts with dead space. Look for the next object, then fill. cur_beg = find_obj_beg(range_beg + 1, dead_search_end);
< prev index next >