-
Notifications
You must be signed in to change notification settings - Fork 736
/
Copy pathj9nonbuilder.h
6371 lines (5929 loc) · 265 KB
/
j9nonbuilder.h
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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*******************************************************************************
* Copyright IBM Corp. and others 1991
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] https://openjdk.org/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
*******************************************************************************/
/* This file contains J9-specific things which have been moved from builder.
* DO NOT include it directly - it is automatically included at the end of j9generated.h
* (which also should not be directly included). Include j9.h to get this file.
*/
#ifndef J9NONBUILDER_H
#define J9NONBUILDER_H
/* @ddr_namespace: map_to_type=J9NonbuilderConstants */
#include "j9vmconstantpool.h"
#include "j9consts.h"
#include "jvmti.h"
#include "j9javaaccessflags.h"
#define J9VM_MAX_HIDDEN_FIELDS_PER_CLASS 8
#define J9VM_DLT_HISTORY_SIZE 16
#define J9VM_OBJECT_MONITOR_CACHE_SIZE 32
#define J9VM_ASYNC_MAX_HANDLERS 32
/* The bit fields used by verifyQualifiedName to verify a qualified class name */
#define CLASSNAME_INVALID 0
#define CLASSNAME_VALID_NON_ARRARY 0x1
#define CLASSNAME_VALID_ARRARY 0x2
#define CLASSNAME_VALID (CLASSNAME_VALID_NON_ARRARY | CLASSNAME_VALID_ARRARY)
/* @ddr_namespace: map_to_type=J9JITDataCacheConstants */
/* Constants from J9JITDataCacheConstants */
#define J9DataTypeAotMethodHeader 0x80
#define J9DataTypeAOTPersistentInfo 0x400
#define J9DataTypeExceptionInfo 0x1
#define J9DataTypeHashTable 0x20
#define J9DataTypeInUse 0x200
#define J9DataTypeMccHtEntry 0x40
#define J9DataTypeRelocationData 0x4
#define J9DataTypeStackAtlas 0x2
#define J9DataTypeThunkMappingData 0x10
#define J9DataTypeThunkMappingList 0x8
#define J9DataTypeUnallocated 0x100
/* @ddr_namespace: map_to_type=J9JavaClassFlags */
/* Constants from J9JavaClassFlags */
#define J9ClassDoNotAttemptToSetInitCache 0x1
#define J9ClassHasIllegalFinalFieldModifications 0x2
#define J9ClassReusedStatics 0x4
#define J9ClassContainsJittedMethods 0x8
#define J9ClassContainsMethodsPresentInMCCHash 0x10
#define J9ClassGCScanned 0x20
#define J9ClassIsAnonymous 0x40
#define J9ClassIsFlattened 0x80
#define J9ClassHasWatchedFields 0x100
#define J9ClassReservableLockWordInit 0x200
#define J9ClassIsValueType 0x400
#define J9ClassLargestAlignmentConstraintReference 0x800
#define J9ClassLargestAlignmentConstraintDouble 0x1000
#define J9ClassIsExemptFromValidation 0x2000
#define J9ClassContainsUnflattenedFlattenables 0x4000
#define J9ClassCanSupportFastSubstitutability 0x8000
#define J9ClassHasReferences 0x10000
#define J9ClassRequiresPrePadding 0x20000
#define J9ClassIsValueBased 0x40000
#define J9ClassHasIdentity 0x80000
#define J9ClassEnsureHashed 0x100000
#define J9ClassHasOffloadAllowSubtasksNatives 0x200000
#define J9ClassIsPrimitiveValueType 0x400000
#define J9ClassAllowsNonAtomicCreation 0x800000
/* @ddr_namespace: map_to_type=J9FieldFlags */
/* Constants from J9FieldFlags */
#define J9FieldFlagConstant 0x400000
#define J9FieldFlagHasFieldAnnotations 0x20000000
#define J9FieldFlagHasGenericSignature 0x40000000
#define J9FieldFlagHasTypeAnnotations 0x800000
#define J9FieldFlagIsContended 0x10000000
#define J9FieldFlagObject 0x20000
#define J9FieldFlagFlattened 0x1000000
#define J9FieldFlagIsNullRestricted 0x2000000
#define J9FieldFlagUnused_4000000 0x4000000
#define J9FieldFlagPutResolved 0x8000000
#define J9FieldFlagResolved 0x80000000
#define J9FieldFlagsBaseTypeShift 0x3
#define J9FieldSizeDouble 0x40000
#define J9FieldTypeBoolean 0x80000
#define J9FieldTypeByte 0x200000
#define J9FieldTypeChar 0x0
#define J9FieldTypeDouble 0x180000
#define J9FieldTypeFloat 0x100000
#define J9FieldTypeInt 0x300000
#define J9FieldTypeLong 0x380000
#define J9FieldTypeMask 0x380000
#define J9FieldTypeShort 0x280000
/* @ddr_namespace: map_to_type=J9RecordComponentFlags */
/* Constants from J9RecordComponentFlags */
#define J9RecordComponentFlagHasGenericSignature 0x1
#define J9RecordComponentFlagHasAnnotations 0x2
#define J9RecordComponentFlagHasTypeAnnotations 0x4
/* @ddr_namespace: map_to_type=J9ArrayShapeFlags */
/* Constants from J9ArrayShapeFlags */
#define J9ArrayShape8Bit 0x0
#define J9ArrayShape16Bit 0x1
#define J9ArrayShape32Bit 0x2
#define J9ArrayShape64Bit 0x3
/* @ddr_namespace: map_to_type=J9ClassInitFlags */
/* Constants from J9ClassInitFlags */
#define J9ClassInitNotInitialized 0x0
#define J9ClassInitSucceeded 0x1
#define J9ClassInitFailed 0x2
#define J9ClassInitUnverified 0x3
#define J9ClassInitUnprepared 0x4
#define J9ClassInitStatusMask 0xFF
/* @ddr_namespace: map_to_type=J9DescriptionBits */
/* Constants from J9DescriptionBits */
#define J9DescriptionCpTypeClass 0x2
#define J9DescriptionCpTypeConstantDynamic 0x5
#define J9DescriptionCpTypeMask 0xF
#define J9DescriptionCpTypeMethodHandle 0x4
#define J9DescriptionCpTypeMethodType 0x3
#define J9DescriptionCpTypeObject 0x1
#define J9DescriptionCpTypeScalar 0x0
#define J9DescriptionCpTypeShift 0x4
#define J9DescriptionImmediate 0x1
/* Rom CP Flag for constant dynamic with primitive type */
#define J9DescriptionReturnTypeBoolean 0x1
#define J9DescriptionReturnTypeByte 0x2
#define J9DescriptionReturnTypeChar 0x3
#define J9DescriptionReturnTypeShort 0x4
#define J9DescriptionReturnTypeFloat 0x5
#define J9DescriptionReturnTypeInt 0x6
#define J9DescriptionReturnTypeDouble 0x7
#define J9DescriptionReturnTypeLong 0x8
/* ROM CP have 32 bit slots, currently the least significant 20 bits are in use
* so the Constant Dynamic return types will be shifted left to use the free bits
*/
#define J9DescriptionReturnTypeShift 20
#define J9DescriptionCpBsmIndexMask 0xFFFF
/* @ddr_namespace: map_to_type=J9NativeTypeCodes */
/* Constants from J9NativeTypeCodes */
#define J9NtcBoolean 0x1
#define J9NtcByte 0x2
#define J9NtcChar 0x3
#define J9NtcClass 0xA
#define J9NtcDouble 0x7
#define J9NtcFloat 0x5
#define J9NtcInt 0x6
#define J9NtcLong 0x8
#define J9NtcObject 0x9
#define J9NtcPointer 0xB
#define J9NtcShort 0x4
#define J9NtcVoid 0x0
#define J9NtcStruct 0xC
/* @ddr_namespace: map_to_type=J9VMRuntimeFlags */
/* Constants from J9VMRuntimeFlags */
#define J9RuntimeFlagAggressive 0x100000
#define J9RuntimeFlagAggressiveVerification 0x1000000
#define J9RuntimeFlagAlwaysCopyJNICritical 0x10
#define J9RuntimeFlagAOTStripped 0x800
#define J9RuntimeFlagArgencodingLatin 0x4000
#define J9RuntimeFlagArgencodingUnicode 0x2000
#define J9RuntimeFlagArgencodingUtf8 0x8000
#define J9RuntimeFlagUnused0x80 0x80 /* unused flag */
#define J9RuntimeFlagCleanUp 0x40
#define J9RuntimeFlagJavaBaseModuleCreated 0x8
#define J9RuntimeFlagDFPBD 0x4000000
#define J9RuntimeFlagDisableVMShutdown 0x8000000
#define J9RuntimeFlagExitStarted 0x800000
#define J9RuntimeFlagExtendedMethodBlock 0x200000
#define J9RuntimeFlagInitialized 0x4
#define J9RuntimeFlagJITActive 0x20
#define J9RuntimeFlagNoPriorities 0x2000000
#define J9RuntimeFlagOmitStackTraces 0x20000000
#define J9RuntimeFlagPaintStack 0x400
#define J9RuntimeFlagPPC32On64 0x80000000
#define J9RuntimeFlagReportStackUse 0x1
#define J9RuntimeFlagUnused0x10000000 0x10000000
#define J9RuntimeFlagShowVersion 0x40000000
#define J9RuntimeFlagShutdown 0x100
#define J9RuntimeFlagShutdownStarted 0x400000
#define J9RuntimeFlagSniffAndWhack 0x1000
#define J9RuntimeFlagVerify 0x2
#define J9RuntimeFlagXfuture 0x200
/* @ddr_namespace: map_to_type=J9RemoteDbgInfoConstants */
/* Constants from J9RemoteDbgInfoConstants */
#define RDBGID_JXE 0x2
#define RDBGID_ROM 0x1
#define RDBGInfo_Ok 0x0
#define RDBGInfoErr_NoInfo 0x1
#define RDBGInfoFlag_ClassInfo 0x2
#define RDBGInfoFlag_Locked 0x8
#define RDBGInfoFlag_MethodInfo 0x1
#define RDBGInfoFlag_SourceDebugExtension 0x4
#define RDBGRequestType_ClassInfoVM 0x2
#define RDBGRequestType_MethodInfoVM 0x3
#define RDBGRequestType_SourceDebugExtension 0x6
#define RDBGRequestType_SymbolFile 0x1
#define RDBGRequestType_TargetName 0x4
#define RDBGRequestType_TranslateClass 0x5
/* @ddr_namespace: map_to_type=J9NonbuilderConstants */
#define J9_ROMCLASS_OPTINFO_SOURCE_FILE_NAME 0x1
#define J9_ROMCLASS_OPTINFO_GENERIC_SIGNATURE 0x2
#define J9_ROMCLASS_OPTINFO_SOURCE_DEBUG_EXTENSION 0x4
#define J9_ROMCLASS_OPTINFO_TYPE_TABLE 0x20
#define J9_ROMCLASS_OPTINFO_ENCLOSING_METHOD 0x40
#define J9_ROMCLASS_OPTINFO_SIMPLE_NAME 0x80
#define J9_ROMCLASS_OPTINFO_LOCAL 0x1000
#define J9_ROMCLASS_OPTINFO_REMOTE 0x2000
#define J9_ROMCLASS_OPTINFO_VERIFY_EXCLUDE 0x4000
#define J9_ROMCLASS_OPTINFO_CLASS_ANNOTATION_INFO 0x8000
#define J9_ROMCLASS_OPTINFO_VARIABLE_TABLE_HAS_GENERIC 0x10000
#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)
#define J9_ROMCLASS_OPTINFO_PRELOAD_ATTRIBUTE 0x20000
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
#define J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE 0x40000
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
#define J9_ROMCLASS_OPTINFO_UNUSED_80000 0x80000
#define J9_ROMCLASS_OPTINFO_UNUSED_100000 0x100000
#define J9_ROMCLASS_OPTINFO_UNUSED 0x200000
#define J9_ROMCLASS_OPTINFO_TYPE_ANNOTATION_INFO 0x400000
#define J9_ROMCLASS_OPTINFO_RECORD_ATTRIBUTE 0x800000
#define J9_ROMCLASS_OPTINFO_PERMITTEDSUBCLASSES_ATTRIBUTE 0x1000000
#define J9_ROMCLASS_OPTINFO_INJECTED_INTERFACE_INFO 0x2000000
/* Constants for checkVisibility return results */
#define J9_VISIBILITY_ALLOWED 1
#define J9_VISIBILITY_NON_MODULE_ACCESS_ERROR 0
#define J9_VISIBILITY_MODULE_READ_ACCESS_ERROR -1
#define J9_VISIBILITY_MODULE_PACKAGE_EXPORT_ERROR -2
#if JAVA_SPEC_VERSION >= 11
#define J9_VISIBILITY_NEST_HOST_LOADING_FAILURE_ERROR -3
#define J9_VISIBILITY_NEST_HOST_DIFFERENT_PACKAGE_ERROR -4
#define J9_VISIBILITY_NEST_MEMBER_NOT_CLAIMED_ERROR -5
#endif /* JAVA_SPEC_VERSION >= 11 */
#define J9_CATCHTYPE_VALUE_FOR_SYNTHETIC_HANDLER_4BYTES 0xFFFFFFFF
#define J9_CATCHTYPE_VALUE_FOR_SYNTHETIC_HANDLER_2BYTES 0xFFFF
#if JAVA_SPEC_VERSION >= 19
#define J9JVMTI_MAX_TLS_KEYS 124
typedef void(*j9_tls_finalizer_t)(void *);
#endif /* JAVA_SPEC_VERSION >= 19 */
typedef enum {
J9FlushCompQueueDataBreakpoint
} J9JITFlushCompilationQueueReason;
/* Forward struct declarations. */
struct DgRasInterface;
struct J9BytecodeVerificationData;
struct J9CfrClassFile;
struct J9Class;
struct J9ClassLoader;
struct J9ConstantPool;
struct J9HashTable;
struct J9HookedNative;
struct J9JavaVM;
struct J9JVMTIClassPair;
struct J9JXEDescription;
struct J9MemorySegment;
struct J9MemorySegmentList;
struct J9Method;
struct J9MM_HeapRootSlotDescriptor;
struct J9MM_IterateHeapDescriptor;
struct J9MM_IterateObjectDescriptor;
struct J9MM_IterateObjectRefDescriptor;
struct J9MM_IterateRegionDescriptor;
struct J9MM_IterateSpaceDescriptor;
struct J9ObjectMonitorInfo;
struct J9Pool;
struct J9PortLibrary;
struct J9RASdumpAgent;
struct J9RASdumpContext;
struct J9RASdumpFunctions;
struct J9ROMClass;
struct J9ROMMethod;
struct J9SharedInternSRPHashTableEntry;
struct J9Statistic;
struct J9UTF8;
struct J9VerboseSettings;
struct J9VMInterface;
struct J9VMThread;
struct JNINativeInterface_;
struct OMR_VM;
struct VMIZipFile;
struct TR_AOTHeader;
struct J9BranchTargetStack;
#if JAVA_SPEC_VERSION >= 16
struct J9UpcallSigType;
struct J9UpcallMetaData;
struct J9UpcallNativeSignature;
#endif /* JAVA_SPEC_VERSION >= 16 */
#if JAVA_SPEC_VERSION >= 19
struct J9VMContinuation;
#endif /* JAVA_SPEC_VERSION >= 19 */
/* @ddr_namespace: map_to_type=J9CfrError */
/* Jazz 82615: Both errorPC (current pc value) and errorFrameBCI (bci value in the stack map frame)
* are required in detailed error message when error occurs during static verification.
* Note: we use verboseErrorType in the error message framework to store the specific error type
* in the case of errorCode = J9NLS_BCV_ERR_INCONSISTENT_STACK__ID.
*/
typedef struct J9CfrError {
U_16 errorCode;
U_16 errorAction;
U_32 errorCatalog;
U_32 errorOffset;
I_32 errorMethod;
U_32 errorPC;
U_32 errorFrameBCI;
I_32 errorFrameIndex;
U_32 errorDataIndex; /* Used to store the invalid index value when the verification error occurs */
I_32 verboseErrorType;
I_32 errorBsmIndex;
U_32 errorBsmArgsIndex;
U_32 errorCPType;
U_16 errorMaxMajorVersion;
U_16 errorMajorVersion;
U_16 errorMinorVersion;
struct J9CfrMethod* errorMember;
struct J9CfrConstantPoolInfo* constantPool;
} J9CfrError;
#define CFR_ThrowNoClassDefFoundError J9VMCONSTANTPOOL_JAVALANGNOCLASSDEFFOUNDERROR
#define CFR_ThrowOutOfMemoryError J9VMCONSTANTPOOL_JAVALANGOUTOFMEMORYERROR
#define CFR_NoAction 0
#define CFR_ThrowClassCircularityError J9VMCONSTANTPOOL_JAVALANGCLASSCIRCULARITYERROR
#define CFR_ThrowUnsupportedClassVersionError J9VMCONSTANTPOOL_JAVALANGUNSUPPORTEDCLASSVERSIONERROR
#define CFR_ThrowVerifyError J9VMCONSTANTPOOL_JAVALANGVERIFYERROR
#define CFR_ThrowClassFormatError J9VMCONSTANTPOOL_JAVALANGCLASSFORMATERROR
typedef struct J9ROMClassCfrError {
U_16 errorCode;
U_16 errorAction;
U_32 errorCatalog;
U_32 errorOffset;
I_32 errorMethod;
U_32 errorPC;
J9SRP errorMember;
J9SRP constantPool;
} J9ROMClassCfrError;
#define J9ROMCLASSCFRERROR_ERRORMEMBER(base) SRP_GET((base)->errorMember, struct J9ROMClassCfrMember*)
#define J9ROMCLASSCFRERROR_CONSTANTPOOL(base) SRP_GET((base)->constantPool, struct J9ROMClassCfrConstantPoolInfo*)
typedef struct J9ROMClassCfrMember {
U_16 accessFlags;
U_16 nameIndex;
U_16 descriptorIndex;
U_16 attributesCount;
} J9ROMClassCfrMember;
/* @ddr_namespace: map_to_type=J9ContendedLoadTableEntry */
typedef struct J9ContendedLoadTableEntry {
U_8* className; /* these three fields are used as search keys */
UDATA classNameLength;
struct J9ClassLoader* classLoader;
UDATA hashValue; /* need this to get the hash value when the className pointer is null */
IDATA count; /* number of threads trying to load the class */
UDATA status;
struct J9VMThread *thread; /* to detect class circularity */
} J9ContendedLoadTableEntry;
#define CLASSLOADING_DUMMY 0
#define CLASSLOADING_LOAD_IN_PROGRESS 1
#define CLASSLOADING_LOAD_SUCCEEDED 2
#define CLASSLOADING_LOAD_FAILED 3
#define CLASSLOADING_DONT_CARE 4
typedef struct J9ROMClassCfrConstantPoolInfo {
U_8 tag;
U_8 flags1;
U_16 nextCPIndex;
U_32 slot1;
U_32 slot2;
J9SRP bytes;
} J9ROMClassCfrConstantPoolInfo;
#define J9ROMCLASSCFRCONSTANTPOOLINFO_BYTES(base) SRP_GET((base)->bytes, U_8*)
typedef struct J9JSRIAddressMap {
struct J9JSRICodeBlock** entries;
U_8* reachable;
U_16* lineNumbers;
} J9JSRIAddressMap;
typedef struct J9JSRICodeBlock {
U_32 originalPC;
U_32 length;
U_32 newPC;
U_32 coloured;
struct J9JSRICodeBlock* primaryChild;
struct J9JSRICodeBlock* secondaryChild;
struct J9JSRICodeBlock* nextBlock;
struct J9JSRIJSRData* jsrData;
} J9JSRICodeBlock;
/* Jazz 82615: we use verboseErrorType in the error message framework to store the specific error type
* in the case of errorCode = J9NLS_BCV_ERR_INCONSISTENT_STACK__ID.
*/
typedef struct J9JSRIData {
struct J9PortLibrary * portLib;
struct J9CfrAttributeCode* codeAttribute;
U_8* freePointer;
U_8* segmentEnd;
U_8* sourceBuffer;
UDATA sourceBufferSize;
U_8* destBuffer;
UDATA destBufferSize;
UDATA destBufferIndex;
struct J9JSRIAddressMap* map;
UDATA mapSize;
UDATA maxStack;
UDATA maxLocals;
struct J9CfrConstantPoolInfo* constantPool;
struct J9JSRIExceptionListEntry* originalExceptionTable;
struct J9JSRIExceptionListEntry* exceptionTable;
struct J9JSRICodeBlock* firstOutput;
struct J9JSRICodeBlock* lastOutput;
struct J9Pool* codeBlockPool;
struct J9Pool* jsrDataPool;
struct J9Pool* exceptionListEntryPool;
UDATA wideBranchesNeeded;
struct J9JSRIBranch* branchStack;
UDATA flags;
IDATA errorCode;
IDATA verifyError;
UDATA verifyErrorPC;
UDATA exceptionTableBufferSize;
struct J9CfrExceptionTableEntry* exceptionTableBuffer;
U_32 bytesAddedByJSRInliner;
I_32 verboseErrorType;
U_32 errorLocalIndex;
} J9JSRIData;
typedef struct J9JSRIExceptionListEntry {
struct J9JSRIExceptionListEntry* nextInList;
struct J9CfrExceptionTableEntry* tableEntry;
struct J9JSRICodeBlock* handlerBlock;
struct J9JSRIJSRData* jsrData;
U_32 startPC;
U_32 endPC;
U_32 handlerPC;
U_16 catchType;
} J9JSRIExceptionListEntry;
typedef struct J9JSRIJSRData {
struct J9JSRICodeBlock* parentBlock;
struct J9JSRIJSRData* previousJSR;
U_8* stack;
U_8* stackBottom;
U_8* locals;
U_32* retPCPtr;
U_32 spawnPC;
U_32 retPC;
U_32 originalPC;
} J9JSRIJSRData;
typedef struct J9JSRIBranch {
UDATA startPC;
struct J9JSRIJSRData* jsrData;
struct J9JSRICodeBlock** blockParentPointer;
} J9JSRIBranch;
typedef struct J9JITBreakpointedMethod {
struct J9Method* method;
UDATA count;
struct J9JITBreakpointedMethod* link;
UDATA hasBeenTranslated;
} J9JITBreakpointedMethod;
typedef struct J9JITFrame {
void* returnPC;
} J9JITFrame;
/* @ddr_namespace: map_to_type=J9VTuneInterface */
typedef struct J9VTuneInterface {
UDATA dllHandle;
void* iJIT_NotifyEvent;
void* iJIT_RegisterCallback;
void* iJIT_RegisterCallbackEx;
void* Initialize;
void* NotifyEvent;
void* MethodEntry;
void* MethodExit;
UDATA flags;
} J9VTuneInterface;
#define J9VTUNE_TRACE_LINE_NUMBERS 1
/* @ddr_namespace: map_to_type=J9JITExceptionTable */
/* This structure is exposed by the compile_info field of CompiledMethodLoad() / JVMTI_EVENT_COMPILED_METHOD_LOAD.
* New variables should be added at the end in order to maintain backward compatibility.
*/
typedef struct J9JITExceptionTable {
struct J9UTF8* className;
struct J9UTF8* methodName;
struct J9UTF8* methodSignature;
struct J9ConstantPool* constantPool;
struct J9Method* ramMethod;
UDATA startPC;
UDATA endWarmPC;
UDATA startColdPC;
UDATA endPC;
UDATA totalFrameSize;
I_16 slots;
I_16 scalarTempSlots;
I_16 objectTempSlots;
U_16 prologuePushes;
I_16 tempOffset;
U_16 numExcptionRanges;
I_32 size;
UDATA flags;
UDATA registerSaveDescription;
void* gcStackAtlas;
void* inlinedCalls;
void* bodyInfo;
struct J9JITExceptionTable* nextMethod;
struct J9JITExceptionTable* prevMethod;
void* debugSlot1;
void* debugSlot2;
void* osrInfo;
void* runtimeAssumptionList;
I_32 hotness;
UDATA codeCacheAlloc;
void* gpuCode;
void* riData;
} J9JITExceptionTable;
#define JIT_METADATA_FLAGS_USED_FOR_SIZE 0x1
#define JIT_METADATA_GC_MAP_32_BIT_OFFSETS 0x2
#define JIT_METADATA_IS_STUB 0x4
#define JIT_METADATA_NOT_INITIALIZED 0x8
#define JIT_METADATA_IS_REMOTE_COMP 0x10
#define JIT_METADATA_IS_DESERIALIZED_COMP 0x20
#define JIT_METADATA_IS_PRECHECKPOINT_COMP 0x40
#define JIT_METADATA_IS_FSD_COMP 0x80
typedef struct J9JIT16BitExceptionTableEntry {
U_16 startPC;
U_16 endPC;
U_16 handlerPC;
U_16 catchType;
} J9JIT16BitExceptionTableEntry;
typedef struct J9JIT32BitExceptionTableEntry {
U_32 startPC;
U_32 endPC;
U_32 handlerPC;
U_32 catchType;
struct J9Method* ramMethod;
} J9JIT32BitExceptionTableEntry;
typedef struct J9JITStackAtlas {
U_8* stackAllocMap;
U_8* internalPointerMap;
U_16 numberOfMaps;
U_16 numberOfMapBytes;
I_16 parmBaseOffset;
U_16 numberOfParmSlots;
I_16 localBaseOffset;
U_16 paddingTo32;
} J9JITStackAtlas;
typedef struct J9JITDataCacheHeader {
U_32 size;
U_32 type;
} J9JITDataCacheHeader;
typedef struct J9ThunkMapping {
void* constantPool;
U_32 cpIndex;
void* thunkAddress;
} J9ThunkMapping;
typedef struct J9JITCodeCacheTrampolineList {
struct J9MemorySegment* codeCache;
void* heapBase;
void* heapTop;
U_32* allocPtr;
void* targetMap;
void* unresolvedTargetMap;
struct J9JITCodeCacheTrampolineList* next;
U_32 numUnresolvedTargets;
U_32 referenceCount;
} J9JITCodeCacheTrampolineList;
typedef struct J9JITMethodEquivalence {
struct J9Method* oldMethod;
struct J9Method* newMethod;
UDATA equivalent;
} J9JITMethodEquivalence;
typedef struct J9JITRedefinedClass {
struct J9Class* oldClass;
struct J9Class* newClass;
UDATA methodCount;
struct J9JITMethodEquivalence* methodList;
} J9JITRedefinedClass;
typedef struct J9HotField {
struct J9HotField* next;
uint32_t hotness;
uint16_t cpuUtil;
uint8_t hotFieldOffset;
} J9HotField;
typedef struct J9ClassHotFieldsInfo {
struct J9HotField* hotFieldListHead;
struct J9ClassLoader* classLoader;
BOOLEAN isClassHotFieldListDirty;
uint8_t hotFieldOffset1;
uint8_t hotFieldOffset2;
uint8_t hotFieldOffset3;
uint8_t consecutiveHotFieldSelections;
uint8_t hotFieldListLength;
} J9ClassHotFieldsInfo;
typedef struct J9ROMNameAndSignature {
J9SRP name;
J9SRP signature;
} J9ROMNameAndSignature;
#define J9ROMNAMEANDSIGNATURE_NAME(base) NNSRP_GET((base)->name, struct J9UTF8*)
#define J9ROMNAMEANDSIGNATURE_SIGNATURE(base) NNSRP_GET((base)->signature, struct J9UTF8*)
typedef struct J9ROMFieldShape {
struct J9ROMNameAndSignature nameAndSignature;
U_32 modifiers;
} J9ROMFieldShape;
#define J9ROMFIELDSHAPE_NAME(base) NNSRP_GET((&((base)->nameAndSignature))->name, struct J9UTF8*)
#define J9ROMFIELDSHAPE_SIGNATURE(base) NNSRP_GET((&((base)->nameAndSignature))->signature, struct J9UTF8*)
typedef struct J9ROMStaticFieldShape {
struct J9ROMNameAndSignature nameAndSignature;
U_32 modifiers;
U_32 initialValue;
} J9ROMStaticFieldShape;
#define J9ROMSTATICFIELDSHAPE_NAME(base) NNSRP_GET((&((base)->nameAndSignature))->name, struct J9UTF8*)
#define J9ROMSTATICFIELDSHAPE_SIGNATURE(base) NNSRP_GET((&((base)->nameAndSignature))->signature, struct J9UTF8*)
typedef struct J9ROMRecordComponentShape {
struct J9ROMNameAndSignature nameAndSignature;
U_32 attributeFlags;
} J9ROMRecordComponentShape;
#define J9ROMRECORDCOMPONENTSHAPE_NAME(base) NNSRP_GET((&((base)->nameAndSignature))->name, struct J9UTF8*)
#define J9ROMRECORDCOMPONENTSHAPE_SIGNATURE(base) NNSRP_GET((&((base)->nameAndSignature))->signature, struct J9UTF8*)
/* @ddr_namespace: map_to_type=J9VMExt */
#define J9MEMORYPOOLDATA_MAX_NAME_BUFFER_SIZE 32
#define J9GARBAGECOLLECTORDATA_MAX_NAME_BUFFER_SIZE 32
#define J9VM_MAX_HEAP_MEMORYPOOL_COUNT 4
#define J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT 4
typedef struct J9GarbageCollectionInfo {
U_32 gcID;
U_32 arraySize;
const char *gcAction;
const char *gcCause;
U_64 index;
U_64 startTime;
U_64 endTime;
U_64 initialSize[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
U_64 preUsed[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
U_64 preCommitted[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
I_64 preMax[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
U_64 postUsed[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
U_64 postCommitted[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
I_64 postMax[J9VM_MAX_HEAP_MEMORYPOOL_COUNT + J9VM_MAX_NONHEAP_MEMORYPOOL_COUNT];
} J9GarbageCollectionInfo;
typedef struct J9GarbageCollectorData {
U_32 id;
char name[J9GARBAGECOLLECTORDATA_MAX_NAME_BUFFER_SIZE];
U_64 totalGCTime;
U_64 memoryUsed;
I_64 totalMemoryFreed;
U_64 totalCompacts;
J9GarbageCollectionInfo lastGcInfo;
} J9GarbageCollectorData;
typedef struct J9MemoryPoolData {
U_32 id;
char name[J9MEMORYPOOLDATA_MAX_NAME_BUFFER_SIZE];
U_64 initialSize;
U_64 preCollectionMaxSize;
U_64 postCollectionMaxSize;
U_64 preCollectionSize;
U_64 preCollectionUsed;
U_64 postCollectionSize;
U_64 postCollectionUsed;
U_64 peakSize;
U_64 peakUsed;
U_64 peakMax;
U_64 usageThreshold;
U_64 usageThresholdCrossedCount;
U_64 collectionUsageThreshold;
U_64 collectionUsageThresholdCrossedCount;
U_32 notificationState;
} J9MemoryPoolData;
typedef struct J9NonHeapMemoryData {
U_32 id;
char name[J9MEMORYPOOLDATA_MAX_NAME_BUFFER_SIZE];
U_64 initialSize;
U_64 preCollectionSize;
U_64 preCollectionUsed;
U_64 postCollectionSize;
U_64 postCollectionUsed;
U_64 peakSize;
U_64 peakUsed;
U_64 maxSize;
}J9NonHeapMemoryData;
typedef struct J9JavaLangManagementData {
I_64 vmStartTime;
U_64 totalClassLoads;
U_64 totalClassUnloads;
U_64 totalCompilationTime;
I_64 lastCompilationStart;
omrthread_rwmutex_t managementDataLock;
UDATA threadsCompiling;
U_64 totalJavaThreadsStarted;
U_32 liveJavaThreads;
U_32 liveJavaDaemonThreads;
U_32 peakLiveJavaThreads;
U_32 threadContentionMonitoringFlag;
U_32 supportedMemoryPools;
U_32 supportedNonHeapMemoryPools;
U_32 supportedCollectors;
U_32 lastGCID;
struct J9MemoryPoolData *memoryPools;
struct J9NonHeapMemoryData *nonHeapMemoryPools;
struct J9GarbageCollectorData *garbageCollectors;
U_64 preCollectionHeapSize;
U_64 preCollectionHeapUsed;
U_64 postCollectionHeapSize;
U_64 postCollectionHeapUsed;
omrthread_monitor_t notificationMonitor;
void *notificationQueue;
U_32 notificationsPending;
U_64 notificationCount;
U_32 notificationEnabled;
UDATA initialHeapSize;
UDATA maximumHeapSize;
omrthread_monitor_t dlparNotificationMonitor;
void *dlparNotificationQueue;
U_32 dlparNotificationsPending;
U_32 dlparNotificationCount;
U_32 currentNumberOfCPUs;
U_32 currentProcessingCapacity;
U_64 currentTotalPhysicalMemory;
U_32 threadCpuTimeEnabledFlag;
U_32 isThreadCpuTimeSupported;
U_32 isCurrentThreadCpuTimeSupported;
U_64 gcMainCpuTime;
U_64 gcWorkerCpuTime;
U_32 gcMaxThreads;
U_32 gcCurrentThreads;
char counterPath[2048];
U_32 isCounterPathInitialized;
} J9JavaLangManagementData;
typedef struct J9LoadROMClassData {
struct J9Class* classBeingRedefined;
U_8* className;
UDATA classNameLength;
U_8* classData;
UDATA classDataLength;
j9object_t classDataObject;
struct J9ClassLoader* classLoader;
j9object_t protectionDomain;
U_8* hostPackageName;
UDATA hostPackageLength;
UDATA options;
struct J9ROMClass* romClass;
struct J9MemorySegment* romClassSegment;
void* freeUserData;
classDataFreeFunction freeFunction;
} J9LoadROMClassData;
typedef struct J9VMSystemProperty {
char* name;
char* value;
UDATA flags;
} J9VMSystemProperty;
#if defined(J9VM_INTERP_CUSTOM_SPIN_OPTIONS)
typedef struct J9ObjectMonitorCustomSpinOptions {
UDATA thrMaxSpins1BeforeBlocking;
UDATA thrMaxSpins2BeforeBlocking;
UDATA thrMaxYieldsBeforeBlocking;
UDATA thrMaxTryEnterSpins1BeforeBlocking;
UDATA thrMaxTryEnterSpins2BeforeBlocking;
UDATA thrMaxTryEnterYieldsBeforeBlocking;
} J9ObjectMonitorCustomSpinOptions;
/* @ddr_namespace: map_to_type=J9VMCustomSpinOptions */
typedef struct J9VMCustomSpinOptions {
const char* className;
J9ObjectMonitorCustomSpinOptions j9monitorOptions;
#if defined(OMR_THR_CUSTOM_SPIN_OPTIONS)
J9ThreadCustomSpinOptions j9threadOptions;
#endif /* OMR_THR_CUSTOM_SPIN_OPTIONS */
} J9VMCustomSpinOptions;
#endif /* J9VM_INTERP_CUSTOM_SPIN_OPTIONS */
#define J9SYSPROP_FLAG_NAME_ALLOCATED 1
#define J9SYSPROP_FLAG_VALUE_ALLOCATED 2
#define J9SYSPROP_FLAG_WRITEABLE 4
#define J9SYSPROP_ERROR_NONE 0
#define J9SYSPROP_ERROR_NOT_FOUND 1
#define J9SYSPROP_ERROR_READ_ONLY 2
#define J9SYSPROP_ERROR_OUT_OF_MEMORY 3
#define J9SYSPROP_ERROR_INVALID_JCL 4
#define J9SYSPROP_ERROR_UNSUPPORTED_PROP 5
#define J9SYSPROP_ERROR_ARG_MISSING 6
typedef struct J9VMDllLoadInfo {
char dllName[32];
char alternateDllName[32];
U_32 loadFlags;
U_32 completedBits;
UDATA descriptor;
IDATA ( *j9vmdllmain)(struct J9JavaVM *vm, IDATA stage, void *reserved) ;
const char* fatalErrorStr;
void* reserved;
} J9VMDllLoadInfo;
typedef struct J9SigContext {
IDATA sigNum;
void* sigInfo;
void* uContext;
struct J9VMThread* onThread;
} J9SigContext;
typedef struct J9JniCheckLocalRefState {
UDATA numLocalRefs;
UDATA topFrameCapacity;
UDATA framesPushed;
UDATA globalRefCapacity;
UDATA weakRefCapacity;
} J9JniCheckLocalRefState;
typedef struct J9VMInitArgs {
JavaVMInitArgs* actualVMArgs;
struct J9CmdLineOption* j9Options;
UDATA nOptions;
struct J9VMInitArgs *previousArgs;
} J9VMInitArgs;
/* @ddr_namespace: map_to_type=J9IdentityHashData */
typedef struct J9IdentityHashData {
UDATA hashData1;
UDATA hashData2;
UDATA hashData3;
UDATA hashData4;
UDATA hashSaltPolicy;
U_32 hashSaltTable[1];
} J9IdentityHashData;
#define J9_IDENTITY_HASH_SALT_POLICY_STANDARD 1
#define J9_IDENTITY_HASH_SALT_POLICY_REGION 2
#define J9_IDENTITY_HASH_SALT_POLICY_NONE 0
/**
* Globals variables required by CUDA4J.
*/
typedef struct J9CudaGlobals {
jclass exceptionClass;
jmethodID exception_init;
jmethodID runnable_run;
} J9CudaGlobals;
#if defined(J9VM_OPT_SHARED_CLASSES)
typedef enum J9SharedClassCacheMode {
J9SharedClassCacheBootstrapOnly,
J9SharedClassCacheBoostrapAndExtension,
J9SharedClassCacheUserDefined
} J9SharedClassCacheMode;
typedef struct J9SharedClassTransaction {
struct J9VMThread* ownerThread;
struct J9ClassLoader* classloader;
I_16 entryIndex;
UDATA loadType;
U_16 classnameLength;
U_8* classnameData;
UDATA transactionState;
IDATA isOK;
struct J9UTF8* partitionInCache;
struct J9UTF8* modContextInCache;
IDATA helperID;
void* allocatedMem;
U_32 allocatedLineNumberTableSize;
U_32 allocatedLocalVariableTableSize;
void* allocatedLineNumberTable;
void* allocatedLocalVariableTable;
void* ClasspathWrapper; /* points to ClasspathItem if it is full/soft full. Otherwise, points to a ClasspathWrapper in the cache */
void* cacheAreaForAllocate;
void* newItemInCache;
j9object_t updatedItemSize;
void* findNextRomClass;
void* findNextIterator;
void* firstFound;
UDATA oldVMState;
UDATA isModifiedClassfile;
UDATA takeReadWriteLock;
U_64 cacheFullFlags;
} J9SharedClassTransaction;
typedef struct J9SharedStringTransaction {
struct J9VMThread* ownerThread;
UDATA transactionState;
IDATA isOK;
} J9SharedStringTransaction;
/* @ddr_namespace: map_to_type=J9GenericByID */
typedef struct J9GenericByID {
U_8 magic;
U_8 type;
U_16 id;
struct J9ClassPathEntry* jclData;
void* cpData;
} J9GenericByID;
#define CP_TYPE_TOKEN 1
#define CP_TYPE_URL 2
#define CP_TYPE_CLASSPATH 4
#define CP_MAGIC 0xAA
typedef struct J9ClasspathByID {
struct J9GenericByID header;
UDATA entryCount;
U_8* failedMatches;
} J9ClasspathByID;
typedef struct J9ClasspathByIDArray {
struct J9ClasspathByID** array;
UDATA size;
char* partition;
UDATA partitionHash;
struct J9ClasspathByIDArray* next;
} J9ClasspathByIDArray;