Path: blob/master/runtime/gc_glue_java/MarkingSchemeRootClearer.hpp
5990 views
1/*******************************************************************************2* Copyright (c) 1991, 2017 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*******************************************************************************/2223#if !defined(MARKINGSCHEMEROOTCLEARER_HPP_)24#define MARKINGSCHEMEROOTCLEARER_HPP_2526#include "j9.h"2728#include "ModronTypes.hpp"29#include "RootScanner.hpp"3031class MM_EnvironmentBase;32class MM_MarkingScheme;33class MM_MarkingDelegate;34class MM_ReferenceStats;3536class MM_MarkingSchemeRootClearer : public MM_RootScanner37{38/* Data members & types */39public:40protected:41private:42MM_MarkingScheme *_markingScheme;43MM_MarkingDelegate *_markingDelegate;4445/* Methods */46public:47MM_MarkingSchemeRootClearer(MM_EnvironmentBase *env, MM_MarkingScheme *markingScheme, MM_MarkingDelegate *markingDelegate) :48MM_RootScanner(env)49, _markingScheme(markingScheme)50, _markingDelegate(markingDelegate)51{52_typeId = __FUNCTION__;53};5455virtual void doSlot(omrobjectptr_t *slotPtr);56virtual void doClass(J9Class *clazz);57virtual void scanWeakReferenceObjects(MM_EnvironmentBase *env);58virtual CompletePhaseCode scanWeakReferencesComplete(MM_EnvironmentBase *env);59virtual void scanSoftReferenceObjects(MM_EnvironmentBase *env);60virtual CompletePhaseCode scanSoftReferencesComplete(MM_EnvironmentBase *env);61virtual void scanPhantomReferenceObjects(MM_EnvironmentBase *env);62virtual CompletePhaseCode scanPhantomReferencesComplete(MM_EnvironmentBase *env);63virtual void scanUnfinalizedObjects(MM_EnvironmentBase *env);64virtual CompletePhaseCode scanUnfinalizedObjectsComplete(MM_EnvironmentBase *env);65virtual void scanOwnableSynchronizerObjects(MM_EnvironmentBase *env);66virtual void doMonitorReference(J9ObjectMonitor *objectMonitor, GC_HashTableIterator *monitorReferenceIterator);67virtual CompletePhaseCode scanMonitorReferencesComplete(MM_EnvironmentBase *envBase);68virtual void doJNIWeakGlobalReference(omrobjectptr_t *slotPtr);69virtual void doRememberedSetSlot(omrobjectptr_t *slotPtr, GC_RememberedSetSlotIterator *rememberedSetSlotIterator);70virtual void doStringTableSlot(omrobjectptr_t *slotPtr, GC_StringTableIterator *stringTableIterator);71virtual void doStringCacheTableSlot(omrobjectptr_t *slotPtr);72virtual void doJVMTIObjectTagSlot(omrobjectptr_t *slotPtr, GC_JVMTIObjectTagTableIterator *objectTagTableIterator);73virtual void doFinalizableObject(omrobjectptr_t object);7475protected:76private:77};7879#endif /* MARKINGSCHEMEROOTCLEARER_HPP_ */808182