90 #include "oops/typeArrayOop.hpp"
91 #include "prims/jvmtiAgentThread.hpp"
92 #include "runtime/arguments.hpp"
93 #include "runtime/deoptimization.hpp"
94 #include "runtime/globals.hpp"
95 #include "runtime/java.hpp"
96 #include "runtime/javaCalls.hpp"
97 #include "runtime/os.hpp"
98 #include "runtime/perfMemory.hpp"
99 #include "runtime/serviceThread.hpp"
100 #include "runtime/sharedRuntime.hpp"
101 #include "runtime/stubRoutines.hpp"
102 #include "runtime/thread.inline.hpp"
103 #include "runtime/vframeArray.hpp"
104 #include "runtime/vmStructs.hpp"
105 #include "utilities/array.hpp"
106 #include "utilities/globalDefinitions.hpp"
107 #include "utilities/hashtable.hpp"
108 #include "utilities/macros.hpp"
109
110 #ifdef TARGET_ARCH_x86
111 # include "vmStructs_x86.hpp"
112 #endif
113 #ifdef TARGET_ARCH_sparc
114 # include "vmStructs_sparc.hpp"
115 #endif
116 #ifdef TARGET_ARCH_zero
117 # include "vmStructs_zero.hpp"
118 #endif
119 #ifdef TARGET_ARCH_arm
120 # include "vmStructs_arm.hpp"
121 #endif
122 #ifdef TARGET_ARCH_ppc
123 # include "vmStructs_ppc.hpp"
124 #endif
125 #ifdef TARGET_ARCH_aarch64
126 # include "vmStructs_aarch64.hpp"
127 #endif
128 #ifdef TARGET_OS_ARCH_linux_x86
129 # include "vmStructs_linux_x86.hpp"
130 #endif
131 #ifdef TARGET_OS_ARCH_linux_sparc
132 # include "vmStructs_linux_sparc.hpp"
133 #endif
134 #ifdef TARGET_OS_ARCH_linux_zero
135 # include "vmStructs_linux_zero.hpp"
136 #endif
137 #ifdef TARGET_OS_ARCH_solaris_x86
138 # include "vmStructs_solaris_x86.hpp"
139 #endif
140 #ifdef TARGET_OS_ARCH_solaris_sparc
141 # include "vmStructs_solaris_sparc.hpp"
142 #endif
143 #ifdef TARGET_OS_ARCH_windows_x86
144 # include "vmStructs_windows_x86.hpp"
145 #endif
146 #ifdef TARGET_OS_ARCH_linux_arm
147 # include "vmStructs_linux_arm.hpp"
148 #endif
149 #ifdef TARGET_OS_ARCH_linux_ppc
150 # include "vmStructs_linux_ppc.hpp"
151 #endif
152 #ifdef TARGET_OS_ARCH_linux_aarch64
153 # include "vmStructs_linux_aarch64.hpp"
154 #endif
155 #ifdef TARGET_OS_ARCH_aix_ppc
156 # include "vmStructs_aix_ppc.hpp"
157 #endif
158 #ifdef TARGET_OS_ARCH_bsd_x86
159 # include "vmStructs_bsd_x86.hpp"
160 #endif
161 #ifdef TARGET_OS_ARCH_bsd_zero
162 # include "vmStructs_bsd_zero.hpp"
163 #endif
164 #if INCLUDE_ALL_GCS
165 #include "gc/cms/compactibleFreeListSpace.hpp"
166 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
167 #include "gc/cms/concurrentMarkSweepThread.hpp"
168 #include "gc/cms/parNewGeneration.hpp"
169 #include "gc/cms/vmStructs_cms.hpp"
170 #include "gc/cms/vmStructs_parNew.hpp"
171 #include "gc/g1/vmStructs_g1.hpp"
172 #include "gc/parallel/asPSOldGen.hpp"
173 #include "gc/parallel/asPSYoungGen.hpp"
174 #include "gc/parallel/parallelScavengeHeap.hpp"
175 #include "gc/parallel/psOldGen.hpp"
176 #include "gc/parallel/psVirtualspace.hpp"
177 #include "gc/parallel/psYoungGen.hpp"
178 #include "gc/parallel/vmStructs_parallelgc.hpp"
179 #endif // INCLUDE_ALL_GCS
180
181 #if INCLUDE_TRACE
182 #include "runtime/vmStructs_trace.hpp"
183 #endif
184
185 #include "runtime/vmStructs_ext.hpp"
186
187 #ifdef COMPILER2
188 #include "opto/addnode.hpp"
189 #include "opto/block.hpp"
190 #include "opto/callnode.hpp"
191 #include "opto/castnode.hpp"
192 #include "opto/cfgnode.hpp"
193 #include "opto/chaitin.hpp"
194 #include "opto/convertnode.hpp"
195 #include "opto/divnode.hpp"
196 #include "opto/intrinsicnode.hpp"
197 #include "opto/locknode.hpp"
198 #include "opto/loopnode.hpp"
199 #include "opto/machnode.hpp"
200 #include "opto/matcher.hpp"
294 nonstatic_field(ConstantPool, _reference_map, Array<u2>*) \
295 nonstatic_field(ConstantPoolCache, _length, int) \
296 nonstatic_field(ConstantPoolCache, _constant_pool, ConstantPool*) \
297 nonstatic_field(InstanceKlass, _array_klasses, Klass*) \
298 nonstatic_field(InstanceKlass, _methods, Array<Method*>*) \
299 nonstatic_field(InstanceKlass, _default_methods, Array<Method*>*) \
300 nonstatic_field(InstanceKlass, _local_interfaces, Array<Klass*>*) \
301 nonstatic_field(InstanceKlass, _transitive_interfaces, Array<Klass*>*) \
302 nonstatic_field(InstanceKlass, _fields, Array<u2>*) \
303 nonstatic_field(InstanceKlass, _java_fields_count, u2) \
304 nonstatic_field(InstanceKlass, _constants, ConstantPool*) \
305 nonstatic_field(InstanceKlass, _class_loader_data, ClassLoaderData*) \
306 nonstatic_field(InstanceKlass, _source_file_name_index, u2) \
307 nonstatic_field(InstanceKlass, _source_debug_extension, char*) \
308 nonstatic_field(InstanceKlass, _inner_classes, Array<jushort>*) \
309 nonstatic_field(InstanceKlass, _nonstatic_field_size, int) \
310 nonstatic_field(InstanceKlass, _static_field_size, int) \
311 nonstatic_field(InstanceKlass, _static_oop_field_count, u2) \
312 nonstatic_field(InstanceKlass, _nonstatic_oop_map_size, int) \
313 nonstatic_field(InstanceKlass, _is_marked_dependent, bool) \
314 nonstatic_field(InstanceKlass, _minor_version, u2) \
315 nonstatic_field(InstanceKlass, _major_version, u2) \
316 nonstatic_field(InstanceKlass, _init_state, u1) \
317 nonstatic_field(InstanceKlass, _init_thread, Thread*) \
318 nonstatic_field(InstanceKlass, _vtable_len, int) \
319 nonstatic_field(InstanceKlass, _itable_len, int) \
320 nonstatic_field(InstanceKlass, _reference_type, u1) \
321 volatile_nonstatic_field(InstanceKlass, _oop_map_cache, OopMapCache*) \
322 nonstatic_field(InstanceKlass, _jni_ids, JNIid*) \
323 nonstatic_field(InstanceKlass, _osr_nmethods_head, nmethod*) \
324 nonstatic_field(InstanceKlass, _breakpoints, BreakpointInfo*) \
325 nonstatic_field(InstanceKlass, _generic_signature_index, u2) \
326 nonstatic_field(InstanceKlass, _methods_jmethod_ids, jmethodID*) \
327 volatile_nonstatic_field(InstanceKlass, _idnum_allocated_count, u2) \
328 nonstatic_field(InstanceKlass, _annotations, Annotations*) \
329 nonstatic_field(InstanceKlass, _dependencies, nmethodBucket*) \
330 nonstatic_field(nmethodBucket, _nmethod, nmethod*) \
331 nonstatic_field(nmethodBucket, _count, int) \
332 nonstatic_field(nmethodBucket, _next, nmethodBucket*) \
333 nonstatic_field(InstanceKlass, _method_ordering, Array<int>*) \
367 nonstatic_field(DataLayout, _header._struct._bci, u2) \
368 nonstatic_field(DataLayout, _cells[0], intptr_t) \
369 nonstatic_field(MethodCounters, _nmethod_age, int) \
370 nonstatic_field(MethodCounters, _interpreter_invocation_limit, int) \
371 nonstatic_field(MethodCounters, _interpreter_backward_branch_limit, int) \
372 nonstatic_field(MethodCounters, _interpreter_profile_limit, int) \
373 nonstatic_field(MethodCounters, _invoke_mask, int) \
374 nonstatic_field(MethodCounters, _backedge_mask, int) \
375 nonstatic_field(MethodCounters, _interpreter_invocation_count, int) \
376 nonstatic_field(MethodCounters, _interpreter_throwout_count, u2) \
377 nonstatic_field(MethodCounters, _number_of_breakpoints, u2) \
378 nonstatic_field(MethodCounters, _invocation_counter, InvocationCounter) \
379 nonstatic_field(MethodCounters, _backedge_counter, InvocationCounter) \
380 nonstatic_field(Method, _constMethod, ConstMethod*) \
381 nonstatic_field(Method, _method_data, MethodData*) \
382 nonstatic_field(Method, _method_counters, MethodCounters*) \
383 nonstatic_field(Method, _access_flags, AccessFlags) \
384 nonstatic_field(Method, _vtable_index, int) \
385 nonstatic_field(Method, _method_size, u2) \
386 nonstatic_field(Method, _intrinsic_id, u2) \
387 nonproduct_nonstatic_field(Method, _compiled_invocation_count, int) \
388 volatile_nonstatic_field(Method, _code, nmethod*) \
389 nonstatic_field(Method, _i2i_entry, address) \
390 nonstatic_field(Method, _adapter, AdapterHandlerEntry*) \
391 volatile_nonstatic_field(Method, _from_compiled_entry, address) \
392 volatile_nonstatic_field(Method, _from_interpreted_entry, address) \
393 volatile_nonstatic_field(ConstMethod, _fingerprint, uint64_t) \
394 nonstatic_field(ConstMethod, _constants, ConstantPool*) \
395 nonstatic_field(ConstMethod, _stackmap_data, Array<u1>*) \
396 nonstatic_field(ConstMethod, _constMethod_size, int) \
397 nonstatic_field(ConstMethod, _flags, u2) \
398 nonstatic_field(ConstMethod, _code_size, u2) \
399 nonstatic_field(ConstMethod, _name_index, u2) \
400 nonstatic_field(ConstMethod, _signature_index, u2) \
401 nonstatic_field(ConstMethod, _method_idnum, u2) \
402 nonstatic_field(ConstMethod, _max_stack, u2) \
403 nonstatic_field(ConstMethod, _max_locals, u2) \
404 nonstatic_field(ConstMethod, _size_of_parameters, u2) \
405 nonstatic_field(ObjArrayKlass, _element_klass, Klass*) \
406 nonstatic_field(ObjArrayKlass, _bottom_klass, Klass*) \
407 volatile_nonstatic_field(Symbol, _refcount, short) \
408 nonstatic_field(Symbol, _identity_hash, short) \
409 nonstatic_field(Symbol, _length, unsigned short) \
410 unchecked_nonstatic_field(Symbol, _body, sizeof(jbyte)) /* NOTE: no type */ \
411 nonstatic_field(TypeArrayKlass, _max_length, int) \
412 \
413 /***********************/ \
414 /* Constant Pool Cache */ \
415 /***********************/ \
416 \
417 volatile_nonstatic_field(ConstantPoolCacheEntry, _indices, intx) \
418 nonstatic_field(ConstantPoolCacheEntry, _f1, volatile Metadata*) \
419 volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \
420 volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \
421 \
422 /********************************/ \
423 /* MethodOop-related structures */ \
424 /********************************/ \
425 \
426 nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \
427 nonstatic_field(LocalVariableTableElement, start_bci, u2) \
428 nonstatic_field(LocalVariableTableElement, length, u2) \
429 nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \
430 nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \
453 static_field(Universe, _boolArrayKlassObj, Klass*) \
454 static_field(Universe, _byteArrayKlassObj, Klass*) \
455 static_field(Universe, _charArrayKlassObj, Klass*) \
456 static_field(Universe, _intArrayKlassObj, Klass*) \
457 static_field(Universe, _shortArrayKlassObj, Klass*) \
458 static_field(Universe, _longArrayKlassObj, Klass*) \
459 static_field(Universe, _singleArrayKlassObj, Klass*) \
460 static_field(Universe, _doubleArrayKlassObj, Klass*) \
461 static_field(Universe, _mirrors[0], oop) \
462 static_field(Universe, _main_thread_group, oop) \
463 static_field(Universe, _system_thread_group, oop) \
464 static_field(Universe, _the_empty_class_klass_array, objArrayOop) \
465 static_field(Universe, _null_ptr_exception_instance, oop) \
466 static_field(Universe, _arithmetic_exception_instance, oop) \
467 static_field(Universe, _vm_exception, oop) \
468 static_field(Universe, _collectedHeap, CollectedHeap*) \
469 static_field(Universe, _base_vtable_size, int) \
470 static_field(Universe, _bootstrapping, bool) \
471 static_field(Universe, _fully_initialized, bool) \
472 static_field(Universe, _verify_count, int) \
473 static_field(Universe, _non_oop_bits, intptr_t) \
474 static_field(Universe, _narrow_oop._base, address) \
475 static_field(Universe, _narrow_oop._shift, int) \
476 static_field(Universe, _narrow_oop._use_implicit_null_checks, bool) \
477 static_field(Universe, _narrow_klass._base, address) \
478 static_field(Universe, _narrow_klass._shift, int) \
479 \
480 /******/ \
481 /* os */ \
482 /******/ \
483 \
484 static_field(os, _polling_page, address) \
485 \
486 /**********************************************************************************/ \
487 /* Generation and Space hierarchies */ \
488 /**********************************************************************************/ \
489 \
490 unchecked_nonstatic_field(ageTable, sizes, sizeof(ageTable::sizes)) \
491 \
492 nonstatic_field(BlockOffsetTable, _bottom, HeapWord*) \
493 nonstatic_field(BlockOffsetTable, _end, HeapWord*) \
494 \
495 nonstatic_field(BlockOffsetSharedArray, _reserved, MemRegion) \
496 nonstatic_field(BlockOffsetSharedArray, _end, HeapWord*) \
497 nonstatic_field(BlockOffsetSharedArray, _vs, VirtualSpace) \
498 nonstatic_field(BlockOffsetSharedArray, _offset_array, u_char*) \
499 \
500 nonstatic_field(BlockOffsetArray, _array, BlockOffsetSharedArray*) \
501 nonstatic_field(BlockOffsetArray, _sp, Space*) \
502 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold, HeapWord*) \
503 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index, size_t) \
504 \
505 nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block, HeapWord*) \
506 \
507 nonstatic_field(CardGeneration, _rs, GenRemSet*) \
508 nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \
509 nonstatic_field(CardGeneration, _shrink_factor, size_t) \
510 nonstatic_field(CardGeneration, _capacity_at_prologue, size_t) \
511 nonstatic_field(CardGeneration, _used_at_prologue, size_t) \
561 \
562 nonstatic_field(GenCollectorPolicy, _young_gen_spec, GenerationSpec*) \
563 nonstatic_field(GenCollectorPolicy, _old_gen_spec, GenerationSpec*) \
564 \
565 nonstatic_field(HeapWord, i, char*) \
566 \
567 nonstatic_field(MemRegion, _start, HeapWord*) \
568 nonstatic_field(MemRegion, _word_size, size_t) \
569 \
570 nonstatic_field(OffsetTableContigSpace, _offsets, BlockOffsetArray) \
571 \
572 nonstatic_field(TenuredGeneration, _min_heap_delta_bytes, size_t) \
573 nonstatic_field(TenuredGeneration, _the_space, ContiguousSpace*) \
574 \
575 nonstatic_field(Space, _bottom, HeapWord*) \
576 nonstatic_field(Space, _end, HeapWord*) \
577 \
578 nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \
579 nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \
580 nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \
581 nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \
582 nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \
583 static_field(ThreadLocalAllocBuffer, _target_refills, unsigned) \
584 nonstatic_field(ThreadLocalAllocBuffer, _number_of_refills, unsigned) \
585 nonstatic_field(ThreadLocalAllocBuffer, _fast_refill_waste, unsigned) \
586 nonstatic_field(ThreadLocalAllocBuffer, _slow_refill_waste, unsigned) \
587 nonstatic_field(ThreadLocalAllocBuffer, _gc_waste, unsigned) \
588 nonstatic_field(ThreadLocalAllocBuffer, _slow_allocations, unsigned) \
589 nonstatic_field(VirtualSpace, _low_boundary, char*) \
590 nonstatic_field(VirtualSpace, _high_boundary, char*) \
591 nonstatic_field(VirtualSpace, _low, char*) \
592 nonstatic_field(VirtualSpace, _high, char*) \
593 nonstatic_field(VirtualSpace, _lower_high, char*) \
594 nonstatic_field(VirtualSpace, _middle_high, char*) \
595 nonstatic_field(VirtualSpace, _upper_high, char*) \
596 nonstatic_field(WaterMark, _point, HeapWord*) \
597 nonstatic_field(WaterMark, _space, Space*) \
598 \
599 /************************/ \
600 /* PerfMemory - jvmstat */ \
770 /* Arrays */ \
771 /**********/ \
772 \
773 nonstatic_field(Array<Klass*>, _length, int) \
774 nonstatic_field(Array<Klass*>, _data[0], Klass*) \
775 \
776 /*******************/ \
777 /* GrowableArrays */ \
778 /*******************/ \
779 \
780 nonstatic_field(GenericGrowableArray, _len, int) \
781 nonstatic_field(GenericGrowableArray, _max, int) \
782 nonstatic_field(GenericGrowableArray, _arena, Arena*) \
783 nonstatic_field(GrowableArray<int>, _data, int*) \
784 \
785 /********************************/ \
786 /* CodeCache (NOTE: incomplete) */ \
787 /********************************/ \
788 \
789 static_field(CodeCache, _heaps, GrowableArray<CodeHeap*>*) \
790 static_field(CodeCache, _scavenge_root_nmethods, nmethod*) \
791 \
792 /*******************************/ \
793 /* CodeHeap (NOTE: incomplete) */ \
794 /*******************************/ \
795 \
796 nonstatic_field(CodeHeap, _memory, VirtualSpace) \
797 nonstatic_field(CodeHeap, _segmap, VirtualSpace) \
798 nonstatic_field(CodeHeap, _log2_segment_size, int) \
799 nonstatic_field(HeapBlock, _header, HeapBlock::Header) \
800 nonstatic_field(HeapBlock::Header, _length, size_t) \
801 nonstatic_field(HeapBlock::Header, _used, bool) \
802 \
803 /**********************************/ \
804 /* Interpreter (NOTE: incomplete) */ \
805 /**********************************/ \
806 \
807 static_field(AbstractInterpreter, _code, StubQueue*) \
808 \
809 /****************************/ \
820 nonstatic_field(InterpreterCodelet, _bytecode, Bytecodes::Code) \
821 \
822 /***********************************/ \
823 /* StubRoutines (NOTE: incomplete) */ \
824 /***********************************/ \
825 \
826 static_field(StubRoutines, _verify_oop_count, jint) \
827 static_field(StubRoutines, _call_stub_return_address, address) \
828 static_field(StubRoutines, _aescrypt_encryptBlock, address) \
829 static_field(StubRoutines, _aescrypt_decryptBlock, address) \
830 static_field(StubRoutines, _cipherBlockChaining_encryptAESCrypt, address) \
831 static_field(StubRoutines, _cipherBlockChaining_decryptAESCrypt, address) \
832 static_field(StubRoutines, _ghash_processBlocks, address) \
833 static_field(StubRoutines, _updateBytesCRC32, address) \
834 static_field(StubRoutines, _crc_table_adr, address) \
835 static_field(StubRoutines, _crc32c_table_addr, address) \
836 static_field(StubRoutines, _updateBytesCRC32C, address) \
837 static_field(StubRoutines, _multiplyToLen, address) \
838 static_field(StubRoutines, _squareToLen, address) \
839 static_field(StubRoutines, _mulAdd, address) \
840 \
841 /*****************/ \
842 /* SharedRuntime */ \
843 /*****************/ \
844 \
845 static_field(SharedRuntime, _ic_miss_blob, RuntimeStub*) \
846 \
847 /***************************************/ \
848 /* PcDesc and other compiled code info */ \
849 /***************************************/ \
850 \
851 nonstatic_field(PcDesc, _pc_offset, int) \
852 nonstatic_field(PcDesc, _scope_decode_offset, int) \
853 nonstatic_field(PcDesc, _obj_decode_offset, int) \
854 nonstatic_field(PcDesc, _flags, int) \
855 \
856 /***************************************************/ \
857 /* CodeBlobs (NOTE: incomplete, but only a little) */ \
858 /***************************************************/ \
859 \
860 nonstatic_field(CodeBlob, _name, const char*) \
861 nonstatic_field(CodeBlob, _size, int) \
862 nonstatic_field(CodeBlob, _header_size, int) \
863 nonstatic_field(CodeBlob, _relocation_size, int) \
864 nonstatic_field(CodeBlob, _content_offset, int) \
865 nonstatic_field(CodeBlob, _code_offset, int) \
866 nonstatic_field(CodeBlob, _frame_complete_offset, int) \
867 nonstatic_field(CodeBlob, _data_offset, int) \
868 nonstatic_field(CodeBlob, _frame_size, int) \
869 nonstatic_field(CodeBlob, _oop_maps, ImmutableOopMapSet*) \
870 \
871 nonstatic_field(RuntimeStub, _caller_must_gc_arguments, bool) \
872 \
873 /**************************************************/ \
874 /* NMethods (NOTE: incomplete, but only a little) */ \
875 /**************************************************/ \
876 \
877 nonstatic_field(nmethod, _method, Method*) \
878 nonstatic_field(nmethod, _entry_bci, int) \
879 nonstatic_field(nmethod, _osr_link, nmethod*) \
880 nonstatic_field(nmethod, _scavenge_root_link, nmethod*) \
881 nonstatic_field(nmethod, _scavenge_root_state, jbyte) \
882 nonstatic_field(nmethod, _state, volatile unsigned char) \
883 nonstatic_field(nmethod, _exception_offset, int) \
884 nonstatic_field(nmethod, _deoptimize_offset, int) \
885 nonstatic_field(nmethod, _deoptimize_mh_offset, int) \
886 nonstatic_field(nmethod, _orig_pc_offset, int) \
887 nonstatic_field(nmethod, _stub_offset, int) \
888 nonstatic_field(nmethod, _consts_offset, int) \
889 nonstatic_field(nmethod, _oops_offset, int) \
890 nonstatic_field(nmethod, _metadata_offset, int) \
891 nonstatic_field(nmethod, _scopes_data_offset, int) \
892 nonstatic_field(nmethod, _scopes_pcs_offset, int) \
893 nonstatic_field(nmethod, _dependencies_offset, int) \
894 nonstatic_field(nmethod, _handler_table_offset, int) \
895 nonstatic_field(nmethod, _nul_chk_table_offset, int) \
896 nonstatic_field(nmethod, _nmethod_end_offset, int) \
897 nonstatic_field(nmethod, _entry_point, address) \
898 nonstatic_field(nmethod, _verified_entry_point, address) \
899 nonstatic_field(nmethod, _osr_entry_point, address) \
900 volatile_nonstatic_field(nmethod, _lock_count, jint) \
901 nonstatic_field(nmethod, _stack_traversal_mark, long) \
902 nonstatic_field(nmethod, _compile_id, int) \
903 nonstatic_field(nmethod, _comp_level, int) \
904 nonstatic_field(nmethod, _exception_cache, ExceptionCache*) \
905 nonstatic_field(nmethod, _marked_for_deoptimization, bool) \
906 \
907 unchecked_c2_static_field(Deoptimization, _trap_reason_name, void*) \
908 \
909 /********************************/ \
910 /* JavaCalls (NOTE: incomplete) */ \
911 /********************************/ \
912 \
913 nonstatic_field(JavaCallWrapper, _anchor, JavaFrameAnchor) \
914 /********************************/ \
915 /* JavaFrameAnchor (NOTE: incomplete) */ \
916 /********************************/ \
917 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \
918 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \
919 \
920 /******************************/ \
921 /* Threads (NOTE: incomplete) */ \
922 /******************************/ \
923 \
924 static_field(Threads, _thread_list, JavaThread*) \
925 static_field(Threads, _number_of_threads, int) \
926 static_field(Threads, _number_of_non_daemon_threads, int) \
927 static_field(Threads, _return_code, int) \
928 \
1278 unchecked_nonstatic_field(Array<Method*>, _data, sizeof(Method*)) \
1279 unchecked_nonstatic_field(Array<Klass*>, _data, sizeof(Klass*)) \
1280 \
1281 /*********************************/ \
1282 /* java_lang_Class fields */ \
1283 /*********************************/ \
1284 \
1285 static_field(java_lang_Class, _klass_offset, int) \
1286 static_field(java_lang_Class, _array_klass_offset, int) \
1287 static_field(java_lang_Class, _oop_size_offset, int) \
1288 static_field(java_lang_Class, _static_oop_field_count_offset, int) \
1289 \
1290 /************************/ \
1291 /* Miscellaneous fields */ \
1292 /************************/ \
1293 \
1294 nonstatic_field(CompileTask, _method, Method*) \
1295 nonstatic_field(CompileTask, _osr_bci, int) \
1296 nonstatic_field(CompileTask, _comp_level, int) \
1297 nonstatic_field(CompileTask, _compile_id, uint) \
1298 nonstatic_field(CompileTask, _next, CompileTask*) \
1299 nonstatic_field(CompileTask, _prev, CompileTask*) \
1300 \
1301 nonstatic_field(vframeArray, _next, vframeArray*) \
1302 nonstatic_field(vframeArray, _original, frame) \
1303 nonstatic_field(vframeArray, _caller, frame) \
1304 nonstatic_field(vframeArray, _frames, int) \
1305 \
1306 nonstatic_field(vframeArrayElement, _frame, frame) \
1307 nonstatic_field(vframeArrayElement, _bci, int) \
1308 nonstatic_field(vframeArrayElement, _method, Method*) \
1309 \
1310 nonstatic_field(PtrQueue, _active, bool) \
1311 nonstatic_field(PtrQueue, _buf, void**) \
1312 nonstatic_field(PtrQueue, _index, size_t) \
1313 \
1314 nonstatic_field(AccessFlags, _flags, jint) \
1315 nonstatic_field(elapsedTimer, _counter, jlong) \
1316 nonstatic_field(elapsedTimer, _active, bool) \
1317 nonstatic_field(InvocationCounter, _counter, unsigned int) \
1457 /**************************************************/ \
1458 \
1459 declare_toplevel_type(CompiledICHolder) \
1460 declare_toplevel_type(MetaspaceObj) \
1461 declare_type(Metadata, MetaspaceObj) \
1462 declare_type(Klass, Metadata) \
1463 declare_type(ArrayKlass, Klass) \
1464 declare_type(ObjArrayKlass, ArrayKlass) \
1465 declare_type(TypeArrayKlass, ArrayKlass) \
1466 declare_type(InstanceKlass, Klass) \
1467 declare_type(InstanceClassLoaderKlass, InstanceKlass) \
1468 declare_type(InstanceMirrorKlass, InstanceKlass) \
1469 declare_type(InstanceRefKlass, InstanceKlass) \
1470 declare_type(ConstantPool, Metadata) \
1471 declare_type(ConstantPoolCache, MetaspaceObj) \
1472 declare_type(MethodData, Metadata) \
1473 declare_type(Method, Metadata) \
1474 declare_type(MethodCounters, MetaspaceObj) \
1475 declare_type(ConstMethod, MetaspaceObj) \
1476 \
1477 declare_toplevel_type(vtableEntry) \
1478 \
1479 declare_toplevel_type(Symbol) \
1480 declare_toplevel_type(Symbol*) \
1481 declare_toplevel_type(volatile Metadata*) \
1482 \
1483 declare_toplevel_type(DataLayout) \
1484 declare_toplevel_type(nmethodBucket) \
1485 \
1486 /********/ \
1487 /* Oops */ \
1488 /********/ \
1489 \
1490 declare_oop_type(markOop) \
1491 declare_oop_type(objArrayOop) \
1492 declare_oop_type(oop) \
1493 declare_oop_type(narrowOop) \
1494 declare_oop_type(typeArrayOop) \
1495 \
1496 /*************************************/ \
1556 declare_toplevel_type(GenRemSet*) \
1557 declare_toplevel_type(CardTableRS*) \
1558 declare_toplevel_type(CardTableModRefBS*) \
1559 declare_toplevel_type(CardTableModRefBS**) \
1560 declare_toplevel_type(CardTableModRefBSForCTRS*) \
1561 declare_toplevel_type(CardTableModRefBSForCTRS**) \
1562 declare_toplevel_type(CollectedHeap*) \
1563 declare_toplevel_type(ContiguousSpace*) \
1564 declare_toplevel_type(DefNewGeneration*) \
1565 declare_toplevel_type(GenCollectedHeap*) \
1566 declare_toplevel_type(Generation*) \
1567 declare_toplevel_type(GenerationSpec**) \
1568 declare_toplevel_type(HeapWord*) \
1569 declare_toplevel_type(HeapWord* volatile) \
1570 declare_toplevel_type(MemRegion*) \
1571 declare_toplevel_type(OffsetTableContigSpace*) \
1572 declare_toplevel_type(Space*) \
1573 declare_toplevel_type(TenuredGeneration*) \
1574 declare_toplevel_type(ThreadLocalAllocBuffer*) \
1575 \
1576 /************************/ \
1577 /* PerfMemory - jvmstat */ \
1578 /************************/ \
1579 \
1580 declare_toplevel_type(PerfDataPrologue) \
1581 declare_toplevel_type(PerfDataPrologue*) \
1582 declare_toplevel_type(PerfDataEntry) \
1583 declare_toplevel_type(PerfMemory) \
1584 \
1585 /*********************************/ \
1586 /* SymbolTable, SystemDictionary */ \
1587 /*********************************/ \
1588 \
1589 declare_toplevel_type(BasicHashtable<mtInternal>) \
1590 declare_type(IntptrHashtable, BasicHashtable<mtInternal>) \
1591 declare_type(SymbolTable, SymbolHashtable) \
1592 declare_type(StringTable, StringHashtable) \
1593 declare_type(LoaderConstraintTable, KlassHashtable) \
1594 declare_type(KlassTwoOopHashtable, KlassHashtable) \
1595 declare_type(Dictionary, KlassTwoOopHashtable) \
1678 declare_type(AdapterBlob, BufferBlob) \
1679 declare_type(MethodHandlesAdapterBlob, BufferBlob) \
1680 declare_type(nmethod, CodeBlob) \
1681 declare_type(RuntimeStub, CodeBlob) \
1682 declare_type(SingletonBlob, CodeBlob) \
1683 declare_type(SafepointBlob, SingletonBlob) \
1684 declare_type(DeoptimizationBlob, SingletonBlob) \
1685 declare_c2_type(ExceptionBlob, SingletonBlob) \
1686 declare_c2_type(UncommonTrapBlob, CodeBlob) \
1687 \
1688 /***************************************/ \
1689 /* PcDesc and other compiled code info */ \
1690 /***************************************/ \
1691 \
1692 declare_toplevel_type(PcDesc) \
1693 declare_toplevel_type(ExceptionCache) \
1694 declare_toplevel_type(PcDescCache) \
1695 declare_toplevel_type(Dependencies) \
1696 declare_toplevel_type(CompileTask) \
1697 declare_toplevel_type(Deoptimization) \
1698 \
1699 /************************/ \
1700 /* OopMap and OopMapSet */ \
1701 /************************/ \
1702 \
1703 declare_toplevel_type(OopMap) \
1704 declare_toplevel_type(OopMapSet) \
1705 declare_toplevel_type(ImmutableOopMapSet) \
1706 declare_toplevel_type(ImmutableOopMapPair) \
1707 declare_toplevel_type(ImmutableOopMap) \
1708 \
1709 /********************/ \
1710 /* CompressedStream */ \
1711 /********************/ \
1712 \
1713 declare_toplevel_type(CompressedStream) \
1714 \
1715 /**************/ \
1716 /* VMRegImpl */ \
1717 /**************/ \
2260 declare_constant(BarrierSet::G1SATBCTLogging) \
2261 \
2262 declare_constant(BlockOffsetSharedArray::LogN) \
2263 declare_constant(BlockOffsetSharedArray::LogN_words) \
2264 declare_constant(BlockOffsetSharedArray::N_bytes) \
2265 declare_constant(BlockOffsetSharedArray::N_words) \
2266 \
2267 declare_constant(BlockOffsetArray::N_words) \
2268 \
2269 declare_constant(CardTableModRefBS::clean_card) \
2270 declare_constant(CardTableModRefBS::last_card) \
2271 declare_constant(CardTableModRefBS::dirty_card) \
2272 declare_constant(CardTableModRefBS::Precise) \
2273 declare_constant(CardTableModRefBS::ObjHeadPreciseArray) \
2274 declare_constant(CardTableModRefBS::card_shift) \
2275 declare_constant(CardTableModRefBS::card_size) \
2276 declare_constant(CardTableModRefBS::card_size_in_words) \
2277 \
2278 declare_constant(CardTableRS::youngergen_card) \
2279 \
2280 declare_constant(CollectedHeap::GenCollectedHeap) \
2281 declare_constant(CollectedHeap::ParallelScavengeHeap) \
2282 declare_constant(CollectedHeap::G1CollectedHeap) \
2283 \
2284 /* constants from Generation::Name enum */ \
2285 \
2286 declare_constant(Generation::DefNew) \
2287 declare_constant(Generation::MarkSweepCompact) \
2288 declare_constant(Generation::Other) \
2289 \
2290 declare_constant(Generation::LogOfGenGrain) \
2291 declare_constant(Generation::GenGrain) \
2292 \
2293 declare_constant(HeapWordSize) \
2294 declare_constant(LogHeapWordSize) \
2295 \
2296 \
2297 /************************/ \
2298 /* PerfMemory - jvmstat */ \
2299 /************************/ \
2318 declare_constant(JVM_ACC_MONITOR_MATCH) \
2319 declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \
2320 declare_constant(JVM_ACC_HAS_LOOPS) \
2321 declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \
2322 declare_constant(JVM_ACC_QUEUED) \
2323 declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE) \
2324 declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \
2325 declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \
2326 declare_constant(JVM_ACC_HAS_JSRS) \
2327 declare_constant(JVM_ACC_IS_OLD) \
2328 declare_constant(JVM_ACC_IS_OBSOLETE) \
2329 declare_constant(JVM_ACC_IS_PREFIXED_NATIVE) \
2330 declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \
2331 declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \
2332 declare_constant(JVM_ACC_HAS_FINALIZER) \
2333 declare_constant(JVM_ACC_IS_CLONEABLE) \
2334 declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \
2335 declare_constant(JVM_ACC_PROMOTED_FLAGS) \
2336 declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \
2337 declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED) \
2338 \
2339 /*****************************/ \
2340 /* Thread::SuspendFlags enum */ \
2341 /*****************************/ \
2342 \
2343 declare_constant(Thread::_external_suspend) \
2344 declare_constant(Thread::_ext_suspended) \
2345 declare_constant(Thread::_has_async_exception) \
2346 \
2347 /*******************/ \
2348 /* JavaThreadState */ \
2349 /*******************/ \
2350 \
2351 declare_constant(_thread_uninitialized) \
2352 declare_constant(_thread_new) \
2353 declare_constant(_thread_new_trans) \
2354 declare_constant(_thread_in_native) \
2355 declare_constant(_thread_in_native_trans) \
2356 declare_constant(_thread_in_vm) \
2357 declare_constant(_thread_in_vm_trans) \
2358 declare_constant(_thread_in_Java) \
2359 declare_constant(_thread_in_Java_trans) \
2360 declare_constant(_thread_blocked) \
2361 declare_constant(_thread_blocked_trans) \
2362 \
2363 /******************************/ \
2364 /* Klass misc. enum constants */ \
2365 /******************************/ \
2366 \
2367 declare_constant(Klass::_primary_super_limit) \
2368 declare_constant(Klass::_lh_instance_slow_path_bit) \
2369 declare_constant(Klass::_lh_log2_element_size_shift) \
2370 declare_constant(Klass::_lh_log2_element_size_mask) \
2371 declare_constant(Klass::_lh_element_type_shift) \
2372 declare_constant(Klass::_lh_element_type_mask) \
2373 declare_constant(Klass::_lh_header_size_shift) \
2374 declare_constant(Klass::_lh_header_size_mask) \
2375 declare_constant(Klass::_lh_array_tag_shift) \
2376 declare_constant(Klass::_lh_array_tag_type_value) \
2377 declare_constant(Klass::_lh_array_tag_obj_value) \
2378 \
2379 /********************************/ \
2380 /* ConstMethod anon-enum */ \
2381 /********************************/ \
2382 \
2383 declare_constant(Method::_jfr_towrite) \
2384 declare_constant(Method::_caller_sensitive) \
2385 declare_constant(Method::_force_inline) \
2386 declare_constant(Method::_dont_inline) \
2387 declare_constant(Method::_hidden) \
2388 \
2389 declare_constant(ConstMethod::_has_linenumber_table) \
2390 declare_constant(ConstMethod::_has_checked_exceptions) \
2391 declare_constant(ConstMethod::_has_localvariable_table) \
2392 declare_constant(ConstMethod::_has_exception_table) \
2393 declare_constant(ConstMethod::_has_generic_signature) \
2394 declare_constant(ConstMethod::_has_method_parameters) \
2395 declare_constant(ConstMethod::_has_method_annotations) \
2396 declare_constant(ConstMethod::_has_parameter_annotations) \
2397 declare_constant(ConstMethod::_has_default_annotations) \
2398 declare_constant(ConstMethod::_has_type_annotations) \
2399 \
2400 /**************/ \
2401 /* DataLayout */ \
2402 /**************/ \
2403 \
2404 declare_constant(DataLayout::cell_size) \
2405 \
2406 /*************************************/ \
2407 /* InstanceKlass enum */ \
2408 /*************************************/ \
2409 \
2410 \
2411 /*************************************/ \
2412 /* FieldInfo FieldOffset enum */ \
2413 /*************************************/ \
2414 \
2415 declare_constant(FieldInfo::access_flags_offset) \
2416 declare_constant(FieldInfo::name_index_offset) \
2417 declare_constant(FieldInfo::signature_index_offset) \
2418 declare_constant(FieldInfo::initval_index_offset) \
2419 declare_constant(FieldInfo::low_packed_offset) \
2420 declare_constant(FieldInfo::high_packed_offset) \
2421 declare_constant(FieldInfo::field_slots) \
2422 \
2423 /*************************************/ \
2424 /* FieldInfo tag constants */ \
2438 declare_constant(InstanceKlass::inner_class_access_flags_offset) \
2439 declare_constant(InstanceKlass::inner_class_next_offset) \
2440 \
2441 /*********************************/ \
2442 /* InstanceKlass ClassState enum */ \
2443 /*********************************/ \
2444 \
2445 declare_constant(InstanceKlass::allocated) \
2446 declare_constant(InstanceKlass::loaded) \
2447 declare_constant(InstanceKlass::linked) \
2448 declare_constant(InstanceKlass::being_initialized) \
2449 declare_constant(InstanceKlass::fully_initialized) \
2450 declare_constant(InstanceKlass::initialization_error) \
2451 \
2452 /*********************************/ \
2453 /* Symbol* - symbol max length */ \
2454 /*********************************/ \
2455 \
2456 declare_constant(Symbol::max_symbol_length) \
2457 \
2458 /*************************************************/ \
2459 /* ConstantPool* layout enum for InvokeDynamic */ \
2460 /*************************************************/ \
2461 \
2462 declare_constant(ConstantPool::_indy_bsm_offset) \
2463 declare_constant(ConstantPool::_indy_argc_offset) \
2464 declare_constant(ConstantPool::_indy_argv_offset) \
2465 \
2466 /********************************/ \
2467 /* ConstantPoolCacheEntry enums */ \
2468 /********************************/ \
2469 \
2470 declare_constant(ConstantPoolCacheEntry::is_volatile_shift) \
2471 declare_constant(ConstantPoolCacheEntry::is_final_shift) \
2472 declare_constant(ConstantPoolCacheEntry::is_forced_virtual_shift) \
2473 declare_constant(ConstantPoolCacheEntry::is_vfinal_shift) \
2474 declare_constant(ConstantPoolCacheEntry::is_field_entry_shift) \
2475 declare_constant(ConstantPoolCacheEntry::tos_state_shift) \
2476 \
2477 /***************************************/ \
2478 /* java_lang_Thread::ThreadStatus enum */ \
2479 /***************************************/ \
2480 \
2481 declare_constant(java_lang_Thread::NEW) \
2482 declare_constant(java_lang_Thread::RUNNABLE) \
2483 declare_constant(java_lang_Thread::SLEEPING) \
2484 declare_constant(java_lang_Thread::IN_OBJECT_WAIT) \
2539 declare_constant(Deoptimization::Reason_rtm_state_change) \
2540 declare_constant(Deoptimization::Reason_unstable_if) \
2541 declare_constant(Deoptimization::Reason_unstable_fused_if) \
2542 declare_constant(Deoptimization::Reason_tenured) \
2543 declare_constant(Deoptimization::Reason_LIMIT) \
2544 declare_constant(Deoptimization::Reason_RECORDED_LIMIT) \
2545 \
2546 declare_constant(Deoptimization::Action_none) \
2547 declare_constant(Deoptimization::Action_maybe_recompile) \
2548 declare_constant(Deoptimization::Action_reinterpret) \
2549 declare_constant(Deoptimization::Action_make_not_entrant) \
2550 declare_constant(Deoptimization::Action_make_not_compilable) \
2551 declare_constant(Deoptimization::Action_LIMIT) \
2552 \
2553 /***************************************************/ \
2554 /* DEFAULT_CACHE_LINE_SIZE (globalDefinitions.hpp) */ \
2555 /***************************************************/ \
2556 \
2557 declare_constant(DEFAULT_CACHE_LINE_SIZE) \
2558 \
2559 /*********************/ \
2560 /* Matcher (C2 only) */ \
2561 /*********************/ \
2562 \
2563 declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \
2564 \
2565 /*********************************************/ \
2566 /* MethodCompilation (globalDefinitions.hpp) */ \
2567 /*********************************************/ \
2568 \
2569 declare_constant(InvocationEntryBci) \
2570 \
2571 /***************/ \
2572 /* OopMapValue */ \
2573 /***************/ \
2574 \
2575 declare_constant(OopMapValue::type_bits) \
2576 declare_constant(OopMapValue::register_bits) \
2577 declare_constant(OopMapValue::type_shift) \
2578 declare_constant(OopMapValue::register_shift) \
2579 declare_constant(OopMapValue::type_mask) \
2580 declare_constant(OopMapValue::type_mask_in_place) \
2581 declare_constant(OopMapValue::register_mask) \
2582 declare_constant(OopMapValue::register_mask_in_place) \
2583 declare_constant(OopMapValue::unused_value) \
2584 declare_constant(OopMapValue::oop_value) \
2585 declare_constant(OopMapValue::narrowoop_value) \
2586 declare_constant(OopMapValue::callee_saved_value) \
2587 declare_constant(OopMapValue::derived_oop_value) \
2588 \
2589 /******************/ \
2590 /* JNIHandleBlock */ \
2681 declare_constant(markOopDesc::epoch_mask) \
2682 declare_constant(markOopDesc::epoch_mask_in_place) \
2683 declare_constant(markOopDesc::hash_mask) \
2684 declare_constant(markOopDesc::hash_mask_in_place) \
2685 declare_constant(markOopDesc::biased_lock_alignment) \
2686 \
2687 declare_constant(markOopDesc::locked_value) \
2688 declare_constant(markOopDesc::unlocked_value) \
2689 declare_constant(markOopDesc::monitor_value) \
2690 declare_constant(markOopDesc::marked_value) \
2691 declare_constant(markOopDesc::biased_lock_pattern) \
2692 \
2693 declare_constant(markOopDesc::no_hash) \
2694 declare_constant(markOopDesc::no_hash_in_place) \
2695 declare_constant(markOopDesc::no_lock_in_place) \
2696 declare_constant(markOopDesc::max_age) \
2697 \
2698 /* Constants in markOop used by CMS. */ \
2699 declare_constant(markOopDesc::cms_shift) \
2700 declare_constant(markOopDesc::cms_mask) \
2701 declare_constant(markOopDesc::size_shift)
2702
2703
2704 //--------------------------------------------------------------------------------
2705 // Macros operating on the above lists
2706 //--------------------------------------------------------------------------------
2707
2708 // This utility macro quotes the passed string
2709 #define QUOTE(x) #x
2710
2711 //--------------------------------------------------------------------------------
2712 // VMStructEntry macros
2713 //
2714
2715 // This macro generates a VMStructEntry line for a nonstatic field
2716 #define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2717 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
2718
2719 // This macro generates a VMStructEntry line for a static field
2720 #define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2721 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
2722
2915 // This macro generates the sentinel value indicating the end of the list
2916 #define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
2917 { NULL, 0 }
2918
2919 // Generate a long constant for a C1 build
2920 #ifdef COMPILER1
2921 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
2922 #else
2923 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)
2924 #endif /* COMPILER1 */
2925
2926 // Generate a long constant for a C2 build
2927 #ifdef COMPILER2
2928 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
2929 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
2930 #else
2931 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)
2932 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
2933 #endif /* COMPILER1 */
2934
2935 //
2936 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
2937 //
2938
2939 // These initializers are allowed to access private fields in classes
2940 // as long as class VMStructs is a friend
2941 VMStructEntry VMStructs::localHotSpotVMStructs[] = {
2942
2943 VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2944 GENERATE_STATIC_VM_STRUCT_ENTRY,
2945 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
2946 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2947 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
2948 GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY,
2949 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
2950 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
2951 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
2952
2953 #if INCLUDE_ALL_GCS
2954 VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2955 GENERATE_STATIC_VM_STRUCT_ENTRY)
2956
2957 VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2958 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2959 GENERATE_STATIC_VM_STRUCT_ENTRY)
2960
2961 VM_STRUCTS_G1(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2962 GENERATE_STATIC_VM_STRUCT_ENTRY)
2963 #endif // INCLUDE_ALL_GCS
2964
2965 #if INCLUDE_TRACE
2966 VM_STRUCTS_TRACE(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2967 GENERATE_STATIC_VM_STRUCT_ENTRY)
2968 #endif
2969
2970 VM_STRUCTS_EXT(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2971 GENERATE_STATIC_VM_STRUCT_ENTRY)
2972
2973 VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2974 GENERATE_STATIC_VM_STRUCT_ENTRY,
2975 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
2976 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2977 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
2978 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
2979 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
2980 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
2981
2982 VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2983 GENERATE_STATIC_VM_STRUCT_ENTRY,
2984 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
2985 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
2986 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
2987 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
2988 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
2989 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
2990
2991 GENERATE_VM_STRUCT_LAST_ENTRY()
2992 };
2993
2994 VMTypeEntry VMStructs::localHotSpotVMTypes[] = {
2995
2996 VM_TYPES(GENERATE_VM_TYPE_ENTRY,
2997 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
2998 GENERATE_OOP_VM_TYPE_ENTRY,
2999 GENERATE_INTEGER_VM_TYPE_ENTRY,
3000 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3001 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3002 GENERATE_C2_VM_TYPE_ENTRY,
3003 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3004
3005 #if INCLUDE_ALL_GCS
3006 VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
3007 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3008
3009 VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY,
3010 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3011
3012 VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY)
3013
3014 VM_TYPES_G1(GENERATE_VM_TYPE_ENTRY,
3015 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3016 #endif // INCLUDE_ALL_GCS
3017
3018 #if INCLUDE_TRACE
3019 VM_TYPES_TRACE(GENERATE_VM_TYPE_ENTRY,
3020 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3021 #endif
3022
3023 VM_TYPES_EXT(GENERATE_VM_TYPE_ENTRY,
3024 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3025
3026 VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
3027 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3028 GENERATE_OOP_VM_TYPE_ENTRY,
3029 GENERATE_INTEGER_VM_TYPE_ENTRY,
3030 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3031 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3032 GENERATE_C2_VM_TYPE_ENTRY,
3033 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3034
3035 VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY,
3036 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3037 GENERATE_OOP_VM_TYPE_ENTRY,
3038 GENERATE_INTEGER_VM_TYPE_ENTRY,
3039 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3040 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3041 GENERATE_C2_VM_TYPE_ENTRY,
3042 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3043
3044 GENERATE_VM_TYPE_LAST_ENTRY()
3045 };
3046
3047 VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {
3048
3049 VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
3050 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3051 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3052 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3053 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3054
3055 #if INCLUDE_ALL_GCS
3056 VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)
3057
3058 VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY)
3059 #endif // INCLUDE_ALL_GCS
3060
3061 #if INCLUDE_TRACE
3062 VM_INT_CONSTANTS_TRACE(GENERATE_VM_INT_CONSTANT_ENTRY)
3063 #endif
3064
3065 VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
3066 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3067 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3068 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3069 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3070
3071 VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
3072 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3073 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3074 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3075 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3076
3077 GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
3078 };
3079
3080 VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {
3081
3082 VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
3083 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3084 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3085 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3086 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3087
3088 VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
3089 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3090 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3091 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3092 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3093
3094 VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
3095 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3096 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3097 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3098 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3099
3100 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
3101 };
3102
3103 // This is used both to check the types of referenced fields and, in
3104 // debug builds, to ensure that all of the field types are present.
3105 void
3106 VMStructs::init() {
3107 VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3108 CHECK_STATIC_VM_STRUCT_ENTRY,
3109 CHECK_NO_OP,
3110 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
3111 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3112 CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY,
3113 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
3114 CHECK_NO_OP,
3115 CHECK_NO_OP);
3116
3117 #if INCLUDE_ALL_GCS
3118 VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3119 CHECK_STATIC_VM_STRUCT_ENTRY);
3120
3121 VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3122 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
3291 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic);
3292 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset);
3293 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address);
3294 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs);
3295 JNIEXPORT VMTypeEntry* gHotSpotVMTypes = VMStructs::localHotSpotVMTypes;
3296 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName);
3297 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
3298 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType);
3299 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType);
3300 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned);
3301 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size);
3302 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes);
3303 JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants = VMStructs::localHotSpotVMIntConstants;
3304 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name);
3305 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
3306 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants);
3307 JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants;
3308 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name);
3309 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
3310 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants);
3311 }
3312
3313 #ifdef ASSERT
3314 static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) {
3315 {
3316 VMTypeEntry* types = origtypes;
3317 while (types->typeName != NULL) {
3318 if (strcmp(typeName, types->typeName) == 0) {
3319 // Found it
3320 return 1;
3321 }
3322 ++types;
3323 }
3324 }
3325 // Search for the base type by peeling off const and *
3326 size_t len = strlen(typeName);
3327 if (typeName[len-1] == '*') {
3328 char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
3329 strncpy(s, typeName, len - 1);
3330 s[len-1] = '\0';
3398 static VMStructEntry struct_last_entry = GENERATE_VM_STRUCT_LAST_ENTRY();
3399 assert(memcmp(&localHotSpotVMStructs[(sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1],
3400 &struct_last_entry,
3401 sizeof(VMStructEntry)) == 0, "Incorrect last entry in localHotSpotVMStructs");
3402
3403 static VMTypeEntry type_last_entry = GENERATE_VM_TYPE_LAST_ENTRY();
3404 assert(memcmp(&localHotSpotVMTypes[sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry) - 1],
3405 &type_last_entry,
3406 sizeof(VMTypeEntry)) == 0, "Incorrect last entry in localHotSpotVMTypes");
3407
3408 static VMIntConstantEntry int_last_entry = GENERATE_VM_INT_CONSTANT_LAST_ENTRY();
3409 assert(memcmp(&localHotSpotVMIntConstants[sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry) - 1],
3410 &int_last_entry,
3411 sizeof(VMIntConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMIntConstants");
3412
3413 static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY();
3414 assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1],
3415 &long_last_entry,
3416 sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");
3417
3418
3419 // Check for duplicate entries in type array
3420 for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
3421 for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
3422 if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
3423 tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
3424 assert(false, "Duplicate types in localHotSpotVMTypes array");
3425 }
3426 }
3427 }
3428 }
3429 #endif
|
90 #include "oops/typeArrayOop.hpp"
91 #include "prims/jvmtiAgentThread.hpp"
92 #include "runtime/arguments.hpp"
93 #include "runtime/deoptimization.hpp"
94 #include "runtime/globals.hpp"
95 #include "runtime/java.hpp"
96 #include "runtime/javaCalls.hpp"
97 #include "runtime/os.hpp"
98 #include "runtime/perfMemory.hpp"
99 #include "runtime/serviceThread.hpp"
100 #include "runtime/sharedRuntime.hpp"
101 #include "runtime/stubRoutines.hpp"
102 #include "runtime/thread.inline.hpp"
103 #include "runtime/vframeArray.hpp"
104 #include "runtime/vmStructs.hpp"
105 #include "utilities/array.hpp"
106 #include "utilities/globalDefinitions.hpp"
107 #include "utilities/hashtable.hpp"
108 #include "utilities/macros.hpp"
109
110 #ifdef TARGET_OS_FAMILY_linux
111 # include "vmStructs_linux.hpp"
112 #endif
113 #ifdef TARGET_OS_FAMILY_solaris
114 # include "vmStructs_solaris.hpp"
115 #endif
116 #ifdef TARGET_OS_FAMILY_windows
117 # include "vmStructs_windows.hpp"
118 #endif
119 #ifdef TARGET_OS_FAMILY_aix
120 # include "vmStructs_aix.hpp"
121 #endif
122 #ifdef TARGET_OS_FAMILY_bsd
123 # include "vmStructs_bsd.hpp"
124 #endif
125
126 #ifdef TARGET_ARCH_x86
127 # include "vmStructs_x86.hpp"
128 #endif
129 #ifdef TARGET_ARCH_sparc
130 # include "vmStructs_sparc.hpp"
131 #endif
132 #ifdef TARGET_ARCH_zero
133 # include "vmStructs_zero.hpp"
134 #endif
135 #ifdef TARGET_ARCH_arm
136 # include "vmStructs_arm.hpp"
137 #endif
138 #ifdef TARGET_ARCH_ppc
139 # include "vmStructs_ppc.hpp"
140 #endif
141 #ifdef TARGET_ARCH_aarch64
142 # include "vmStructs_aarch64.hpp"
143 #endif
144
145 #ifdef TARGET_OS_ARCH_linux_x86
146 # include "vmStructs_linux_x86.hpp"
147 #endif
148 #ifdef TARGET_OS_ARCH_linux_sparc
149 # include "vmStructs_linux_sparc.hpp"
150 #endif
151 #ifdef TARGET_OS_ARCH_linux_zero
152 # include "vmStructs_linux_zero.hpp"
153 #endif
154 #ifdef TARGET_OS_ARCH_solaris_x86
155 # include "vmStructs_solaris_x86.hpp"
156 #endif
157 #ifdef TARGET_OS_ARCH_solaris_sparc
158 # include "vmStructs_solaris_sparc.hpp"
159 #endif
160 #ifdef TARGET_OS_ARCH_windows_x86
161 # include "vmStructs_windows_x86.hpp"
162 #endif
163 #ifdef TARGET_OS_ARCH_linux_arm
164 # include "vmStructs_linux_arm.hpp"
165 #endif
166 #ifdef TARGET_OS_ARCH_linux_ppc
167 # include "vmStructs_linux_ppc.hpp"
168 #endif
169 #ifdef TARGET_OS_ARCH_linux_aarch64
170 # include "vmStructs_linux_aarch64.hpp"
171 #endif
172 #ifdef TARGET_OS_ARCH_aix_ppc
173 # include "vmStructs_aix_ppc.hpp"
174 #endif
175 #ifdef TARGET_OS_ARCH_bsd_x86
176 # include "vmStructs_bsd_x86.hpp"
177 #endif
178 #ifdef TARGET_OS_ARCH_bsd_zero
179 # include "vmStructs_bsd_zero.hpp"
180 #endif
181
182 #if INCLUDE_ALL_GCS
183 #include "gc/cms/compactibleFreeListSpace.hpp"
184 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
185 #include "gc/cms/concurrentMarkSweepThread.hpp"
186 #include "gc/cms/parNewGeneration.hpp"
187 #include "gc/cms/vmStructs_cms.hpp"
188 #include "gc/cms/vmStructs_parNew.hpp"
189 #include "gc/g1/vmStructs_g1.hpp"
190 #include "gc/parallel/asPSOldGen.hpp"
191 #include "gc/parallel/asPSYoungGen.hpp"
192 #include "gc/parallel/parallelScavengeHeap.hpp"
193 #include "gc/parallel/psOldGen.hpp"
194 #include "gc/parallel/psVirtualspace.hpp"
195 #include "gc/parallel/psYoungGen.hpp"
196 #include "gc/parallel/vmStructs_parallelgc.hpp"
197 #endif // INCLUDE_ALL_GCS
198
199 #if INCLUDE_JVMCI
200 # include "jvmci/vmStructs_jvmci.hpp"
201 #endif
202
203 #if INCLUDE_TRACE
204 #include "runtime/vmStructs_trace.hpp"
205 #endif
206
207 #include "runtime/vmStructs_ext.hpp"
208
209 #ifdef COMPILER2
210 #include "opto/addnode.hpp"
211 #include "opto/block.hpp"
212 #include "opto/callnode.hpp"
213 #include "opto/castnode.hpp"
214 #include "opto/cfgnode.hpp"
215 #include "opto/chaitin.hpp"
216 #include "opto/convertnode.hpp"
217 #include "opto/divnode.hpp"
218 #include "opto/intrinsicnode.hpp"
219 #include "opto/locknode.hpp"
220 #include "opto/loopnode.hpp"
221 #include "opto/machnode.hpp"
222 #include "opto/matcher.hpp"
316 nonstatic_field(ConstantPool, _reference_map, Array<u2>*) \
317 nonstatic_field(ConstantPoolCache, _length, int) \
318 nonstatic_field(ConstantPoolCache, _constant_pool, ConstantPool*) \
319 nonstatic_field(InstanceKlass, _array_klasses, Klass*) \
320 nonstatic_field(InstanceKlass, _methods, Array<Method*>*) \
321 nonstatic_field(InstanceKlass, _default_methods, Array<Method*>*) \
322 nonstatic_field(InstanceKlass, _local_interfaces, Array<Klass*>*) \
323 nonstatic_field(InstanceKlass, _transitive_interfaces, Array<Klass*>*) \
324 nonstatic_field(InstanceKlass, _fields, Array<u2>*) \
325 nonstatic_field(InstanceKlass, _java_fields_count, u2) \
326 nonstatic_field(InstanceKlass, _constants, ConstantPool*) \
327 nonstatic_field(InstanceKlass, _class_loader_data, ClassLoaderData*) \
328 nonstatic_field(InstanceKlass, _source_file_name_index, u2) \
329 nonstatic_field(InstanceKlass, _source_debug_extension, char*) \
330 nonstatic_field(InstanceKlass, _inner_classes, Array<jushort>*) \
331 nonstatic_field(InstanceKlass, _nonstatic_field_size, int) \
332 nonstatic_field(InstanceKlass, _static_field_size, int) \
333 nonstatic_field(InstanceKlass, _static_oop_field_count, u2) \
334 nonstatic_field(InstanceKlass, _nonstatic_oop_map_size, int) \
335 nonstatic_field(InstanceKlass, _is_marked_dependent, bool) \
336 nonstatic_field(InstanceKlass, _misc_flags, u2) \
337 nonstatic_field(InstanceKlass, _minor_version, u2) \
338 nonstatic_field(InstanceKlass, _major_version, u2) \
339 nonstatic_field(InstanceKlass, _init_state, u1) \
340 nonstatic_field(InstanceKlass, _init_thread, Thread*) \
341 nonstatic_field(InstanceKlass, _vtable_len, int) \
342 nonstatic_field(InstanceKlass, _itable_len, int) \
343 nonstatic_field(InstanceKlass, _reference_type, u1) \
344 volatile_nonstatic_field(InstanceKlass, _oop_map_cache, OopMapCache*) \
345 nonstatic_field(InstanceKlass, _jni_ids, JNIid*) \
346 nonstatic_field(InstanceKlass, _osr_nmethods_head, nmethod*) \
347 nonstatic_field(InstanceKlass, _breakpoints, BreakpointInfo*) \
348 nonstatic_field(InstanceKlass, _generic_signature_index, u2) \
349 nonstatic_field(InstanceKlass, _methods_jmethod_ids, jmethodID*) \
350 volatile_nonstatic_field(InstanceKlass, _idnum_allocated_count, u2) \
351 nonstatic_field(InstanceKlass, _annotations, Annotations*) \
352 nonstatic_field(InstanceKlass, _dependencies, nmethodBucket*) \
353 nonstatic_field(nmethodBucket, _nmethod, nmethod*) \
354 nonstatic_field(nmethodBucket, _count, int) \
355 nonstatic_field(nmethodBucket, _next, nmethodBucket*) \
356 nonstatic_field(InstanceKlass, _method_ordering, Array<int>*) \
390 nonstatic_field(DataLayout, _header._struct._bci, u2) \
391 nonstatic_field(DataLayout, _cells[0], intptr_t) \
392 nonstatic_field(MethodCounters, _nmethod_age, int) \
393 nonstatic_field(MethodCounters, _interpreter_invocation_limit, int) \
394 nonstatic_field(MethodCounters, _interpreter_backward_branch_limit, int) \
395 nonstatic_field(MethodCounters, _interpreter_profile_limit, int) \
396 nonstatic_field(MethodCounters, _invoke_mask, int) \
397 nonstatic_field(MethodCounters, _backedge_mask, int) \
398 nonstatic_field(MethodCounters, _interpreter_invocation_count, int) \
399 nonstatic_field(MethodCounters, _interpreter_throwout_count, u2) \
400 nonstatic_field(MethodCounters, _number_of_breakpoints, u2) \
401 nonstatic_field(MethodCounters, _invocation_counter, InvocationCounter) \
402 nonstatic_field(MethodCounters, _backedge_counter, InvocationCounter) \
403 nonstatic_field(Method, _constMethod, ConstMethod*) \
404 nonstatic_field(Method, _method_data, MethodData*) \
405 nonstatic_field(Method, _method_counters, MethodCounters*) \
406 nonstatic_field(Method, _access_flags, AccessFlags) \
407 nonstatic_field(Method, _vtable_index, int) \
408 nonstatic_field(Method, _method_size, u2) \
409 nonstatic_field(Method, _intrinsic_id, u2) \
410 nonstatic_field(Method, _flags, u1) \
411 nonproduct_nonstatic_field(Method, _compiled_invocation_count, int) \
412 volatile_nonstatic_field(Method, _code, nmethod*) \
413 nonstatic_field(Method, _i2i_entry, address) \
414 nonstatic_field(Method, _adapter, AdapterHandlerEntry*) \
415 volatile_nonstatic_field(Method, _from_compiled_entry, address) \
416 volatile_nonstatic_field(Method, _from_interpreted_entry, address) \
417 volatile_nonstatic_field(ConstMethod, _fingerprint, uint64_t) \
418 nonstatic_field(ConstMethod, _constants, ConstantPool*) \
419 nonstatic_field(ConstMethod, _stackmap_data, Array<u1>*) \
420 nonstatic_field(ConstMethod, _constMethod_size, int) \
421 nonstatic_field(ConstMethod, _flags, u2) \
422 nonstatic_field(ConstMethod, _code_size, u2) \
423 nonstatic_field(ConstMethod, _name_index, u2) \
424 nonstatic_field(ConstMethod, _signature_index, u2) \
425 nonstatic_field(ConstMethod, _method_idnum, u2) \
426 nonstatic_field(ConstMethod, _max_stack, u2) \
427 nonstatic_field(ConstMethod, _max_locals, u2) \
428 nonstatic_field(ConstMethod, _size_of_parameters, u2) \
429 nonstatic_field(ObjArrayKlass, _element_klass, Klass*) \
430 nonstatic_field(ObjArrayKlass, _bottom_klass, Klass*) \
431 volatile_nonstatic_field(Symbol, _refcount, short) \
432 nonstatic_field(Symbol, _identity_hash, short) \
433 nonstatic_field(Symbol, _length, unsigned short) \
434 unchecked_nonstatic_field(Symbol, _body, sizeof(jbyte)) /* NOTE: no type */ \
435 nonstatic_field(Symbol, _body[0], jbyte) \
436 nonstatic_field(TypeArrayKlass, _max_length, int) \
437 \
438 /***********************/ \
439 /* Constant Pool Cache */ \
440 /***********************/ \
441 \
442 volatile_nonstatic_field(ConstantPoolCacheEntry, _indices, intx) \
443 nonstatic_field(ConstantPoolCacheEntry, _f1, volatile Metadata*) \
444 volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \
445 volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \
446 \
447 /********************************/ \
448 /* MethodOop-related structures */ \
449 /********************************/ \
450 \
451 nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \
452 nonstatic_field(LocalVariableTableElement, start_bci, u2) \
453 nonstatic_field(LocalVariableTableElement, length, u2) \
454 nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \
455 nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \
478 static_field(Universe, _boolArrayKlassObj, Klass*) \
479 static_field(Universe, _byteArrayKlassObj, Klass*) \
480 static_field(Universe, _charArrayKlassObj, Klass*) \
481 static_field(Universe, _intArrayKlassObj, Klass*) \
482 static_field(Universe, _shortArrayKlassObj, Klass*) \
483 static_field(Universe, _longArrayKlassObj, Klass*) \
484 static_field(Universe, _singleArrayKlassObj, Klass*) \
485 static_field(Universe, _doubleArrayKlassObj, Klass*) \
486 static_field(Universe, _mirrors[0], oop) \
487 static_field(Universe, _main_thread_group, oop) \
488 static_field(Universe, _system_thread_group, oop) \
489 static_field(Universe, _the_empty_class_klass_array, objArrayOop) \
490 static_field(Universe, _null_ptr_exception_instance, oop) \
491 static_field(Universe, _arithmetic_exception_instance, oop) \
492 static_field(Universe, _vm_exception, oop) \
493 static_field(Universe, _collectedHeap, CollectedHeap*) \
494 static_field(Universe, _base_vtable_size, int) \
495 static_field(Universe, _bootstrapping, bool) \
496 static_field(Universe, _fully_initialized, bool) \
497 static_field(Universe, _verify_count, int) \
498 static_field(Universe, _verify_oop_mask, uintptr_t) \
499 static_field(Universe, _verify_oop_bits, uintptr_t) \
500 static_field(Universe, _non_oop_bits, intptr_t) \
501 static_field(Universe, _narrow_oop._base, address) \
502 static_field(Universe, _narrow_oop._shift, int) \
503 static_field(Universe, _narrow_oop._use_implicit_null_checks, bool) \
504 static_field(Universe, _narrow_klass._base, address) \
505 static_field(Universe, _narrow_klass._shift, int) \
506 \
507 /******/ \
508 /* os */ \
509 /******/ \
510 \
511 static_field(os, _polling_page, address) \
512 \
513 /**********************************************************************************/ \
514 /* Generation and Space hierarchies */ \
515 /**********************************************************************************/ \
516 \
517 unchecked_nonstatic_field(ageTable, sizes, sizeof(ageTable::sizes)) \
518 \
519 nonstatic_field(BarrierSet, _fake_rtti, BarrierSet::FakeRtti) \
520 \
521 nonstatic_field(BarrierSet::FakeRtti, _concrete_tag, BarrierSet::Name) \
522 \
523 nonstatic_field(BlockOffsetTable, _bottom, HeapWord*) \
524 nonstatic_field(BlockOffsetTable, _end, HeapWord*) \
525 \
526 nonstatic_field(BlockOffsetSharedArray, _reserved, MemRegion) \
527 nonstatic_field(BlockOffsetSharedArray, _end, HeapWord*) \
528 nonstatic_field(BlockOffsetSharedArray, _vs, VirtualSpace) \
529 nonstatic_field(BlockOffsetSharedArray, _offset_array, u_char*) \
530 \
531 nonstatic_field(BlockOffsetArray, _array, BlockOffsetSharedArray*) \
532 nonstatic_field(BlockOffsetArray, _sp, Space*) \
533 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold, HeapWord*) \
534 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index, size_t) \
535 \
536 nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block, HeapWord*) \
537 \
538 nonstatic_field(CardGeneration, _rs, GenRemSet*) \
539 nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \
540 nonstatic_field(CardGeneration, _shrink_factor, size_t) \
541 nonstatic_field(CardGeneration, _capacity_at_prologue, size_t) \
542 nonstatic_field(CardGeneration, _used_at_prologue, size_t) \
592 \
593 nonstatic_field(GenCollectorPolicy, _young_gen_spec, GenerationSpec*) \
594 nonstatic_field(GenCollectorPolicy, _old_gen_spec, GenerationSpec*) \
595 \
596 nonstatic_field(HeapWord, i, char*) \
597 \
598 nonstatic_field(MemRegion, _start, HeapWord*) \
599 nonstatic_field(MemRegion, _word_size, size_t) \
600 \
601 nonstatic_field(OffsetTableContigSpace, _offsets, BlockOffsetArray) \
602 \
603 nonstatic_field(TenuredGeneration, _min_heap_delta_bytes, size_t) \
604 nonstatic_field(TenuredGeneration, _the_space, ContiguousSpace*) \
605 \
606 nonstatic_field(Space, _bottom, HeapWord*) \
607 nonstatic_field(Space, _end, HeapWord*) \
608 \
609 nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \
610 nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \
611 nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \
612 nonstatic_field(ThreadLocalAllocBuffer, _pf_top, HeapWord*) \
613 nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \
614 nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \
615 static_field(ThreadLocalAllocBuffer, _target_refills, unsigned) \
616 nonstatic_field(ThreadLocalAllocBuffer, _number_of_refills, unsigned) \
617 nonstatic_field(ThreadLocalAllocBuffer, _fast_refill_waste, unsigned) \
618 nonstatic_field(ThreadLocalAllocBuffer, _slow_refill_waste, unsigned) \
619 nonstatic_field(ThreadLocalAllocBuffer, _gc_waste, unsigned) \
620 nonstatic_field(ThreadLocalAllocBuffer, _slow_allocations, unsigned) \
621 nonstatic_field(VirtualSpace, _low_boundary, char*) \
622 nonstatic_field(VirtualSpace, _high_boundary, char*) \
623 nonstatic_field(VirtualSpace, _low, char*) \
624 nonstatic_field(VirtualSpace, _high, char*) \
625 nonstatic_field(VirtualSpace, _lower_high, char*) \
626 nonstatic_field(VirtualSpace, _middle_high, char*) \
627 nonstatic_field(VirtualSpace, _upper_high, char*) \
628 nonstatic_field(WaterMark, _point, HeapWord*) \
629 nonstatic_field(WaterMark, _space, Space*) \
630 \
631 /************************/ \
632 /* PerfMemory - jvmstat */ \
802 /* Arrays */ \
803 /**********/ \
804 \
805 nonstatic_field(Array<Klass*>, _length, int) \
806 nonstatic_field(Array<Klass*>, _data[0], Klass*) \
807 \
808 /*******************/ \
809 /* GrowableArrays */ \
810 /*******************/ \
811 \
812 nonstatic_field(GenericGrowableArray, _len, int) \
813 nonstatic_field(GenericGrowableArray, _max, int) \
814 nonstatic_field(GenericGrowableArray, _arena, Arena*) \
815 nonstatic_field(GrowableArray<int>, _data, int*) \
816 \
817 /********************************/ \
818 /* CodeCache (NOTE: incomplete) */ \
819 /********************************/ \
820 \
821 static_field(CodeCache, _heaps, GrowableArray<CodeHeap*>*) \
822 static_field(CodeCache, _low_bound, address) \
823 static_field(CodeCache, _high_bound, address) \
824 static_field(CodeCache, _scavenge_root_nmethods, nmethod*) \
825 \
826 /*******************************/ \
827 /* CodeHeap (NOTE: incomplete) */ \
828 /*******************************/ \
829 \
830 nonstatic_field(CodeHeap, _memory, VirtualSpace) \
831 nonstatic_field(CodeHeap, _segmap, VirtualSpace) \
832 nonstatic_field(CodeHeap, _log2_segment_size, int) \
833 nonstatic_field(HeapBlock, _header, HeapBlock::Header) \
834 nonstatic_field(HeapBlock::Header, _length, size_t) \
835 nonstatic_field(HeapBlock::Header, _used, bool) \
836 \
837 /**********************************/ \
838 /* Interpreter (NOTE: incomplete) */ \
839 /**********************************/ \
840 \
841 static_field(AbstractInterpreter, _code, StubQueue*) \
842 \
843 /****************************/ \
854 nonstatic_field(InterpreterCodelet, _bytecode, Bytecodes::Code) \
855 \
856 /***********************************/ \
857 /* StubRoutines (NOTE: incomplete) */ \
858 /***********************************/ \
859 \
860 static_field(StubRoutines, _verify_oop_count, jint) \
861 static_field(StubRoutines, _call_stub_return_address, address) \
862 static_field(StubRoutines, _aescrypt_encryptBlock, address) \
863 static_field(StubRoutines, _aescrypt_decryptBlock, address) \
864 static_field(StubRoutines, _cipherBlockChaining_encryptAESCrypt, address) \
865 static_field(StubRoutines, _cipherBlockChaining_decryptAESCrypt, address) \
866 static_field(StubRoutines, _ghash_processBlocks, address) \
867 static_field(StubRoutines, _updateBytesCRC32, address) \
868 static_field(StubRoutines, _crc_table_adr, address) \
869 static_field(StubRoutines, _crc32c_table_addr, address) \
870 static_field(StubRoutines, _updateBytesCRC32C, address) \
871 static_field(StubRoutines, _multiplyToLen, address) \
872 static_field(StubRoutines, _squareToLen, address) \
873 static_field(StubRoutines, _mulAdd, address) \
874 static_field(StubRoutines, _jbyte_arraycopy, address) \
875 static_field(StubRoutines, _jshort_arraycopy, address) \
876 static_field(StubRoutines, _jint_arraycopy, address) \
877 static_field(StubRoutines, _jlong_arraycopy, address) \
878 static_field(StubRoutines, _oop_arraycopy, address) \
879 static_field(StubRoutines, _oop_arraycopy_uninit, address) \
880 static_field(StubRoutines, _jbyte_disjoint_arraycopy, address) \
881 static_field(StubRoutines, _jshort_disjoint_arraycopy, address) \
882 static_field(StubRoutines, _jint_disjoint_arraycopy, address) \
883 static_field(StubRoutines, _jlong_disjoint_arraycopy, address) \
884 static_field(StubRoutines, _oop_disjoint_arraycopy, address) \
885 static_field(StubRoutines, _oop_disjoint_arraycopy_uninit, address) \
886 static_field(StubRoutines, _arrayof_jbyte_arraycopy, address) \
887 static_field(StubRoutines, _arrayof_jshort_arraycopy, address) \
888 static_field(StubRoutines, _arrayof_jint_arraycopy, address) \
889 static_field(StubRoutines, _arrayof_jlong_arraycopy, address) \
890 static_field(StubRoutines, _arrayof_oop_arraycopy, address) \
891 static_field(StubRoutines, _arrayof_oop_arraycopy_uninit, address) \
892 static_field(StubRoutines, _arrayof_jbyte_disjoint_arraycopy, address) \
893 static_field(StubRoutines, _arrayof_jshort_disjoint_arraycopy, address) \
894 static_field(StubRoutines, _arrayof_jint_disjoint_arraycopy, address) \
895 static_field(StubRoutines, _arrayof_jlong_disjoint_arraycopy, address) \
896 static_field(StubRoutines, _arrayof_oop_disjoint_arraycopy, address) \
897 static_field(StubRoutines, _arrayof_oop_disjoint_arraycopy_uninit, address) \
898 static_field(StubRoutines, _checkcast_arraycopy, address) \
899 static_field(StubRoutines, _checkcast_arraycopy_uninit, address) \
900 static_field(StubRoutines, _unsafe_arraycopy, address) \
901 static_field(StubRoutines, _generic_arraycopy, address) \
902 \
903 /*****************/ \
904 /* SharedRuntime */ \
905 /*****************/ \
906 \
907 static_field(SharedRuntime, _wrong_method_blob, RuntimeStub*) \
908 static_field(SharedRuntime, _ic_miss_blob, RuntimeStub*) \
909 static_field(SharedRuntime, _deopt_blob, DeoptimizationBlob*) \
910 \
911 /***************************************/ \
912 /* PcDesc and other compiled code info */ \
913 /***************************************/ \
914 \
915 nonstatic_field(PcDesc, _pc_offset, int) \
916 nonstatic_field(PcDesc, _scope_decode_offset, int) \
917 nonstatic_field(PcDesc, _obj_decode_offset, int) \
918 nonstatic_field(PcDesc, _flags, int) \
919 \
920 /***************************************************/ \
921 /* CodeBlobs (NOTE: incomplete, but only a little) */ \
922 /***************************************************/ \
923 \
924 nonstatic_field(CodeBlob, _name, const char*) \
925 nonstatic_field(CodeBlob, _size, int) \
926 nonstatic_field(CodeBlob, _header_size, int) \
927 nonstatic_field(CodeBlob, _relocation_size, int) \
928 nonstatic_field(CodeBlob, _content_offset, int) \
929 nonstatic_field(CodeBlob, _code_offset, int) \
930 nonstatic_field(CodeBlob, _frame_complete_offset, int) \
931 nonstatic_field(CodeBlob, _data_offset, int) \
932 nonstatic_field(CodeBlob, _frame_size, int) \
933 nonstatic_field(CodeBlob, _oop_maps, ImmutableOopMapSet*) \
934 \
935 nonstatic_field(DeoptimizationBlob, _unpack_offset, int) \
936 \
937 nonstatic_field(RuntimeStub, _caller_must_gc_arguments, bool) \
938 \
939 /**************************************************/ \
940 /* NMethods (NOTE: incomplete, but only a little) */ \
941 /**************************************************/ \
942 \
943 nonstatic_field(nmethod, _method, Method*) \
944 nonstatic_field(nmethod, _entry_bci, int) \
945 nonstatic_field(nmethod, _osr_link, nmethod*) \
946 nonstatic_field(nmethod, _scavenge_root_link, nmethod*) \
947 nonstatic_field(nmethod, _scavenge_root_state, jbyte) \
948 nonstatic_field(nmethod, _state, volatile unsigned char) \
949 nonstatic_field(nmethod, _exception_offset, int) \
950 nonstatic_field(nmethod, _deoptimize_offset, int) \
951 nonstatic_field(nmethod, _deoptimize_mh_offset, int) \
952 nonstatic_field(nmethod, _orig_pc_offset, int) \
953 nonstatic_field(nmethod, _stub_offset, int) \
954 nonstatic_field(nmethod, _consts_offset, int) \
955 nonstatic_field(nmethod, _oops_offset, int) \
956 nonstatic_field(nmethod, _metadata_offset, int) \
957 nonstatic_field(nmethod, _scopes_data_offset, int) \
958 nonstatic_field(nmethod, _scopes_pcs_offset, int) \
959 nonstatic_field(nmethod, _dependencies_offset, int) \
960 nonstatic_field(nmethod, _handler_table_offset, int) \
961 nonstatic_field(nmethod, _nul_chk_table_offset, int) \
962 nonstatic_field(nmethod, _nmethod_end_offset, int) \
963 nonstatic_field(nmethod, _entry_point, address) \
964 nonstatic_field(nmethod, _verified_entry_point, address) \
965 nonstatic_field(nmethod, _osr_entry_point, address) \
966 volatile_nonstatic_field(nmethod, _lock_count, jint) \
967 nonstatic_field(nmethod, _stack_traversal_mark, long) \
968 nonstatic_field(nmethod, _compile_id, int) \
969 nonstatic_field(nmethod, _comp_level, int) \
970 nonstatic_field(nmethod, _exception_cache, ExceptionCache*) \
971 nonstatic_field(nmethod, _marked_for_deoptimization, bool) \
972 \
973 unchecked_c2_static_field(Deoptimization, _trap_reason_name, void*) \
974 \
975 nonstatic_field(Deoptimization::UnrollBlock, _size_of_deoptimized_frame, int) \
976 nonstatic_field(Deoptimization::UnrollBlock, _caller_adjustment, int) \
977 nonstatic_field(Deoptimization::UnrollBlock, _number_of_frames, int) \
978 nonstatic_field(Deoptimization::UnrollBlock, _total_frame_sizes, int) \
979 nonstatic_field(Deoptimization::UnrollBlock, _frame_sizes, intptr_t*) \
980 nonstatic_field(Deoptimization::UnrollBlock, _frame_pcs, address*) \
981 nonstatic_field(Deoptimization::UnrollBlock, _register_block, intptr_t*) \
982 nonstatic_field(Deoptimization::UnrollBlock, _return_type, BasicType) \
983 nonstatic_field(Deoptimization::UnrollBlock, _initial_info, intptr_t) \
984 nonstatic_field(Deoptimization::UnrollBlock, _caller_actual_parameters, int) \
985 \
986 /********************************/ \
987 /* JavaCalls (NOTE: incomplete) */ \
988 /********************************/ \
989 \
990 nonstatic_field(JavaCallWrapper, _anchor, JavaFrameAnchor) \
991 /********************************/ \
992 /* JavaFrameAnchor (NOTE: incomplete) */ \
993 /********************************/ \
994 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \
995 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \
996 \
997 /******************************/ \
998 /* Threads (NOTE: incomplete) */ \
999 /******************************/ \
1000 \
1001 static_field(Threads, _thread_list, JavaThread*) \
1002 static_field(Threads, _number_of_threads, int) \
1003 static_field(Threads, _number_of_non_daemon_threads, int) \
1004 static_field(Threads, _return_code, int) \
1005 \
1355 unchecked_nonstatic_field(Array<Method*>, _data, sizeof(Method*)) \
1356 unchecked_nonstatic_field(Array<Klass*>, _data, sizeof(Klass*)) \
1357 \
1358 /*********************************/ \
1359 /* java_lang_Class fields */ \
1360 /*********************************/ \
1361 \
1362 static_field(java_lang_Class, _klass_offset, int) \
1363 static_field(java_lang_Class, _array_klass_offset, int) \
1364 static_field(java_lang_Class, _oop_size_offset, int) \
1365 static_field(java_lang_Class, _static_oop_field_count_offset, int) \
1366 \
1367 /************************/ \
1368 /* Miscellaneous fields */ \
1369 /************************/ \
1370 \
1371 nonstatic_field(CompileTask, _method, Method*) \
1372 nonstatic_field(CompileTask, _osr_bci, int) \
1373 nonstatic_field(CompileTask, _comp_level, int) \
1374 nonstatic_field(CompileTask, _compile_id, uint) \
1375 nonstatic_field(CompileTask, _num_inlined_bytecodes, int) \
1376 nonstatic_field(CompileTask, _next, CompileTask*) \
1377 nonstatic_field(CompileTask, _prev, CompileTask*) \
1378 \
1379 nonstatic_field(vframeArray, _next, vframeArray*) \
1380 nonstatic_field(vframeArray, _original, frame) \
1381 nonstatic_field(vframeArray, _caller, frame) \
1382 nonstatic_field(vframeArray, _frames, int) \
1383 \
1384 nonstatic_field(vframeArrayElement, _frame, frame) \
1385 nonstatic_field(vframeArrayElement, _bci, int) \
1386 nonstatic_field(vframeArrayElement, _method, Method*) \
1387 \
1388 nonstatic_field(PtrQueue, _active, bool) \
1389 nonstatic_field(PtrQueue, _buf, void**) \
1390 nonstatic_field(PtrQueue, _index, size_t) \
1391 \
1392 nonstatic_field(AccessFlags, _flags, jint) \
1393 nonstatic_field(elapsedTimer, _counter, jlong) \
1394 nonstatic_field(elapsedTimer, _active, bool) \
1395 nonstatic_field(InvocationCounter, _counter, unsigned int) \
1535 /**************************************************/ \
1536 \
1537 declare_toplevel_type(CompiledICHolder) \
1538 declare_toplevel_type(MetaspaceObj) \
1539 declare_type(Metadata, MetaspaceObj) \
1540 declare_type(Klass, Metadata) \
1541 declare_type(ArrayKlass, Klass) \
1542 declare_type(ObjArrayKlass, ArrayKlass) \
1543 declare_type(TypeArrayKlass, ArrayKlass) \
1544 declare_type(InstanceKlass, Klass) \
1545 declare_type(InstanceClassLoaderKlass, InstanceKlass) \
1546 declare_type(InstanceMirrorKlass, InstanceKlass) \
1547 declare_type(InstanceRefKlass, InstanceKlass) \
1548 declare_type(ConstantPool, Metadata) \
1549 declare_type(ConstantPoolCache, MetaspaceObj) \
1550 declare_type(MethodData, Metadata) \
1551 declare_type(Method, Metadata) \
1552 declare_type(MethodCounters, MetaspaceObj) \
1553 declare_type(ConstMethod, MetaspaceObj) \
1554 \
1555 declare_toplevel_type(narrowKlass) \
1556 \
1557 declare_toplevel_type(vtableEntry) \
1558 \
1559 declare_toplevel_type(Symbol) \
1560 declare_toplevel_type(Symbol*) \
1561 declare_toplevel_type(volatile Metadata*) \
1562 \
1563 declare_toplevel_type(DataLayout) \
1564 declare_toplevel_type(nmethodBucket) \
1565 \
1566 /********/ \
1567 /* Oops */ \
1568 /********/ \
1569 \
1570 declare_oop_type(markOop) \
1571 declare_oop_type(objArrayOop) \
1572 declare_oop_type(oop) \
1573 declare_oop_type(narrowOop) \
1574 declare_oop_type(typeArrayOop) \
1575 \
1576 /*************************************/ \
1636 declare_toplevel_type(GenRemSet*) \
1637 declare_toplevel_type(CardTableRS*) \
1638 declare_toplevel_type(CardTableModRefBS*) \
1639 declare_toplevel_type(CardTableModRefBS**) \
1640 declare_toplevel_type(CardTableModRefBSForCTRS*) \
1641 declare_toplevel_type(CardTableModRefBSForCTRS**) \
1642 declare_toplevel_type(CollectedHeap*) \
1643 declare_toplevel_type(ContiguousSpace*) \
1644 declare_toplevel_type(DefNewGeneration*) \
1645 declare_toplevel_type(GenCollectedHeap*) \
1646 declare_toplevel_type(Generation*) \
1647 declare_toplevel_type(GenerationSpec**) \
1648 declare_toplevel_type(HeapWord*) \
1649 declare_toplevel_type(HeapWord* volatile) \
1650 declare_toplevel_type(MemRegion*) \
1651 declare_toplevel_type(OffsetTableContigSpace*) \
1652 declare_toplevel_type(Space*) \
1653 declare_toplevel_type(TenuredGeneration*) \
1654 declare_toplevel_type(ThreadLocalAllocBuffer*) \
1655 \
1656 declare_toplevel_type(BarrierSet::FakeRtti) \
1657 \
1658 /************************/ \
1659 /* PerfMemory - jvmstat */ \
1660 /************************/ \
1661 \
1662 declare_toplevel_type(PerfDataPrologue) \
1663 declare_toplevel_type(PerfDataPrologue*) \
1664 declare_toplevel_type(PerfDataEntry) \
1665 declare_toplevel_type(PerfMemory) \
1666 \
1667 /*********************************/ \
1668 /* SymbolTable, SystemDictionary */ \
1669 /*********************************/ \
1670 \
1671 declare_toplevel_type(BasicHashtable<mtInternal>) \
1672 declare_type(IntptrHashtable, BasicHashtable<mtInternal>) \
1673 declare_type(SymbolTable, SymbolHashtable) \
1674 declare_type(StringTable, StringHashtable) \
1675 declare_type(LoaderConstraintTable, KlassHashtable) \
1676 declare_type(KlassTwoOopHashtable, KlassHashtable) \
1677 declare_type(Dictionary, KlassTwoOopHashtable) \
1760 declare_type(AdapterBlob, BufferBlob) \
1761 declare_type(MethodHandlesAdapterBlob, BufferBlob) \
1762 declare_type(nmethod, CodeBlob) \
1763 declare_type(RuntimeStub, CodeBlob) \
1764 declare_type(SingletonBlob, CodeBlob) \
1765 declare_type(SafepointBlob, SingletonBlob) \
1766 declare_type(DeoptimizationBlob, SingletonBlob) \
1767 declare_c2_type(ExceptionBlob, SingletonBlob) \
1768 declare_c2_type(UncommonTrapBlob, CodeBlob) \
1769 \
1770 /***************************************/ \
1771 /* PcDesc and other compiled code info */ \
1772 /***************************************/ \
1773 \
1774 declare_toplevel_type(PcDesc) \
1775 declare_toplevel_type(ExceptionCache) \
1776 declare_toplevel_type(PcDescCache) \
1777 declare_toplevel_type(Dependencies) \
1778 declare_toplevel_type(CompileTask) \
1779 declare_toplevel_type(Deoptimization) \
1780 declare_toplevel_type(Deoptimization::UnrollBlock) \
1781 \
1782 /************************/ \
1783 /* OopMap and OopMapSet */ \
1784 /************************/ \
1785 \
1786 declare_toplevel_type(OopMap) \
1787 declare_toplevel_type(OopMapSet) \
1788 declare_toplevel_type(ImmutableOopMapSet) \
1789 declare_toplevel_type(ImmutableOopMapPair) \
1790 declare_toplevel_type(ImmutableOopMap) \
1791 \
1792 /********************/ \
1793 /* CompressedStream */ \
1794 /********************/ \
1795 \
1796 declare_toplevel_type(CompressedStream) \
1797 \
1798 /**************/ \
1799 /* VMRegImpl */ \
1800 /**************/ \
2343 declare_constant(BarrierSet::G1SATBCTLogging) \
2344 \
2345 declare_constant(BlockOffsetSharedArray::LogN) \
2346 declare_constant(BlockOffsetSharedArray::LogN_words) \
2347 declare_constant(BlockOffsetSharedArray::N_bytes) \
2348 declare_constant(BlockOffsetSharedArray::N_words) \
2349 \
2350 declare_constant(BlockOffsetArray::N_words) \
2351 \
2352 declare_constant(CardTableModRefBS::clean_card) \
2353 declare_constant(CardTableModRefBS::last_card) \
2354 declare_constant(CardTableModRefBS::dirty_card) \
2355 declare_constant(CardTableModRefBS::Precise) \
2356 declare_constant(CardTableModRefBS::ObjHeadPreciseArray) \
2357 declare_constant(CardTableModRefBS::card_shift) \
2358 declare_constant(CardTableModRefBS::card_size) \
2359 declare_constant(CardTableModRefBS::card_size_in_words) \
2360 \
2361 declare_constant(CardTableRS::youngergen_card) \
2362 \
2363 declare_constant(G1SATBCardTableModRefBS::g1_young_gen) \
2364 \
2365 declare_constant(CollectedHeap::GenCollectedHeap) \
2366 declare_constant(CollectedHeap::ParallelScavengeHeap) \
2367 declare_constant(CollectedHeap::G1CollectedHeap) \
2368 \
2369 /* constants from Generation::Name enum */ \
2370 \
2371 declare_constant(Generation::DefNew) \
2372 declare_constant(Generation::MarkSweepCompact) \
2373 declare_constant(Generation::Other) \
2374 \
2375 declare_constant(Generation::LogOfGenGrain) \
2376 declare_constant(Generation::GenGrain) \
2377 \
2378 declare_constant(HeapWordSize) \
2379 declare_constant(LogHeapWordSize) \
2380 \
2381 \
2382 /************************/ \
2383 /* PerfMemory - jvmstat */ \
2384 /************************/ \
2403 declare_constant(JVM_ACC_MONITOR_MATCH) \
2404 declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \
2405 declare_constant(JVM_ACC_HAS_LOOPS) \
2406 declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \
2407 declare_constant(JVM_ACC_QUEUED) \
2408 declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE) \
2409 declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \
2410 declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \
2411 declare_constant(JVM_ACC_HAS_JSRS) \
2412 declare_constant(JVM_ACC_IS_OLD) \
2413 declare_constant(JVM_ACC_IS_OBSOLETE) \
2414 declare_constant(JVM_ACC_IS_PREFIXED_NATIVE) \
2415 declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \
2416 declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \
2417 declare_constant(JVM_ACC_HAS_FINALIZER) \
2418 declare_constant(JVM_ACC_IS_CLONEABLE) \
2419 declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \
2420 declare_constant(JVM_ACC_PROMOTED_FLAGS) \
2421 declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \
2422 declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED) \
2423 declare_constant(JVM_ACC_FIELD_INTERNAL) \
2424 declare_constant(JVM_ACC_FIELD_STABLE) \
2425 declare_constant(JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE) \
2426 \
2427 declare_constant(JVM_CONSTANT_Utf8) \
2428 declare_constant(JVM_CONSTANT_Unicode) \
2429 declare_constant(JVM_CONSTANT_Integer) \
2430 declare_constant(JVM_CONSTANT_Float) \
2431 declare_constant(JVM_CONSTANT_Long) \
2432 declare_constant(JVM_CONSTANT_Double) \
2433 declare_constant(JVM_CONSTANT_Class) \
2434 declare_constant(JVM_CONSTANT_String) \
2435 declare_constant(JVM_CONSTANT_Fieldref) \
2436 declare_constant(JVM_CONSTANT_Methodref) \
2437 declare_constant(JVM_CONSTANT_InterfaceMethodref) \
2438 declare_constant(JVM_CONSTANT_NameAndType) \
2439 declare_constant(JVM_CONSTANT_MethodHandle) \
2440 declare_constant(JVM_CONSTANT_MethodType) \
2441 declare_constant(JVM_CONSTANT_InvokeDynamic) \
2442 declare_constant(JVM_CONSTANT_ExternalMax) \
2443 \
2444 declare_constant(JVM_CONSTANT_Invalid) \
2445 declare_constant(JVM_CONSTANT_InternalMin) \
2446 declare_constant(JVM_CONSTANT_UnresolvedClass) \
2447 declare_constant(JVM_CONSTANT_ClassIndex) \
2448 declare_constant(JVM_CONSTANT_StringIndex) \
2449 declare_constant(JVM_CONSTANT_UnresolvedClassInError) \
2450 declare_constant(JVM_CONSTANT_MethodHandleInError) \
2451 declare_constant(JVM_CONSTANT_MethodTypeInError) \
2452 declare_constant(JVM_CONSTANT_InternalMax) \
2453 \
2454 /*****************************/ \
2455 /* Thread::SuspendFlags enum */ \
2456 /*****************************/ \
2457 \
2458 declare_constant(Thread::_external_suspend) \
2459 declare_constant(Thread::_ext_suspended) \
2460 declare_constant(Thread::_has_async_exception) \
2461 \
2462 /*******************/ \
2463 /* JavaThreadState */ \
2464 /*******************/ \
2465 \
2466 declare_constant(_thread_uninitialized) \
2467 declare_constant(_thread_new) \
2468 declare_constant(_thread_new_trans) \
2469 declare_constant(_thread_in_native) \
2470 declare_constant(_thread_in_native_trans) \
2471 declare_constant(_thread_in_vm) \
2472 declare_constant(_thread_in_vm_trans) \
2473 declare_constant(_thread_in_Java) \
2474 declare_constant(_thread_in_Java_trans) \
2475 declare_constant(_thread_blocked) \
2476 declare_constant(_thread_blocked_trans) \
2477 \
2478 /******************************/ \
2479 /* Klass misc. enum constants */ \
2480 /******************************/ \
2481 \
2482 declare_constant(Klass::_primary_super_limit) \
2483 declare_constant(Klass::_lh_neutral_value) \
2484 declare_constant(Klass::_lh_instance_slow_path_bit) \
2485 declare_constant(Klass::_lh_log2_element_size_shift) \
2486 declare_constant(Klass::_lh_log2_element_size_mask) \
2487 declare_constant(Klass::_lh_element_type_shift) \
2488 declare_constant(Klass::_lh_element_type_mask) \
2489 declare_constant(Klass::_lh_header_size_shift) \
2490 declare_constant(Klass::_lh_header_size_mask) \
2491 declare_constant(Klass::_lh_array_tag_shift) \
2492 declare_constant(Klass::_lh_array_tag_type_value) \
2493 declare_constant(Klass::_lh_array_tag_obj_value) \
2494 \
2495 /********************************/ \
2496 /* ConstMethod anon-enum */ \
2497 /********************************/ \
2498 \
2499 declare_constant(Method::_jfr_towrite) \
2500 declare_constant(Method::_caller_sensitive) \
2501 declare_constant(Method::_force_inline) \
2502 declare_constant(Method::_dont_inline) \
2503 declare_constant(Method::_hidden) \
2504 \
2505 declare_constant(Method::nonvirtual_vtable_index) \
2506 \
2507 declare_constant(Method::extra_stack_entries_for_jsr292) \
2508 \
2509 declare_constant(ConstMethod::_has_linenumber_table) \
2510 declare_constant(ConstMethod::_has_checked_exceptions) \
2511 declare_constant(ConstMethod::_has_localvariable_table) \
2512 declare_constant(ConstMethod::_has_exception_table) \
2513 declare_constant(ConstMethod::_has_generic_signature) \
2514 declare_constant(ConstMethod::_has_method_parameters) \
2515 declare_constant(ConstMethod::_has_method_annotations) \
2516 declare_constant(ConstMethod::_has_parameter_annotations) \
2517 declare_constant(ConstMethod::_has_default_annotations) \
2518 declare_constant(ConstMethod::_has_type_annotations) \
2519 \
2520 /**************/ \
2521 /* DataLayout */ \
2522 /**************/ \
2523 \
2524 declare_constant(DataLayout::cell_size) \
2525 declare_constant(DataLayout::no_tag) \
2526 declare_constant(DataLayout::bit_data_tag) \
2527 declare_constant(DataLayout::counter_data_tag) \
2528 declare_constant(DataLayout::jump_data_tag) \
2529 declare_constant(DataLayout::receiver_type_data_tag) \
2530 declare_constant(DataLayout::virtual_call_data_tag) \
2531 declare_constant(DataLayout::ret_data_tag) \
2532 declare_constant(DataLayout::branch_data_tag) \
2533 declare_constant(DataLayout::multi_branch_data_tag) \
2534 declare_constant(DataLayout::arg_info_data_tag) \
2535 declare_constant(DataLayout::call_type_data_tag) \
2536 declare_constant(DataLayout::virtual_call_type_data_tag) \
2537 declare_constant(DataLayout::parameters_type_data_tag) \
2538 declare_constant(DataLayout::speculative_trap_data_tag) \
2539 \
2540 /*************************************/ \
2541 /* InstanceKlass enum */ \
2542 /*************************************/ \
2543 \
2544 \
2545 /*************************************/ \
2546 /* FieldInfo FieldOffset enum */ \
2547 /*************************************/ \
2548 \
2549 declare_constant(FieldInfo::access_flags_offset) \
2550 declare_constant(FieldInfo::name_index_offset) \
2551 declare_constant(FieldInfo::signature_index_offset) \
2552 declare_constant(FieldInfo::initval_index_offset) \
2553 declare_constant(FieldInfo::low_packed_offset) \
2554 declare_constant(FieldInfo::high_packed_offset) \
2555 declare_constant(FieldInfo::field_slots) \
2556 \
2557 /*************************************/ \
2558 /* FieldInfo tag constants */ \
2572 declare_constant(InstanceKlass::inner_class_access_flags_offset) \
2573 declare_constant(InstanceKlass::inner_class_next_offset) \
2574 \
2575 /*********************************/ \
2576 /* InstanceKlass ClassState enum */ \
2577 /*********************************/ \
2578 \
2579 declare_constant(InstanceKlass::allocated) \
2580 declare_constant(InstanceKlass::loaded) \
2581 declare_constant(InstanceKlass::linked) \
2582 declare_constant(InstanceKlass::being_initialized) \
2583 declare_constant(InstanceKlass::fully_initialized) \
2584 declare_constant(InstanceKlass::initialization_error) \
2585 \
2586 /*********************************/ \
2587 /* Symbol* - symbol max length */ \
2588 /*********************************/ \
2589 \
2590 declare_constant(Symbol::max_symbol_length) \
2591 \
2592 /***********************************************/ \
2593 /* ConstantPool* layout enum for InvokeDynamic */ \
2594 /***********************************************/ \
2595 \
2596 declare_constant(ConstantPool::_indy_bsm_offset) \
2597 declare_constant(ConstantPool::_indy_argc_offset) \
2598 declare_constant(ConstantPool::_indy_argv_offset) \
2599 declare_constant(ConstantPool::CPCACHE_INDEX_TAG) \
2600 \
2601 /********************************/ \
2602 /* ConstantPoolCacheEntry enums */ \
2603 /********************************/ \
2604 \
2605 declare_constant(ConstantPoolCacheEntry::is_volatile_shift) \
2606 declare_constant(ConstantPoolCacheEntry::is_final_shift) \
2607 declare_constant(ConstantPoolCacheEntry::is_forced_virtual_shift) \
2608 declare_constant(ConstantPoolCacheEntry::is_vfinal_shift) \
2609 declare_constant(ConstantPoolCacheEntry::is_field_entry_shift) \
2610 declare_constant(ConstantPoolCacheEntry::tos_state_shift) \
2611 \
2612 /***************************************/ \
2613 /* java_lang_Thread::ThreadStatus enum */ \
2614 /***************************************/ \
2615 \
2616 declare_constant(java_lang_Thread::NEW) \
2617 declare_constant(java_lang_Thread::RUNNABLE) \
2618 declare_constant(java_lang_Thread::SLEEPING) \
2619 declare_constant(java_lang_Thread::IN_OBJECT_WAIT) \
2674 declare_constant(Deoptimization::Reason_rtm_state_change) \
2675 declare_constant(Deoptimization::Reason_unstable_if) \
2676 declare_constant(Deoptimization::Reason_unstable_fused_if) \
2677 declare_constant(Deoptimization::Reason_tenured) \
2678 declare_constant(Deoptimization::Reason_LIMIT) \
2679 declare_constant(Deoptimization::Reason_RECORDED_LIMIT) \
2680 \
2681 declare_constant(Deoptimization::Action_none) \
2682 declare_constant(Deoptimization::Action_maybe_recompile) \
2683 declare_constant(Deoptimization::Action_reinterpret) \
2684 declare_constant(Deoptimization::Action_make_not_entrant) \
2685 declare_constant(Deoptimization::Action_make_not_compilable) \
2686 declare_constant(Deoptimization::Action_LIMIT) \
2687 \
2688 /***************************************************/ \
2689 /* DEFAULT_CACHE_LINE_SIZE (globalDefinitions.hpp) */ \
2690 /***************************************************/ \
2691 \
2692 declare_constant(DEFAULT_CACHE_LINE_SIZE) \
2693 \
2694 declare_constant(Deoptimization::Unpack_deopt) \
2695 declare_constant(Deoptimization::Unpack_exception) \
2696 declare_constant(Deoptimization::Unpack_uncommon_trap) \
2697 declare_constant(Deoptimization::Unpack_reexecute) \
2698 \
2699 declare_constant(Deoptimization::_action_bits) \
2700 declare_constant(Deoptimization::_reason_bits) \
2701 declare_constant(Deoptimization::_debug_id_bits) \
2702 declare_constant(Deoptimization::_action_shift) \
2703 declare_constant(Deoptimization::_reason_shift) \
2704 declare_constant(Deoptimization::_debug_id_shift) \
2705 \
2706 /*********************/ \
2707 /* Matcher (C2 only) */ \
2708 /*********************/ \
2709 \
2710 declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \
2711 \
2712 /*********************************************/ \
2713 /* MethodCompilation (globalDefinitions.hpp) */ \
2714 /*********************************************/ \
2715 \
2716 declare_constant(InvocationEntryBci) \
2717 \
2718 /*************/ \
2719 /* CompLevel */ \
2720 /*************/ \
2721 \
2722 declare_constant(CompLevel_any) \
2723 declare_constant(CompLevel_all) \
2724 declare_constant(CompLevel_none) \
2725 declare_constant(CompLevel_simple) \
2726 declare_constant(CompLevel_limited_profile) \
2727 declare_constant(CompLevel_full_profile) \
2728 declare_constant(CompLevel_full_optimization) \
2729 \
2730 /***************/ \
2731 /* OopMapValue */ \
2732 /***************/ \
2733 \
2734 declare_constant(OopMapValue::type_bits) \
2735 declare_constant(OopMapValue::register_bits) \
2736 declare_constant(OopMapValue::type_shift) \
2737 declare_constant(OopMapValue::register_shift) \
2738 declare_constant(OopMapValue::type_mask) \
2739 declare_constant(OopMapValue::type_mask_in_place) \
2740 declare_constant(OopMapValue::register_mask) \
2741 declare_constant(OopMapValue::register_mask_in_place) \
2742 declare_constant(OopMapValue::unused_value) \
2743 declare_constant(OopMapValue::oop_value) \
2744 declare_constant(OopMapValue::narrowoop_value) \
2745 declare_constant(OopMapValue::callee_saved_value) \
2746 declare_constant(OopMapValue::derived_oop_value) \
2747 \
2748 /******************/ \
2749 /* JNIHandleBlock */ \
2840 declare_constant(markOopDesc::epoch_mask) \
2841 declare_constant(markOopDesc::epoch_mask_in_place) \
2842 declare_constant(markOopDesc::hash_mask) \
2843 declare_constant(markOopDesc::hash_mask_in_place) \
2844 declare_constant(markOopDesc::biased_lock_alignment) \
2845 \
2846 declare_constant(markOopDesc::locked_value) \
2847 declare_constant(markOopDesc::unlocked_value) \
2848 declare_constant(markOopDesc::monitor_value) \
2849 declare_constant(markOopDesc::marked_value) \
2850 declare_constant(markOopDesc::biased_lock_pattern) \
2851 \
2852 declare_constant(markOopDesc::no_hash) \
2853 declare_constant(markOopDesc::no_hash_in_place) \
2854 declare_constant(markOopDesc::no_lock_in_place) \
2855 declare_constant(markOopDesc::max_age) \
2856 \
2857 /* Constants in markOop used by CMS. */ \
2858 declare_constant(markOopDesc::cms_shift) \
2859 declare_constant(markOopDesc::cms_mask) \
2860 declare_constant(markOopDesc::size_shift) \
2861 \
2862 /* InvocationCounter constants */ \
2863 declare_constant(InvocationCounter::count_increment) \
2864 declare_constant(InvocationCounter::count_shift)
2865
2866
2867 //--------------------------------------------------------------------------------
2868 // VM_ADDRESSES
2869 //
2870
2871 #define VM_ADDRESSES(declare_address, declare_preprocessor_address, declare_function) \
2872 \
2873 declare_function(SharedRuntime::register_finalizer) \
2874 declare_function(SharedRuntime::exception_handler_for_return_address) \
2875 declare_function(SharedRuntime::OSR_migration_end) \
2876 declare_function(SharedRuntime::dsin) \
2877 declare_function(SharedRuntime::dcos) \
2878 declare_function(SharedRuntime::dtan) \
2879 declare_function(SharedRuntime::dexp) \
2880 declare_function(SharedRuntime::dlog) \
2881 declare_function(SharedRuntime::dlog10) \
2882 declare_function(SharedRuntime::dpow) \
2883 \
2884 declare_function(os::dll_load) \
2885 declare_function(os::dll_lookup) \
2886 declare_function(os::javaTimeMillis) \
2887 declare_function(os::javaTimeNanos) \
2888 \
2889 declare_function(Deoptimization::fetch_unroll_info) \
2890 COMPILER2_PRESENT(declare_function(Deoptimization::uncommon_trap)) \
2891 declare_function(Deoptimization::unpack_frames)
2892
2893 //--------------------------------------------------------------------------------
2894 // Macros operating on the above lists
2895 //--------------------------------------------------------------------------------
2896
2897 // This utility macro quotes the passed string
2898 #define QUOTE(x) #x
2899
2900 //--------------------------------------------------------------------------------
2901 // VMStructEntry macros
2902 //
2903
2904 // This macro generates a VMStructEntry line for a nonstatic field
2905 #define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2906 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
2907
2908 // This macro generates a VMStructEntry line for a static field
2909 #define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2910 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
2911
3104 // This macro generates the sentinel value indicating the end of the list
3105 #define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
3106 { NULL, 0 }
3107
3108 // Generate a long constant for a C1 build
3109 #ifdef COMPILER1
3110 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
3111 #else
3112 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)
3113 #endif /* COMPILER1 */
3114
3115 // Generate a long constant for a C2 build
3116 #ifdef COMPILER2
3117 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
3118 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
3119 #else
3120 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)
3121 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
3122 #endif /* COMPILER1 */
3123
3124 //--------------------------------------------------------------------------------
3125 // VMAddressEntry macros
3126 //
3127
3128 #define GENERATE_VM_ADDRESS_ENTRY(name) \
3129 { QUOTE(name), (void*) (name) },
3130
3131 #define GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY(name, value) \
3132 { name, (void*) (value) },
3133
3134 #define GENERATE_VM_FUNCTION_ENTRY(name) \
3135 { QUOTE(name), CAST_FROM_FN_PTR(void*, &(name)) },
3136
3137 // This macro generates the sentinel value indicating the end of the list
3138 #define GENERATE_VM_ADDRESS_LAST_ENTRY() \
3139 { NULL, NULL }
3140
3141 //
3142 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
3143 //
3144
3145 // These initializers are allowed to access private fields in classes
3146 // as long as class VMStructs is a friend
3147 VMStructEntry VMStructs::localHotSpotVMStructs[] = {
3148
3149 VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3150 GENERATE_STATIC_VM_STRUCT_ENTRY,
3151 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
3152 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3153 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3154 GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY,
3155 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
3156 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
3157 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
3158
3159 #if INCLUDE_JVMCI
3160 VM_STRUCTS_JVMCI(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3161 GENERATE_STATIC_VM_STRUCT_ENTRY)
3162 #endif
3163
3164 #if INCLUDE_ALL_GCS
3165 VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3166 GENERATE_STATIC_VM_STRUCT_ENTRY)
3167
3168 VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3169 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3170 GENERATE_STATIC_VM_STRUCT_ENTRY)
3171
3172 VM_STRUCTS_G1(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3173 GENERATE_STATIC_VM_STRUCT_ENTRY)
3174 #endif // INCLUDE_ALL_GCS
3175
3176 #if INCLUDE_TRACE
3177 VM_STRUCTS_TRACE(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3178 GENERATE_STATIC_VM_STRUCT_ENTRY)
3179 #endif
3180
3181 VM_STRUCTS_EXT(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3182 GENERATE_STATIC_VM_STRUCT_ENTRY)
3183
3184 VM_STRUCTS_OS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3185 GENERATE_STATIC_VM_STRUCT_ENTRY,
3186 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
3187 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3188 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3189 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
3190 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
3191 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
3192
3193 VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3194 GENERATE_STATIC_VM_STRUCT_ENTRY,
3195 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
3196 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3197 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3198 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
3199 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
3200 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
3201
3202 VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3203 GENERATE_STATIC_VM_STRUCT_ENTRY,
3204 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
3205 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
3206 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3207 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
3208 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
3209 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
3210
3211 GENERATE_VM_STRUCT_LAST_ENTRY()
3212 };
3213
3214 VMTypeEntry VMStructs::localHotSpotVMTypes[] = {
3215
3216 VM_TYPES(GENERATE_VM_TYPE_ENTRY,
3217 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3218 GENERATE_OOP_VM_TYPE_ENTRY,
3219 GENERATE_INTEGER_VM_TYPE_ENTRY,
3220 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3221 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3222 GENERATE_C2_VM_TYPE_ENTRY,
3223 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3224
3225 #if INCLUDE_JVMCI
3226 VM_TYPES_JVMCI(GENERATE_VM_TYPE_ENTRY,
3227 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3228 #endif
3229
3230 #if INCLUDE_ALL_GCS
3231 VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
3232 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3233
3234 VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY,
3235 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3236
3237 VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY)
3238
3239 VM_TYPES_G1(GENERATE_VM_TYPE_ENTRY,
3240 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3241 #endif // INCLUDE_ALL_GCS
3242
3243 #if INCLUDE_TRACE
3244 VM_TYPES_TRACE(GENERATE_VM_TYPE_ENTRY,
3245 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3246 #endif
3247
3248 VM_TYPES_EXT(GENERATE_VM_TYPE_ENTRY,
3249 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
3250
3251 VM_TYPES_OS(GENERATE_VM_TYPE_ENTRY,
3252 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3253 GENERATE_OOP_VM_TYPE_ENTRY,
3254 GENERATE_INTEGER_VM_TYPE_ENTRY,
3255 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3256 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3257 GENERATE_C2_VM_TYPE_ENTRY,
3258 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3259
3260 VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
3261 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3262 GENERATE_OOP_VM_TYPE_ENTRY,
3263 GENERATE_INTEGER_VM_TYPE_ENTRY,
3264 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3265 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3266 GENERATE_C2_VM_TYPE_ENTRY,
3267 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3268
3269 VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY,
3270 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
3271 GENERATE_OOP_VM_TYPE_ENTRY,
3272 GENERATE_INTEGER_VM_TYPE_ENTRY,
3273 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
3274 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
3275 GENERATE_C2_VM_TYPE_ENTRY,
3276 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
3277
3278 GENERATE_VM_TYPE_LAST_ENTRY()
3279 };
3280
3281 VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {
3282
3283 VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
3284 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3285 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3286 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3287 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3288
3289 #if INCLUDE_JVMCI
3290 VM_INT_CONSTANTS_JVMCI(GENERATE_VM_INT_CONSTANT_ENTRY,
3291 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3292
3293 #endif
3294
3295 #if INCLUDE_ALL_GCS
3296 VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)
3297
3298 VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY)
3299 #endif // INCLUDE_ALL_GCS
3300
3301 #if INCLUDE_TRACE
3302 VM_INT_CONSTANTS_TRACE(GENERATE_VM_INT_CONSTANT_ENTRY)
3303 #endif
3304
3305 VM_INT_CONSTANTS_OS(GENERATE_VM_INT_CONSTANT_ENTRY,
3306 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3307 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3308 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3309 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3310
3311 VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
3312 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3313 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3314 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3315 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3316
3317 VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
3318 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
3319 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
3320 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3321 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
3322
3323 GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
3324 };
3325
3326 VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {
3327
3328 VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
3329 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3330 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3331 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3332 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3333
3334 VM_LONG_CONSTANTS_OS(GENERATE_VM_LONG_CONSTANT_ENTRY,
3335 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3336 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3337 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3338 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3339
3340 VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
3341 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3342 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3343 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3344 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3345
3346 VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
3347 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
3348 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
3349 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3350 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
3351
3352 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
3353 };
3354
3355 VMAddressEntry VMStructs::localHotSpotVMAddresses[] = {
3356
3357 VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,
3358 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
3359 GENERATE_VM_FUNCTION_ENTRY)
3360
3361 VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,
3362 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
3363 GENERATE_VM_FUNCTION_ENTRY)
3364
3365 #if INCLUDE_JVMCI
3366 VM_ADDRESSES_JVMCI(GENERATE_VM_ADDRESS_ENTRY,
3367 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
3368 GENERATE_VM_FUNCTION_ENTRY)
3369 #endif
3370
3371 GENERATE_VM_ADDRESS_LAST_ENTRY()
3372 };
3373
3374 // This is used both to check the types of referenced fields and, in
3375 // debug builds, to ensure that all of the field types are present.
3376 void
3377 VMStructs::init() {
3378 VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3379 CHECK_STATIC_VM_STRUCT_ENTRY,
3380 CHECK_NO_OP,
3381 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
3382 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
3383 CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY,
3384 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
3385 CHECK_NO_OP,
3386 CHECK_NO_OP);
3387
3388 #if INCLUDE_ALL_GCS
3389 VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3390 CHECK_STATIC_VM_STRUCT_ENTRY);
3391
3392 VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3393 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
3562 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic);
3563 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset);
3564 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address);
3565 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs);
3566 JNIEXPORT VMTypeEntry* gHotSpotVMTypes = VMStructs::localHotSpotVMTypes;
3567 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName);
3568 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
3569 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType);
3570 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType);
3571 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned);
3572 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size);
3573 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes);
3574 JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants = VMStructs::localHotSpotVMIntConstants;
3575 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name);
3576 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
3577 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants);
3578 JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants;
3579 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name);
3580 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
3581 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants);
3582
3583 JNIEXPORT VMAddressEntry* gHotSpotVMAddresses = VMStructs::localHotSpotVMAddresses;
3584 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMAddressEntryNameOffset, VMAddressEntry, name);
3585 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMAddressEntryValueOffset, VMAddressEntry, value);
3586 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMAddressEntryArrayStride, gHotSpotVMAddresses);
3587 }
3588
3589 #ifdef ASSERT
3590 static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) {
3591 {
3592 VMTypeEntry* types = origtypes;
3593 while (types->typeName != NULL) {
3594 if (strcmp(typeName, types->typeName) == 0) {
3595 // Found it
3596 return 1;
3597 }
3598 ++types;
3599 }
3600 }
3601 // Search for the base type by peeling off const and *
3602 size_t len = strlen(typeName);
3603 if (typeName[len-1] == '*') {
3604 char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
3605 strncpy(s, typeName, len - 1);
3606 s[len-1] = '\0';
3674 static VMStructEntry struct_last_entry = GENERATE_VM_STRUCT_LAST_ENTRY();
3675 assert(memcmp(&localHotSpotVMStructs[(sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1],
3676 &struct_last_entry,
3677 sizeof(VMStructEntry)) == 0, "Incorrect last entry in localHotSpotVMStructs");
3678
3679 static VMTypeEntry type_last_entry = GENERATE_VM_TYPE_LAST_ENTRY();
3680 assert(memcmp(&localHotSpotVMTypes[sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry) - 1],
3681 &type_last_entry,
3682 sizeof(VMTypeEntry)) == 0, "Incorrect last entry in localHotSpotVMTypes");
3683
3684 static VMIntConstantEntry int_last_entry = GENERATE_VM_INT_CONSTANT_LAST_ENTRY();
3685 assert(memcmp(&localHotSpotVMIntConstants[sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry) - 1],
3686 &int_last_entry,
3687 sizeof(VMIntConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMIntConstants");
3688
3689 static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY();
3690 assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1],
3691 &long_last_entry,
3692 sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");
3693
3694 static VMAddressEntry address_last_entry = GENERATE_VM_ADDRESS_LAST_ENTRY();
3695 assert(memcmp(&localHotSpotVMAddresses[sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry) - 1],
3696 &address_last_entry,
3697 sizeof(VMAddressEntry)) == 0, "Incorrect last entry in localHotSpotVMAddresses");
3698
3699
3700 // Check for duplicate entries in type array
3701 for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
3702 for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
3703 if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
3704 tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
3705 assert(false, "Duplicate types in localHotSpotVMTypes array");
3706 }
3707 }
3708 }
3709 }
3710 #endif
|