-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathSharedLayerSnapshotCapnProtoSchema.capnp
More file actions
407 lines (379 loc) · 10.5 KB
/
Copy pathSharedLayerSnapshotCapnProtoSchema.capnp
File metadata and controls
407 lines (379 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# Schema file for the layer snapshot.
# After modifying this file regenerate the schema SharedLayerSnapshotCapnProtoSchemaHolder.java file with:
# mx capnp-compile
@0x9eb32e19f86ee174;
using Java = import "/capnp/java.capnp";
$Java.package("com.oracle.svm.hosted.imagelayer");
$Java.outerClassname("SharedLayerSnapshotCapnProtoSchemaHolder");
using TypeId = Int32;
using MethodId = Int32;
using FieldId = Int32;
using ConstantId = Int32;
using SingletonObjId = Int32;
using KeyStoreId = Int32;
using HostedMethodIndex = Int32;
struct PersistedAnalysisType {
id @0 :TypeId;
descriptor @1 :Text;
fields @2 :List(FieldId);
hubIdentityHashCode @3 :Int32;
classJavaName @4 :Text;
className @5 :Text;
modifiers @6 :Int32;
# Most of these fields apply only to instances and could be in a union or a separate structure:
isInterface @7 :Bool;
isEnum @8 :Bool;
# True if the type's initialization status was computed as BUILD_TIME. Build-time initialized types are not simulated.
isInitialized @9 :Bool;
# True if the type was configured as initialized at BUILD_TIME but initialization failed so it was registered as RUN_TIME.
isFailedInitialization @10 :Bool;
# Type's initializer simulation succeeded. We'll also persist simulated field values.
isSuccessfulSimulation @11 :Bool;
# Type's initializer simulation failed.
isFailedSimulation @12 :Bool;
isLinked @13 :Bool;
sourceFileName @14 :Text;
enclosingTypeId @15 :TypeId;
componentTypeId @16 :TypeId;
superClassTypeId @17 :TypeId;
isInstantiated @18 :Bool;
isUnsafeAllocated @19 :Bool;
isReachable @20 :Bool;
interfaces @21 :List(TypeId);
instanceFieldIds @22 :List(FieldId);
instanceFieldIdsWithSuper @23 :List(FieldId);
staticFieldIds @24 :List(FieldId);
annotationList @25 :List(PersistedAnnotation);
classInitializationInfo @26 :ClassInitializationInfo;
hasArrayType @27 :Bool;
hasClassInitInfo @28 :Bool;
subTypes @29 :List(TypeId);
isAnySubtypeInstantiated @30 :Bool;
wrappedType :union {
none @31 :Void; # default
serializationGenerated :group {
rawDeclaringClassId @32 :TypeId;
rawTargetConstructorId @33 :TypeId;
}
lambda :group {
capturingClass @34 :Text;
}
proxyType @35 :Void;
}
isRecord @36 :Bool;
}
struct ClassInitializationInfo {
isInitialized @0 :Bool;
isInErrorState @1 :Bool;
isLinked @2 :Bool;
hasInitializer @3 :Bool;
isBuildTimeInitialized @4 :Bool;
isTracked @5 :Bool;
initializerMethodId @6 :MethodId;
}
struct PersistedAnalysisMethod {
id @0 :MethodId;
descriptor @1 :Text;
name @2 :Text;
className @3 :Text;
declaringTypeId @4 :TypeId;
argumentClassNames @5 :List(Text);
argumentTypeIds @6 :List(TypeId);
returnTypeId @7 :TypeId;
modifiers @8 :Int32;
bytecode @9 :Data;
bytecodeSize @10 :Int32;
isConstructor @11 :Bool;
isSynthetic @12 :Bool;
canBeStaticallyBound @13 :Bool;
isVirtualRootMethod @14 :Bool;
isDirectRootMethod @15 :Bool;
isInvoked @16 :Bool;
isImplementationInvoked @17 :Bool;
isIntrinsicMethod @18 :Bool;
methodHandleIntrinsicName @19 :Text;
annotationList @20 :List(PersistedAnnotation);
isVarArgs @21 :Bool;
isBridge @22 :Bool;
isDeclared @23 :Bool;
analysisGraphLocation @24 :Text;
analysisGraphIsIntrinsic @25 :Bool;
strengthenedGraphLocation @26 :Text;
hostedMethodIndex @27 :HostedMethodIndex;
compilationBehaviorOrdinal @28 :Int8;
wrappedMethod :union {
none @29 :Void; # default
factoryMethod :group {
targetConstructorId @30 :MethodId;
throwAllocatedObject @31 :Bool;
instantiatedTypeId @32 :TypeId;
}
outlinedSB :group {
methodTypeReturn @33 :Text;
methodTypeParameters @34 :List(Text);
}
cEntryPointCallStub :group {
originalMethodId @35 :MethodId;
notPublished @36 :Bool;
}
wrappedMember :group {
union {
reflectionExpandSignature @37 :Void;
javaCallVariantWrapper @38 :Void;
}
name @39 :Text;
declaringClassName @40 :Text;
argumentTypeNames @41 :List(Text);
}
polymorphicSignature :group {
callers @42 :List(MethodId);
}
}
}
struct PersistedAnalysisField {
id @0 :FieldId;
className @1 :Text;
declaringTypeId @2 :TypeId;
typeId @3 :TypeId;
position @4 :Int32;
location @5 :Int32; # note currently we only read information about static fields' location
modifiers @6 :Int32;
isInternal @7 :Bool;
isAccessed @8 :Bool;
isRead @9 :Bool;
isWritten @10 :Bool;
isFolded @11 :Bool;
isUnsafeAccessed @12 :Bool;
isStatic @13 :Bool;
isSynthetic @14 :Bool;
annotationList @15 :List(PersistedAnnotation);
name @16 :Text;
priorInstalledLayerNum @17 :Int32;
assignmentStatus @18 :Int32;
simulatedFieldValue @19 :ConstantReference;
updatableReceivers @20 :List(ConstantId);
}
struct CEntryPointLiteralReference {
methodName @0 :Text;
definingClass @1 :Text;
parameterNames @2 :List(Text);
}
struct ConstantReference {
union {
objectConstant :group {
constantId @0 :ConstantId;
}
nullPointer @1 :Void;
notMaterialized @2 :Void;
primitiveValue @3 :PrimitiveValue;
methodPointer :group {
methodId @4 :MethodId;
permitsRewriteToPLT @5 :Bool;
}
methodOffset :group {
methodId @6 :MethodId;
}
cEntryPointLiteralCodePointer @7 :CEntryPointLiteralReference;
cGlobalDataBasePointer @8 :Void;
}
}
struct PersistedConstant {
id @0 :ConstantId;
typeId @1 :TypeId;
identityHashCode @2 :Int32;
isSimulated @3 :Bool;
objectOffset @4 :Int64;
union {
object :group {
data @5 :List(ConstantReference);
union {
instance @6 :Void;
objectArray @7 :Void;
}
relinking :union {
notRelinked @8 :Void; # default
stringConstant :group {
value @9 :Text;
}
enumConstant :group {
enumClass @10 :Text;
enumName @11 :Text;
}
classConstant :group {
typeId @12 :TypeId;
}
fieldConstant :group {
originFieldId @13 :FieldId;
requiresLateLoading @14 :Bool;
}
}
}
primitiveData @15 :PrimitiveArray;
relocatable :group {
key @16 :Text;
}
}
parentConstantId @17 :ConstantId;
parentIndex @18 :Int32;
}
struct KeyStoreEntry {
key @0 :Text;
value :union {
i @1 :Int32;
il @2 :List(Int32);
j @3 :Int64;
str @4 :Text;
strl @5 :List(Text);
zl @6 :List(Bool);
}
}
struct ImageSingletonKey {
keyClassName @0 :Text;
persistFlag @1 :Int32;
objectId @2 :SingletonObjId;
constantId @3 :ConstantId;
isInitialLayerOnly @4 :Bool;
keyStoreId @5 :KeyStoreId;
}
struct ImageSingletonObject {
id @0 :SingletonObjId;
className @1 :Text;
keyStoreId @2 :KeyStoreId;
singletonInstantiatorClass @3 :Text;
}
struct KeyStoreInstance {
id @0 :KeyStoreId;
keyStore @1 :List(KeyStoreEntry);
}
struct PersistedAnnotation {
typeName @0 :Text;
values @1 :List(PersistedAnnotationElement);
}
struct PersistedAnnotationElement {
name @0 :Text;
union {
string @1 :Text;
primitive @2 :PrimitiveValue;
primitiveArray @3 :PrimitiveArray;
enum :group {
className @4 :Text;
name @5 :Text;
}
className @6 :Text;
annotation @7 :PersistedAnnotation;
members :group {
className @8 :Text;
memberValues @9 :List(PersistedAnnotationElement);
}
}
}
struct SharedLayerSnapshot {
nextTypeId @0 :TypeId;
nextMethodId @1 :MethodId;
nextFieldId @2 :FieldId;
nextConstantId @3 :ConstantId;
staticPrimitiveFieldsConstantId @4 :ConstantId;
staticObjectFieldsConstantId @5 :ConstantId;
imageHeapEndOffset @6 :Int64;
constantsToRelink @7 :List(ConstantId);
types @8 :List(PersistedAnalysisType);
methods @9 :List(PersistedAnalysisMethod);
constants @10 :List(PersistedConstant);
singletonKeys @11 :List(ImageSingletonKey);
singletonObjects @12 :List(ImageSingletonObject);
fields @13 :List(PersistedAnalysisField);
nextLayerNumber @14 :Int32;
staticFinalFieldFoldingSingleton @15 :StaticFinalFieldFoldingSingleton;
registeredJNILibraries @16 :List(Text);
layeredRuntimeMetadataSingleton @17 :LayeredRuntimeMetadataSingleton;
dynamicHubInfos @18 :List(DynamicHubInfo);
hostedMethods @19 :List(PersistedHostedMethod);
nodeClassMapLocation @20 :Text;
sharedLayerBootLayerModules @21 :List(Text);
layeredModule @22 :LayeredModule;
cGlobals @23 :List(CGlobalDataInfo);
keyStoreInstances @24 :List(KeyStoreInstance);
}
struct StaticFinalFieldFoldingSingleton {
fields @0 :List(FieldId);
fieldCheckIndexes @1 :List(Int32);
fieldInitializationStatusList @2 :List(Bool);
bytecodeParsedFoldedFieldValues @3 :List(ConstantReference);
afterParsingHooksDoneFoldedFieldValues @4 :List(ConstantReference);
}
struct LayeredRuntimeMetadataSingleton {
methods @0 :List(MethodId);
methodStates @1 :List(Bool);
fields @2 :List(FieldId);
fieldStates @3 :List(Bool);
}
struct LayeredModule {
openModulePackages @0 :List(ModulePackages);
exportedModulePackages @1 :List(ModulePackages);
}
struct ModulePackages {
moduleKey @0 :Text;
packages @1 :List(Packages);
}
struct Packages {
packageKey @0 :Text;
modules @1 :List(Text);
}
struct PrimitiveValue {
typeChar @0 :Int8;
rawValue @1 :Int64;
}
struct PrimitiveArray {
union {
z @0 :List(Bool);
b @1 :List(Int8);
s @2 :List(Int16);
c @3 :List(UInt16);
i @4 :List(Int32);
f @5 :List(Float32);
j @6 :List(Int64);
d @7 :List(Float64);
}
}
struct CGlobalDataInfo {
isSymbolReference @0 :Bool;
isGlobalSymbol @1 :Bool;
nonConstant @2 :Bool;
layeredSymbolName @3 :Text;
linkingInfo :union {
originalSymbolName @4 :Text;
codeLocation @5 :CodeLocation;
}
}
struct CodeLocation {
bytecodeIndex @0 :Int32;
stacktraceName @1 :Text;
}
struct DispatchSlotInfo {
declaredHostedMethodIndex @0 :HostedMethodIndex;
resolvedHostedMethodIndex @1 :HostedMethodIndex;
slotIndex @2 :Int32;
resolutionStatus @3 :Int32;
slotSymbolName @4 :Text;
}
struct PersistedHostedMethod {
index @0 :Int32;
methodId @1 :MethodId;
vTableIndex @2 :Int32;
installedOffset @3 :Int32;
isVirtualCallTarget @4 :Bool;
symbolName @5 :Text;
hostedMethodName @6 :Text;
hostedMethodUniqueName @7 :Text;
}
struct DynamicHubInfo {
typeId @0 :TypeId;
installed @1 :Bool;
typecheckId @2 :Int32;
numClassTypes @3 :Int32;
numIterableInterfaceTypes @4 :Int32;
typecheckSlotValues @5 :List(Int32);
locallyDeclaredSlotsHostedMethodIndexes @6 :List(HostedMethodIndex);
dispatchTableSlotValues @7 :List(DispatchSlotInfo);
interfaceId @8 :Int32;
}