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 #include "precompiled.hpp" 26 #include "gc_implementation/g1/g1CardCounts.hpp" 27 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 28 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 29 #include "gc_implementation/g1/g1GCPhaseTimes.hpp" 30 #include "memory/cardTableModRefBS.hpp" 31 #include "services/memTracker.hpp" 32 #include "utilities/copy.hpp" 33 34 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { 35 if (has_count_table()) { 36 assert(from_card_num >= 0 && from_card_num < _committed_max_card_num, 37 err_msg("from card num out of range: "SIZE_FORMAT, from_card_num)); 38 assert(from_card_num < to_card_num, 39 err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT, 40 from_card_num, to_card_num)); 41 assert(to_card_num <= _committed_max_card_num, 42 err_msg("to card num out of range: " 43 "to: "SIZE_FORMAT ", " 44 "max: "SIZE_FORMAT, 45 to_card_num, _committed_max_card_num)); 46 47 to_card_num = MIN2(_committed_max_card_num, to_card_num); 48 49 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); 50 } 51 } 52 53 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h): | 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 #include "precompiled.hpp" 26 #include "gc_implementation/g1/g1CardCounts.hpp" 27 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 28 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 29 #include "gc_implementation/g1/g1GCPhaseTimes.hpp" 30 #include "memory/cardTableModRefBS.hpp" 31 #include "services/memTracker.hpp" 32 #include "utilities/copy.hpp" 33 34 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 35 36 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { 37 if (has_count_table()) { 38 assert(from_card_num >= 0 && from_card_num < _committed_max_card_num, 39 err_msg("from card num out of range: "SIZE_FORMAT, from_card_num)); 40 assert(from_card_num < to_card_num, 41 err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT, 42 from_card_num, to_card_num)); 43 assert(to_card_num <= _committed_max_card_num, 44 err_msg("to card num out of range: " 45 "to: "SIZE_FORMAT ", " 46 "max: "SIZE_FORMAT, 47 to_card_num, _committed_max_card_num)); 48 49 to_card_num = MIN2(_committed_max_card_num, to_card_num); 50 51 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); 52 } 53 } 54 55 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h): |