Path: blob/master/runtime/gc_vlhgc/CopyForwardGMPCardCleaner.hpp
5986 views
1/*******************************************************************************2* Copyright (c) 1991, 2018 IBM Corp. and others3*4* This program and the accompanying materials are made available under5* the terms of the Eclipse Public License 2.0 which accompanies this6* distribution and is available at https://www.eclipse.org/legal/epl-2.0/7* or the Apache License, Version 2.0 which accompanies this distribution and8* is available at https://www.apache.org/licenses/LICENSE-2.0.9*10* This Source Code may also be made available under the following11* Secondary Licenses when the conditions for such availability set12* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13* General Public License, version 2 with the GNU Classpath14* Exception [1] and GNU General Public License, version 2 with the15* OpenJDK Assembly Exception [2].16*17* [1] https://www.gnu.org/software/classpath/license.html18* [2] http://openjdk.java.net/legal/assembly-exception.html19*20* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception21*******************************************************************************/22232425/**26* @file27* @ingroup GC_Modron_Standard28*/2930#if !defined(COPYFORWARDGMPCARDCLEANER_HPP_)31#define COPYFORWARDGMPCARDCLEANER_HPP_323334#include "j9.h"35#include "j9cfg.h"36#include "j9modron.h"3738#include "CardCleaner.hpp"3940class MM_CycleState;41class MM_HeapMap;42class MM_CopyForwardScheme;4344/**45* @todo Provide typedef documentation46* @ingroup GC_Modron_Standard47*/4849class MM_CopyForwardGMPCardCleaner : public MM_CardCleaner50{51/* Data Members */52private:53MM_CopyForwardScheme *const _copyForwardScheme; /**< The scheme to use for scanning objects which have been modified since they were last scanned */5455protected:56public:5758/* Member Functions */59private:60protected:61/**62* Clean a range of addresses (typically within a span of a card).63* This class is used for updating the RSM based on the previous mark map and scanning modified objects in the next mark map64* (note that next is always a subset of previous so anything not marked in next but marked in previous only requires RSM65* inter-region reference updating while objects marked in both require RSM updates and object scanning to update the next66* mark map).67*68* @param[in] env A thread (typically the thread initializing the GC)69* @param[in] lowAddress low address of the range to be cleaned70* @param[in] highAddress high address of the range to be cleaned71* @param cardToClean[in/out] The card which we are cleaning72*/73virtual void clean(MM_EnvironmentBase *env, void *lowAddress, void *highAddress, Card *cardToClean);7475/**76* @see MM_CardCleaner::getVMStateID()77*/78virtual UDATA getVMStateID() { return OMRVMSTATE_GC_COPY_FORWARD_GMP_CARD_CLEANER; }7980public:8182/**83* Create a CardCleaner object for updating RSM and next mark map.84*/85MM_CopyForwardGMPCardCleaner(MM_CopyForwardScheme *copyForwardScheme);86};8788#endif /* COPYFORWARDGMPCARDCLEANER_HPP_ */899091