Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/gc_glue_java/MarkingSchemeRootClearer.hpp
5990 views
1
2
/*******************************************************************************
3
* Copyright (c) 1991, 2017 IBM Corp. and others
4
*
5
* This program and the accompanying materials are made available under
6
* the terms of the Eclipse Public License 2.0 which accompanies this
7
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
* or the Apache License, Version 2.0 which accompanies this distribution and
9
* is available at https://www.apache.org/licenses/LICENSE-2.0.
10
*
11
* This Source Code may also be made available under the following
12
* Secondary Licenses when the conditions for such availability set
13
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
* General Public License, version 2 with the GNU Classpath
15
* Exception [1] and GNU General Public License, version 2 with the
16
* OpenJDK Assembly Exception [2].
17
*
18
* [1] https://www.gnu.org/software/classpath/license.html
19
* [2] http://openjdk.java.net/legal/assembly-exception.html
20
*
21
* 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-exception
22
*******************************************************************************/
23
24
#if !defined(MARKINGSCHEMEROOTCLEARER_HPP_)
25
#define MARKINGSCHEMEROOTCLEARER_HPP_
26
27
#include "j9.h"
28
29
#include "ModronTypes.hpp"
30
#include "RootScanner.hpp"
31
32
class MM_EnvironmentBase;
33
class MM_MarkingScheme;
34
class MM_MarkingDelegate;
35
class MM_ReferenceStats;
36
37
class MM_MarkingSchemeRootClearer : public MM_RootScanner
38
{
39
/* Data members & types */
40
public:
41
protected:
42
private:
43
MM_MarkingScheme *_markingScheme;
44
MM_MarkingDelegate *_markingDelegate;
45
46
/* Methods */
47
public:
48
MM_MarkingSchemeRootClearer(MM_EnvironmentBase *env, MM_MarkingScheme *markingScheme, MM_MarkingDelegate *markingDelegate) :
49
MM_RootScanner(env)
50
, _markingScheme(markingScheme)
51
, _markingDelegate(markingDelegate)
52
{
53
_typeId = __FUNCTION__;
54
};
55
56
virtual void doSlot(omrobjectptr_t *slotPtr);
57
virtual void doClass(J9Class *clazz);
58
virtual void scanWeakReferenceObjects(MM_EnvironmentBase *env);
59
virtual CompletePhaseCode scanWeakReferencesComplete(MM_EnvironmentBase *env);
60
virtual void scanSoftReferenceObjects(MM_EnvironmentBase *env);
61
virtual CompletePhaseCode scanSoftReferencesComplete(MM_EnvironmentBase *env);
62
virtual void scanPhantomReferenceObjects(MM_EnvironmentBase *env);
63
virtual CompletePhaseCode scanPhantomReferencesComplete(MM_EnvironmentBase *env);
64
virtual void scanUnfinalizedObjects(MM_EnvironmentBase *env);
65
virtual CompletePhaseCode scanUnfinalizedObjectsComplete(MM_EnvironmentBase *env);
66
virtual void scanOwnableSynchronizerObjects(MM_EnvironmentBase *env);
67
virtual void doMonitorReference(J9ObjectMonitor *objectMonitor, GC_HashTableIterator *monitorReferenceIterator);
68
virtual CompletePhaseCode scanMonitorReferencesComplete(MM_EnvironmentBase *envBase);
69
virtual void doJNIWeakGlobalReference(omrobjectptr_t *slotPtr);
70
virtual void doRememberedSetSlot(omrobjectptr_t *slotPtr, GC_RememberedSetSlotIterator *rememberedSetSlotIterator);
71
virtual void doStringTableSlot(omrobjectptr_t *slotPtr, GC_StringTableIterator *stringTableIterator);
72
virtual void doStringCacheTableSlot(omrobjectptr_t *slotPtr);
73
virtual void doJVMTIObjectTagSlot(omrobjectptr_t *slotPtr, GC_JVMTIObjectTagTableIterator *objectTagTableIterator);
74
virtual void doFinalizableObject(omrobjectptr_t object);
75
76
protected:
77
private:
78
};
79
80
#endif /* MARKINGSCHEMEROOTCLEARER_HPP_ */
81
82