Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/ddr/gcddr.cpp
5991 views
1
/*******************************************************************************
2
* Copyright (c) 2017, 2021 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* 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 and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
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-exception
21
*******************************************************************************/
22
23
#include "AllocateDescription.hpp"
24
#include "AllocationCategory.hpp"
25
#include "CompactScheme.hpp"
26
#include "ConcurrentCardTable.hpp"
27
#include "CopyScanCacheStandard.hpp"
28
#include "FreeHeapRegionList.hpp"
29
#include "GCExtensions.hpp"
30
#include "HeapIteratorAPI.h"
31
#include "HeapMap.hpp"
32
#include "IncrementalCardTable.hpp"
33
#include "MemoryPool.hpp"
34
#include "MemoryPoolAddressOrderedList.hpp"
35
#include "MemoryPoolHybrid.hpp"
36
#include "MemoryPoolSplitAddressOrderedList.hpp"
37
#include "RealtimeMarkingScheme.hpp"
38
#include "ScavengerForwardedHeader.hpp"
39
#include "StringTable.hpp"
40
#include "SweepPoolManager.hpp"
41
42
#if defined(J9VM_GC_FINALIZATION)
43
# include "FinalizeListManager.hpp"
44
#endif /* J9VM_GC_FINALIZATION */
45
46
#if defined(OMR_GC_SEGREGATED_HEAP)
47
# include "MemoryPoolSegregated.hpp"
48
# include "MemorySubSpaceSegregated.hpp"
49
# include "ObjectHeapIteratorSegregated.hpp"
50
# include "SegregatedGC.hpp"
51
#endif /* OMR_GC_SEGREGATED_HEAP */
52
53
#include "ddrhelp.h"
54
55
#define GC_DdrDebugLink(type) DdrDebugLink(gc, type)
56
57
GC_DdrDebugLink(J9ModronAllocateHint)
58
GC_DdrDebugLink(MM_AllocateDescription)
59
GC_DdrDebugLink(MM_AllocationCategory)
60
GC_DdrDebugLink(MM_ConcurrentCardTable)
61
GC_DdrDebugLink(MM_CopyScanCacheStandard)
62
GC_DdrDebugLink(MM_FreeHeapRegionList)
63
GC_DdrDebugLink(MM_GCExtensions)
64
GC_DdrDebugLink(MM_HeapLinkedFreeHeader)
65
GC_DdrDebugLink(MM_HeapMap)
66
GC_DdrDebugLink(MM_HeapRegionDescriptor)
67
GC_DdrDebugLink(MM_HeapRegionDescriptor::RegionType)
68
GC_DdrDebugLink(MM_IncrementalCardTable)
69
GC_DdrDebugLink(MM_LargeObjectAllocateStats)
70
GC_DdrDebugLink(MM_MemoryPoolAddressOrderedList)
71
GC_DdrDebugLink(MM_MemoryPoolHybrid)
72
GC_DdrDebugLink(MM_MemoryPoolSplitAddressOrderedList)
73
GC_DdrDebugLink(MM_RealtimeMarkingScheme)
74
GC_DdrDebugLink(MM_ScavengerForwardedHeader)
75
GC_DdrDebugLink(MM_StringTable)
76
77
#if defined(J9VM_GC_FINALIZATION)
78
GC_DdrDebugLink(GC_FinalizeListManager)
79
#endif /* J9VM_GC_FINALIZATION */
80
81
#if defined(OMR_GC_SEGREGATED_HEAP)
82
GC_DdrDebugLink(GC_ObjectHeapIteratorSegregated)
83
GC_DdrDebugLink(MM_MemoryPoolSegregated)
84
GC_DdrDebugLink(MM_MemorySubSpaceSegregated)
85
GC_DdrDebugLink(MM_SegregatedGC)
86
#endif /* OMR_GC_SEGREGATED_HEAP */
87
88
/*
89
* Suggest to compilers that they include fuller descriptions of certain types.
90
*/
91
92
class DDR_MM_AllocateDescription : public MM_AllocateDescription
93
{
94
public:
95
MM_MemorySubSpace::AllocationType _ddrAllocationType;
96
MM_MemorySubSpace::AllocationType getAllocationType();
97
};
98
99
MM_MemorySubSpace::AllocationType
100
DDR_MM_AllocateDescription::getAllocationType()
101
{
102
return this->_ddrAllocationType;
103
}
104
105
class DDR_MM_HeapRegionDescriptor : public MM_HeapRegionDescriptor
106
{
107
public:
108
MM_HeapRegionDescriptor::RegionType _ddrRegionType;
109
MM_HeapRegionDescriptor::RegionType getRegionType();
110
};
111
112
MM_HeapRegionDescriptor::RegionType
113
DDR_MM_HeapRegionDescriptor::getRegionType()
114
{
115
return this->_ddrRegionType;
116
}
117
118
class DDR_MM_MemoryPoolHybrid : public MM_MemoryPoolHybrid
119
{
120
public:
121
const char * ddrHelper();
122
};
123
124
const char *
125
DDR_MM_MemoryPoolHybrid::ddrHelper()
126
{
127
return this->_typeId;
128
}
129
130
class DDR_MM_HeapRegionList : public MM_HeapRegionList
131
{
132
public:
133
MM_HeapRegionList::RegionListKind _ddrRegionListKind;
134
MM_HeapRegionList::RegionListKind getRegionListKind();
135
};
136
137
MM_HeapRegionList::RegionListKind
138
DDR_MM_HeapRegionList::getRegionListKind()
139
{
140
return this->_ddrRegionListKind;
141
}
142
143
#if defined(OMR_GC_MODRON_COMPACTION)
144
145
class DDR_CompactMemoryPoolState : public MM_CompactMemoryPoolState
146
{
147
public:
148
const char * ddrHelper();
149
};
150
151
const char *
152
DDR_CompactMemoryPoolState::ddrHelper()
153
{
154
return this->_typeId;
155
}
156
157
#endif /* OMR_GC_MODRON_COMPACTION */
158
159
#if defined(OMR_GC_SEGREGATED_HEAP)
160
161
class DDR_GC_ObjectHeapIteratorSegregated : public GC_ObjectHeapIteratorSegregated
162
{
163
public:
164
MM_HeapRegionDescriptor::RegionType _ddrRegionType;
165
MM_HeapRegionDescriptor::RegionType getRegionType();
166
};
167
168
MM_HeapRegionDescriptor::RegionType
169
DDR_GC_ObjectHeapIteratorSegregated::getRegionType()
170
{
171
return this->_ddrRegionType;
172
}
173
174
class DDR_SegregatedGC : public MM_SegregatedGC
175
{
176
public:
177
MM_SegregatedMarkingScheme *getMarkingScheme();
178
};
179
180
MM_SegregatedMarkingScheme *
181
DDR_SegregatedGC::getMarkingScheme()
182
{
183
return this->_markingScheme;
184
}
185
186
#endif /* OMR_GC_SEGREGATED_HEAP */
187
188