Path: blob/master/runtime/gc_vlhgc/CopyForwardNoGMPCardCleaner.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(COPYFORWARDNOGMPCARDCLEANER_HPP_)31#define COPYFORWARDNOGMPCARDCLEANER_HPP_323334#include "j9.h"35#include "j9cfg.h"36#include "j9modron.h"3738#include "CardCleaner.hpp"3940class MM_HeapMap;41class MM_CopyForwardScheme;4243/**44* @todo Provide typedef documentation45* @ingroup GC_Modron_Standard46*/4748class MM_CopyForwardNoGMPCardCleaner : public MM_CardCleaner49{50/* Data Members */51private:52MM_CopyForwardScheme *_copyForwardScheme; /**< The scheme to use for scanning objects which have been modified since they were last scanned */53protected:54public:5556/* Member Functions */57private:58protected:59/**60* Clean a range of addresses (typically within a span of a card).61* This class is used for updating the RSM based on the previous mark map and scanning modified objects in the next mark map62* (note that next is always a subset of previous so anything not marked in next but marked in previous only requires RSM63* inter-region reference updating while objects marked in both require RSM updates and object scanning to update the next64* mark map).65*66* @param[in] env A thread (typically the thread initializing the GC)67* @param[in] lowAddress low address of the range to be cleaned68* @param[in] highAddress high address of the range to be cleaned69* @param cardToClean[in/out] The card which we are cleaning70*/71virtual void clean(MM_EnvironmentBase *env, void *lowAddress, void *highAddress, Card *cardToClean);7273/**74* @see MM_CardCleaner::getVMStateID()75*/76virtual UDATA getVMStateID() { return OMRVMSTATE_GC_COPY_FORWARD_NO_GMP_CARD_CLEANER; }7778public:7980/**81* Create a CardCleaner object for updating RSM and next mark map.82*/83MM_CopyForwardNoGMPCardCleaner(MM_CopyForwardScheme *copyForwardScheme)84: MM_CardCleaner()85, _copyForwardScheme(copyForwardScheme)86{87_typeId = __FUNCTION__;88}89};9091#endif /* COPYFORWARDNOGMPCARDCLEANER_HPP_ */929394