Path: blob/master/runtime/gc_modron_standard/ReadBarrierVerifier.hpp
5986 views
/*******************************************************************************1* Copyright (c) 1991, 2021 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/212223/**24* @file25* @ingroup GC_Modron_Standard26*/2728#if !defined(ReadBarrierVerifier_HPP_)29#define ReadBarrierVerifier_HPP_303132#include "j9.h"33#include "j9cfg.h"3435#include "StandardAccessBarrier.hpp"3637#if defined(OMR_ENV_DATA64) && defined(OMR_GC_FULL_POINTERS)3839/**40* Access barrier for Modron collector.41*/4243class MM_ReadBarrierVerifier : public MM_StandardAccessBarrier44{4546protected:47virtual bool initialize(MM_EnvironmentBase *env);48virtual void tearDown(MM_EnvironmentBase *env);49public:50static MM_ReadBarrierVerifier *newInstance(MM_EnvironmentBase *env, MM_MarkingScheme *markingScheme);51virtual void kill(MM_EnvironmentBase *env);5253MM_ReadBarrierVerifier(MM_EnvironmentBase *env, MM_MarkingScheme *markingScheme) :54MM_StandardAccessBarrier(env, markingScheme)55{56_typeId = __FUNCTION__;57}5859virtual bool preObjectRead(J9VMThread *vmThread, J9Object *srcObject, fj9object_t *srcAddress);60virtual bool preObjectRead(J9VMThread *vmThread, J9Class *srcClass, j9object_t *srcAddress);61virtual bool preWeakRootSlotRead(J9VMThread *vmThread, j9object_t *srcAddress);62virtual bool preWeakRootSlotRead(J9JavaVM *vm, j9object_t *srcAddress);6364void poisonSlot(MM_GCExtensionsBase *extensions, omrobjectptr_t *slot);65void poisonJniWeakReferenceSlots(MM_EnvironmentBase *env);66void poisonMonitorReferenceSlots(MM_EnvironmentBase *env);67void poisonClass(MM_EnvironmentBase *env);68virtual void poisonSlots(MM_EnvironmentBase *env);6970void healSlot(MM_GCExtensionsBase *extensions, fomrobject_t *srcAddress);71void healSlot(MM_GCExtensionsBase *extensions, omrobjectptr_t *slot);72void healJniWeakReferenceSlots(MM_EnvironmentBase *env);73void healMonitorReferenceSlots(MM_EnvironmentBase *env);74void healClass(MM_EnvironmentBase *env);75virtual void healSlots(MM_EnvironmentBase *env);767778};79#endif /* defined(OMR_ENV_DATA64) && defined(OMR_GC_FULL_POINTERS) */8081#endif /* ReadBarrierVerifier_HPP_ */82838485