/* * Copyright (c) 2001, 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. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// During evacuation we use the card table to consolidate the cards we need to // scan for roots onto the card table from the various sources. Further it is // used to record already completely scanned cards to avoid re-scanning them // when incrementally evacuating the old gen regions of a collection set. // This means that already scanned cards should be preserved. // // The merge at the start of each evacuation round simply sets cards to dirty // that are clean; scanned cards are set to 0x1. // // This means that the LSB determines what to do with the card during evacuation // given the following possible values: // // 11111111 - clean, do not scan // 00000001 - already scanned, do not scan // 00000000 - dirty, needs to be scanned. //
g1_card_already_scanned = 0x1
};
// Mark the given card as Dirty if it is Clean. Returns whether the card was // Clean before this operation. This result may be inaccurate as it does not // perform the dirtying atomically. inlinebool mark_clean_as_dirty(CardValue* card);
// Change Clean cards in a (large) area on the card table as Dirty, preserving // already scanned cards. Assumes that most cards in that area are Clean. inlinevoid mark_range_dirty(size_t start_card_index, size_t num_cards);
// Change the given range of dirty cards to "which". All of these cards must be Dirty. inlinevoid change_dirty_cards_to(size_t start_card_index, size_t num_cards, CardValue which);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.