3792N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 1193N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1193N/A * This code is free software; you can redistribute it and/or modify it 1193N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. 2362N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1193N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1193N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1193N/A * version 2 for more details (a copy is included in the LICENSE file that 1193N/A * You should have received a copy of the GNU General Public License version 1193N/A * 2 along with this work; if not, write to the Free Software Foundation, 1193N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1193N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5790N/A // The max value we can store in the counts table is 5790N/A // max_jubyte. Guarantee the value of the hot 5459N/A // threshold limit is no more than this. 5459N/A warning(
"Could not reserve enough space for the card counts table");
5459N/A // Expand the card counts table to handle a heap with the given capacity. 5459N/A // Don't expand if we failed to reserve the card counts table. 5459N/A // Verify that the committed space for the card counts matches our 5459N/A // committed max card num. Note for some allocation alignments, the 5459N/A // amount of space actually committed for the counts table will be able 5459N/A // to span more cards than the number spanned by the maximum heap. 5462N/A // we need to expand the backing store for the card counts 5459N/A "expansion commit failure");
5459N/A // Returns the number of times the card has been refined. 5459N/A // If card_ptr is beyond the committed end of the counts table, 5459N/A // Otherwise return the actual count. 5459N/A // Unless G1ConcRSHotCardLimit has been set appropriately, 5459N/A // returning 0 will result in the card being considered 5459N/A // cold and will be refined immediately. 5459N/A // We use the last address in hr as hr could be the 5459N/A // last region in the heap. In which case trying to find 5459N/A // the card for hr->end() will be an OOB accesss to the 5459N/A // Clear the counts for the (exclusive) card range.