74 template(java_lang_ClassLoader, "java/lang/ClassLoader") \
75 template(java_lang_Runnable, "java/lang/Runnable") \
76 template(jdk_internal_vm_ContinuationScope, "jdk/internal/vm/ContinuationScope") \
77 template(jdk_internal_vm_StackChunk, "jdk/internal/vm/StackChunk") \
78 template(java_lang_Boolean, "java/lang/Boolean") \
79 template(java_lang_Character, "java/lang/Character") \
80 template(java_lang_Character_CharacterCache, "java/lang/Character$CharacterCache") \
81 template(java_lang_CharacterDataLatin1, "java/lang/CharacterDataLatin1") \
82 template(java_lang_Float, "java/lang/Float") \
83 template(java_lang_Double, "java/lang/Double") \
84 template(java_lang_Byte, "java/lang/Byte") \
85 template(java_lang_Byte_ByteCache, "java/lang/Byte$ByteCache") \
86 template(java_lang_Short, "java/lang/Short") \
87 template(java_lang_Short_ShortCache, "java/lang/Short$ShortCache") \
88 template(java_lang_Integer, "java/lang/Integer") \
89 template(java_lang_Integer_IntegerCache, "java/lang/Integer$IntegerCache") \
90 template(java_lang_Long, "java/lang/Long") \
91 template(java_lang_Long_LongCache, "java/lang/Long$LongCache") \
92 template(java_lang_Void, "java/lang/Void") \
93 \
94 template(jdk_internal_vm_vector_VectorSupport, "jdk/internal/vm/vector/VectorSupport") \
95 template(jdk_internal_vm_vector_Float16Math, "jdk/internal/vm/vector/Float16Math") \
96 template(jdk_internal_vm_vector_VectorPayload, "jdk/internal/vm/vector/VectorSupport$VectorPayload") \
97 template(jdk_internal_vm_vector_Vector, "jdk/internal/vm/vector/VectorSupport$Vector") \
98 template(jdk_internal_vm_vector_VectorMask, "jdk/internal/vm/vector/VectorSupport$VectorMask") \
99 template(jdk_internal_vm_vector_VectorShuffle, "jdk/internal/vm/vector/VectorSupport$VectorShuffle") \
100 template(payload_name, "payload") \
101 template(ETYPE_name, "ETYPE") \
102 template(VLENGTH_name, "VLENGTH") \
103 \
104 template(jdk_internal_vm_FillerObject, "jdk/internal/vm/FillerObject") \
105 \
106 template(java_lang_Shutdown, "java/lang/Shutdown") \
107 template(java_lang_ref_Reference, "java/lang/ref/Reference") \
108 template(java_lang_ref_SoftReference, "java/lang/ref/SoftReference") \
109 template(java_lang_ref_WeakReference, "java/lang/ref/WeakReference") \
110 template(java_lang_ref_FinalReference, "java/lang/ref/FinalReference") \
111 template(java_lang_ref_PhantomReference, "java/lang/ref/PhantomReference") \
112 template(java_lang_ref_Finalizer, "java/lang/ref/Finalizer") \
113 template(java_lang_reflect_AccessibleObject, "java/lang/reflect/AccessibleObject") \
120 template(java_lang_StringBuffer, "java/lang/StringBuffer") \
121 template(java_lang_StringBuilder, "java/lang/StringBuilder") \
122 template(java_lang_ScopedValue, "java/lang/ScopedValue") \
123 template(java_lang_ScopedValue_Carrier, "java/lang/ScopedValue$Carrier") \
124 template(java_security_CodeSource, "java/security/CodeSource") \
125 template(java_security_ProtectionDomain, "java/security/ProtectionDomain") \
126 template(java_security_SecureClassLoader, "java/security/SecureClassLoader") \
127 template(java_net_URL, "java/net/URL") \
128 template(java_util_jar_Manifest, "java/util/jar/Manifest") \
129 template(java_io_ByteArrayInputStream, "java/io/ByteArrayInputStream") \
130 template(java_io_Serializable, "java/io/Serializable") \
131 template(java_nio_Buffer, "java/nio/Buffer") \
132 template(java_util_Arrays, "java/util/Arrays") \
133 template(java_util_Properties, "java/util/Properties") \
134 template(java_util_DualPivotQuicksort, "java/util/DualPivotQuicksort") \
135 template(jdk_internal_misc_Signal, "jdk/internal/misc/Signal") \
136 template(jdk_internal_util_Preconditions, "jdk/internal/util/Preconditions") \
137 template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
138 template(jdk_internal_vm_PostVMInitHook, "jdk/internal/vm/PostVMInitHook") \
139 template(java_util_Iterator, "java/util/Iterator") \
140 template(java_lang_Record, "java/lang/Record") \
141 template(sun_instrument_InstrumentationImpl, "sun/instrument/InstrumentationImpl") \
142 template(sun_invoke_util_ValueConversions, "sun/invoke/util/ValueConversions") \
143 \
144 template(jdk_internal_loader_NativeLibraries, "jdk/internal/loader/NativeLibraries") \
145 template(jdk_internal_loader_BuiltinClassLoader, "jdk/internal/loader/BuiltinClassLoader") \
146 template(jdk_internal_loader_ClassLoaders_AppClassLoader, "jdk/internal/loader/ClassLoaders$AppClassLoader") \
147 template(jdk_internal_loader_ClassLoaders_PlatformClassLoader, "jdk/internal/loader/ClassLoaders$PlatformClassLoader") \
148 template(java_lang_Deprecated, "Ljava/lang/Deprecated;") \
149 template(since, "since") \
150 template(for_removal, "forRemoval") \
151 /* Java runtime version access */ \
152 template(java_lang_VersionProps, "java/lang/VersionProps") \
153 template(java_version_name, "java_version") \
154 template(java_runtime_name_name, "java_runtime_name") \
155 template(java_runtime_version_name, "java_runtime_version") \
156 template(java_runtime_vendor_version_name, "VENDOR_VERSION") \
157 template(java_runtime_vendor_vm_bug_url_name, "VENDOR_URL_VM_BUG") \
158 \
159 /* system initialization */ \
160 template(initPhase1_name, "initPhase1") \
161 template(initPhase2_name, "initPhase2") \
162 template(initPhase3_name, "initPhase3") \
163 template(java_lang_module_init_signature, "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
164 \
165 /* class file format tags */ \
166 template(tag_source_file, "SourceFile") \
167 template(tag_inner_classes, "InnerClasses") \
168 template(tag_nest_members, "NestMembers") \
169 template(tag_nest_host, "NestHost") \
170 template(tag_constant_value, "ConstantValue") \
171 template(tag_code, "Code") \
172 template(tag_exceptions, "Exceptions") \
173 template(tag_line_number_table, "LineNumberTable") \
174 template(tag_local_variable_table, "LocalVariableTable") \
175 template(tag_local_variable_type_table, "LocalVariableTypeTable") \
176 template(tag_method_parameters, "MethodParameters") \
177 template(tag_stack_map_table, "StackMapTable") \
178 template(tag_synthetic, "Synthetic") \
179 template(tag_deprecated, "Deprecated") \
180 template(tag_source_debug_extension, "SourceDebugExtension") \
181 template(tag_signature, "Signature") \
182 template(tag_record, "Record") \
183 template(tag_runtime_visible_annotations, "RuntimeVisibleAnnotations") \
184 template(tag_runtime_invisible_annotations, "RuntimeInvisibleAnnotations") \
185 template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations") \
186 template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations") \
187 template(tag_annotation_default, "AnnotationDefault") \
188 template(tag_runtime_visible_type_annotations, "RuntimeVisibleTypeAnnotations") \
189 template(tag_runtime_invisible_type_annotations, "RuntimeInvisibleTypeAnnotations") \
190 template(tag_enclosing_method, "EnclosingMethod") \
191 template(tag_bootstrap_methods, "BootstrapMethods") \
192 template(tag_permitted_subclasses, "PermittedSubclasses") \
193 \
194 /* exception klasses: at least all exceptions thrown by the VM have entries here */ \
195 template(java_lang_ArithmeticException, "java/lang/ArithmeticException") \
196 template(java_lang_ArrayIndexOutOfBoundsException, "java/lang/ArrayIndexOutOfBoundsException") \
197 template(java_lang_ArrayStoreException, "java/lang/ArrayStoreException") \
198 template(java_lang_ClassCastException, "java/lang/ClassCastException") \
199 template(java_lang_ClassNotFoundException, "java/lang/ClassNotFoundException") \
200 template(java_lang_CloneNotSupportedException, "java/lang/CloneNotSupportedException") \
201 template(java_lang_IllegalAccessException, "java/lang/IllegalAccessException") \
202 template(java_lang_IllegalArgumentException, "java/lang/IllegalArgumentException") \
203 template(java_lang_IllegalCallerException, "java/lang/IllegalCallerException") \
204 template(java_lang_IllegalStateException, "java/lang/IllegalStateException") \
205 template(java_lang_IllegalMonitorStateException, "java/lang/IllegalMonitorStateException") \
206 template(java_lang_IllegalThreadStateException, "java/lang/IllegalThreadStateException") \
207 template(java_lang_IndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException") \
208 template(java_lang_InstantiationException, "java/lang/InstantiationException") \
209 template(java_lang_InstantiationError, "java/lang/InstantiationError") \
210 template(java_lang_InterruptedException, "java/lang/InterruptedException") \
211 template(java_lang_BootstrapMethodError, "java/lang/BootstrapMethodError") \
212 template(java_lang_LinkageError, "java/lang/LinkageError") \
213 template(java_lang_NegativeArraySizeException, "java/lang/NegativeArraySizeException") \
214 template(java_lang_NoSuchMethodException, "java/lang/NoSuchMethodException") \
215 template(java_lang_NullPointerException, "java/lang/NullPointerException") \
216 template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\
217 template(java_lang_UnsupportedOperationException, "java/lang/UnsupportedOperationException") \
218 template(java_lang_InvalidClassException, "java/lang/InvalidClassException") \
219 template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \
220 template(java_lang_Exception, "java/lang/Exception") \
221 template(java_lang_RuntimeException, "java/lang/RuntimeException") \
222 template(java_io_IOException, "java/io/IOException") \
223 template(jdk_internal_vm_PreemptedException, "jdk/internal/vm/PreemptedException") \
224 \
225 /* error klasses: at least all errors thrown by the VM have entries here */ \
234 template(java_lang_InternalError, "java/lang/InternalError") \
235 template(java_lang_NoClassDefFoundError, "java/lang/NoClassDefFoundError") \
236 template(java_lang_NoSuchFieldError, "java/lang/NoSuchFieldError") \
237 template(java_lang_NoSuchMethodError, "java/lang/NoSuchMethodError") \
238 template(java_lang_OutOfMemoryError, "java/lang/OutOfMemoryError") \
239 template(java_lang_UnsatisfiedLinkError, "java/lang/UnsatisfiedLinkError") \
240 template(java_lang_VerifyError, "java/lang/VerifyError") \
241 template(java_lang_SecurityException, "java/lang/SecurityException") \
242 template(java_lang_VirtualMachineError, "java/lang/VirtualMachineError") \
243 template(java_lang_StackOverflowError, "java/lang/StackOverflowError") \
244 template(java_lang_StackTraceElement, "java/lang/StackTraceElement") \
245 \
246 /* Concurrency support */ \
247 template(java_util_concurrent_locks_AbstractOwnableSynchronizer, "java/util/concurrent/locks/AbstractOwnableSynchronizer") \
248 template(java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl, "java/util/concurrent/atomic/AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl") \
249 template(java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$CASUpdater") \
250 template(java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$LockedUpdater") \
251 template(java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl, "java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl") \
252 template(jdk_internal_vm_annotation_Contended_signature, "Ljdk/internal/vm/annotation/Contended;") \
253 template(jdk_internal_vm_annotation_ReservedStackAccess_signature, "Ljdk/internal/vm/annotation/ReservedStackAccess;") \
254 template(jdk_internal_ValueBased_signature, "Ljdk/internal/ValueBased;") \
255 \
256 /* class symbols needed by intrinsics */ \
257 VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
258 \
259 /* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */ \
260 \
261 template(jdk_internal_reflect, "jdk/internal/reflect") \
262 template(reflect_MethodAccessorImpl, "jdk/internal/reflect/MethodAccessorImpl") \
263 template(reflect_Reflection, "jdk/internal/reflect/Reflection") \
264 template(reflect_CallerSensitive, "jdk/internal/reflect/CallerSensitive") \
265 template(reflect_CallerSensitive_signature, "Ljdk/internal/reflect/CallerSensitive;") \
266 template(reflect_DirectConstructorHandleAccessor_NativeAccessor, "jdk/internal/reflect/DirectConstructorHandleAccessor$NativeAccessor") \
267 template(clazz_name, "clazz") \
268 template(exceptionTypes_name, "exceptionTypes") \
269 template(modifiers_name, "modifiers") \
270 template(invokeBasic_name, "invokeBasic") \
271 template(linkToVirtual_name, "linkToVirtual") \
272 template(linkToStatic_name, "linkToStatic") \
273 template(linkToSpecial_name, "linkToSpecial") \
274 template(linkToInterface_name, "linkToInterface") \
275 template(linkToNative_name, "linkToNative") \
276 template(compiledLambdaForm_name, "<compiledLambdaForm>") /*fake name*/ \
277 template(star_name, "*") /*not really a name*/ \
278 template(invoke_name, "invoke") \
279 template(parameterTypes_name, "parameterTypes") \
280 template(returnType_name, "returnType") \
281 template(signature_name, "signature") \
282 template(slot_name, "slot") \
283 template(trusted_final_name, "trustedFinal") \
284 template(blackhole_name, "<blackhole>") /*fake name*/ \
285 \
286 /* Support for annotations (JDK 1.5 and above) */ \
287 \
288 template(annotations_name, "annotations") \
289 template(index_name, "index") \
290 template(executable_name, "executable") \
291 template(parameter_annotations_name, "parameterAnnotations") \
292 template(annotation_default_name, "annotationDefault") \
293 template(reflect_ConstantPool, "jdk/internal/reflect/ConstantPool") \
294 template(base_name, "base") \
295 /* Type Annotations (JDK 8 and above) */ \
296 template(type_annotations_name, "typeAnnotations") \
297 \
298 /* Intrinsic Annotation (JDK 9 and above) */ \
299 template(jdk_internal_vm_annotation_DontInline_signature, "Ljdk/internal/vm/annotation/DontInline;") \
300 template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \
301 template(jdk_internal_vm_annotation_Hidden_signature, "Ljdk/internal/vm/annotation/Hidden;") \
302 template(jdk_internal_misc_Scoped_signature, "Ljdk/internal/misc/ScopedMemoryAccess$Scoped;") \
303 template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \
485 template(input_stream_void_signature, "(Ljava/io/InputStream;)V") \
486 template(input_stream_signature, "Ljava/io/InputStream;") \
487 template(print_stream_signature, "Ljava/io/PrintStream;") \
488 template(defineOrCheckPackage_name, "defineOrCheckPackage") \
489 template(defineOrCheckPackage_signature, "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
490 template(getProtectionDomain_name, "getProtectionDomain") \
491 template(getProtectionDomain_signature, "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
492 template(java_lang_Integer_array_signature, "[Ljava/lang/Integer;") \
493 template(java_lang_Long_array_signature, "[Ljava/lang/Long;") \
494 template(java_lang_Character_array_signature, "[Ljava/lang/Character;") \
495 template(java_lang_Short_array_signature, "[Ljava/lang/Short;") \
496 template(java_lang_Byte_array_signature, "[Ljava/lang/Byte;") \
497 template(java_lang_Boolean_signature, "Ljava/lang/Boolean;") \
498 template(url_code_signer_array_void_signature, "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
499 template(jvmti_thread_state_name, "jvmti_thread_state") \
500 template(jvmti_VTMS_transition_disable_count_name, "jvmti_VTMS_transition_disable_count") \
501 template(jvmti_is_in_VTMS_transition_name, "jvmti_is_in_VTMS_transition") \
502 template(module_entry_name, "module_entry") \
503 template(resolved_references_name, "<resolved_references>") \
504 template(init_lock_name, "<init_lock>") \
505 template(address_size_name, "ADDRESS_SIZE0") \
506 template(page_size_name, "PAGE_SIZE") \
507 template(big_endian_name, "BIG_ENDIAN") \
508 template(use_unaligned_access_name, "UNALIGNED_ACCESS") \
509 template(data_cache_line_flush_size_name, "DATA_CACHE_LINE_FLUSH_SIZE") \
510 template(during_unsafe_access_name, "during_unsafe_access") \
511 template(checkIndex_name, "checkIndex") \
512 template(jfr_epoch_name, "jfr_epoch") \
513 template(maxThawingSize_name, "maxThawingSize") \
514 template(lockStackSize_name, "lockStackSize") \
515 template(objectWaiter_name, "objectWaiter") \
516 template(atKlassInit_name, "atKlassInit") \
517 template(hasArgsAtTop_name, "hasArgsAtTop") \
518 \
519 /* name symbols needed by intrinsics */ \
520 VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
521 \
522 /* common signatures names */ \
523 template(void_method_signature, "()V") \
524 template(void_boolean_signature, "()Z") \
561 template(int_array_signature, "[I") \
562 template(runnable_signature, "Ljava/lang/Runnable;") \
563 template(continuation_signature, "Ljdk/internal/vm/Continuation;") \
564 template(continuationscope_signature, "Ljdk/internal/vm/ContinuationScope;") \
565 template(stackchunk_signature, "Ljdk/internal/vm/StackChunk;") \
566 template(vthread_signature, "Ljava/lang/VirtualThread;") \
567 template(object_void_signature, "(Ljava/lang/Object;)V") \
568 template(object_int_signature, "(Ljava/lang/Object;)I") \
569 template(long_object_long_signature, "(JLjava/lang/Object;)J") \
570 template(object_boolean_signature, "(Ljava/lang/Object;)Z") \
571 template(object_object_signature, "(Ljava/lang/Object;)Ljava/lang/Object;") \
572 template(string_void_signature, "(Ljava/lang/String;)V") \
573 template(string_bool_byte_array_signature, "(Ljava/lang/String;Z)[B") \
574 template(throwable_signature, "Ljava/lang/Throwable;") \
575 template(throwable_void_signature, "(Ljava/lang/Throwable;)V") \
576 template(void_throwable_signature, "()Ljava/lang/Throwable;") \
577 template(class_void_signature, "(Ljava/lang/Class;)V") \
578 template(class_int_signature, "(Ljava/lang/Class;)I") \
579 template(class_long_signature, "(Ljava/lang/Class;)J") \
580 template(class_boolean_signature, "(Ljava/lang/Class;)Z") \
581 template(throwable_throwable_signature, "(Ljava/lang/Throwable;)Ljava/lang/Throwable;") \
582 template(thread_void_signature, "(Ljava/lang/Thread;)V") \
583 template(runnable_void_signature, "(Ljava/lang/Runnable;)V") \
584 template(threadgroup_runnable_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V") \
585 template(threadgroup_string_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V") \
586 template(void_threadgroup_array_signature, "()[Ljava/lang/ThreadGroup;") \
587 template(string_class_signature, "(Ljava/lang/String;)Ljava/lang/Class;") \
588 template(string_boolean_class_signature, "(Ljava/lang/String;Z)Ljava/lang/Class;") \
589 template(object_object_object_signature, "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
590 template(string_string_signature, "(Ljava/lang/String;)Ljava/lang/String;") \
591 template(classloader_class_string_string_long_signature, "(Ljava/lang/ClassLoader;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)J") \
592 template(byte_array_void_signature, "([B)V") \
593 template(long_long_void_signature, "(JJ)V") \
594 template(void_byte_array_signature, "()[B") \
595 template(void_classloader_signature, "()Ljava/lang/ClassLoader;") \
596 template(void_BuiltinClassLoader_signature, "()Ljdk/internal/loader/BuiltinClassLoader;") \
597 template(void_object_signature, "()Ljava/lang/Object;") \
598 template(void_class_signature, "()Ljava/lang/Class;") \
599 template(void_class_array_signature, "()[Ljava/lang/Class;") \
600 template(void_string_signature, "()Ljava/lang/String;") \
601 template(object_array_object_signature, "([Ljava/lang/Object;)Ljava/lang/Object;") \
602 template(object_object_array_object_signature, "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
603 template(thread_signature, "Ljava/lang/Thread;") \
604 template(thread_fieldholder_signature, "Ljava/lang/Thread$FieldHolder;") \
605 template(threadgroup_signature, "Ljava/lang/ThreadGroup;") \
606 template(threadgroup_array_signature, "[Ljava/lang/ThreadGroup;") \
607 template(class_array_signature, "[Ljava/lang/Class;") \
608 template(classloader_signature, "Ljava/lang/ClassLoader;") \
609 template(object_signature, "Ljava/lang/Object;") \
697 template(addUses_signature, "(Ljava/lang/Module;Ljava/lang/Class;)V") \
698 template(addProvides_name, "addProvides") \
699 template(addProvides_signature, "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
700 template(loadModule_name, "loadModule") \
701 template(loadModule_signature, "(Ljava/lang/String;)Ljava/lang/Module;") \
702 template(transformedByAgent_name, "transformedByAgent") \
703 template(transformedByAgent_signature, "(Ljava/lang/Module;)V") \
704 template(appendToClassPathForInstrumentation_name, "appendToClassPathForInstrumentation") \
705 do_alias(appendToClassPathForInstrumentation_signature, string_void_signature) \
706 template(serializePropertiesToByteArray_name, "serializePropertiesToByteArray") \
707 template(serializeAgentPropertiesToByteArray_name, "serializeAgentPropertiesToByteArray") \
708 template(encodeThrowable_name, "encodeThrowable") \
709 template(encodeThrowable_signature, "(Ljava/lang/Throwable;JI)I") \
710 template(decodeAndThrowThrowable_name, "decodeAndThrowThrowable") \
711 template(encodeAnnotations_name, "encodeAnnotations") \
712 template(encodeAnnotations_signature, "([BLjava/lang/Class;Ljdk/internal/reflect/ConstantPool;Z[Ljava/lang/Class;)[B")\
713 template(decodeAndThrowThrowable_signature, "(IJZZ)V") \
714 template(classRedefinedCount_name, "classRedefinedCount") \
715 template(classLoader_name, "classLoader") \
716 template(componentType_name, "componentType") \
717 \
718 /* forEachRemaining support */ \
719 template(java_util_stream_StreamsRangeIntSpliterator, "java/util/stream/Streams$RangeIntSpliterator") \
720 \
721 /* jfr signatures */ \
722 JFR_TEMPLATES(template) \
723 \
724 /* CDS */ \
725 template(dumpSharedArchive, "dumpSharedArchive") \
726 template(dumpSharedArchive_signature, "(ZLjava/lang/String;)Ljava/lang/String;") \
727 template(generateLambdaFormHolderClasses, "generateLambdaFormHolderClasses") \
728 template(generateLambdaFormHolderClasses_signature, "([Ljava/lang/String;)[Ljava/lang/Object;") \
729 template(getResourceAsByteArray_name, "getResourceAsByteArray") \
730 template(getResourceAsByteArray_signature, "(Ljava/lang/String;)[B") \
731 template(java_lang_Enum, "java/lang/Enum") \
732 template(java_lang_invoke_Invokers_Holder, "java/lang/invoke/Invokers$Holder") \
733 template(java_lang_invoke_DirectMethodHandle_Holder, "java/lang/invoke/DirectMethodHandle$Holder") \
734 template(java_lang_invoke_LambdaForm_Holder, "java/lang/invoke/LambdaForm$Holder") \
735 template(java_lang_invoke_DelegatingMethodHandle_Holder, "java/lang/invoke/DelegatingMethodHandle$Holder") \
736 template(jdk_internal_loader_ClassLoaders, "jdk/internal/loader/ClassLoaders") \
737 template(jdk_internal_misc_CDS, "jdk/internal/misc/CDS") \
738 template(jdk_internal_vm_annotation_AOTSafeClassInitializer_signature, "Ljdk/internal/vm/annotation/AOTSafeClassInitializer;")\
739 template(java_util_concurrent_ConcurrentHashMap, "java/util/concurrent/ConcurrentHashMap") \
740 template(java_util_ArrayList, "java/util/ArrayList") \
741 template(jdk_internal_vm_annotation_AOTRuntimeSetup_signature, "Ljdk/internal/vm/annotation/AOTRuntimeSetup;") \
742 template(runtimeSetup, "runtimeSetup") \
743 template(toFileURL_name, "toFileURL") \
744 template(toFileURL_signature, "(Ljava/lang/String;)Ljava/net/URL;") \
745 \
746 /* jcmd Thread.dump_to_file */ \
747 template(jdk_internal_vm_ThreadDumper, "jdk/internal/vm/ThreadDumper") \
748 template(dumpThreads_name, "dumpThreads") \
749 template(dumpThreadsToJson_name, "dumpThreadsToJson") \
750 template(jdk_internal_vm_ThreadSnapshot, "jdk/internal/vm/ThreadSnapshot") \
751 template(jdk_internal_vm_ThreadLock, "jdk/internal/vm/ThreadSnapshot$ThreadLock") \
752 template(jdk_internal_vm_ThreadLock_signature, "Ljdk/internal/vm/ThreadSnapshot$ThreadLock;") \
753 template(jdk_internal_vm_ThreadLock_array, "[Ljdk/internal/vm/ThreadSnapshot$ThreadLock;") \
754 template(java_lang_StackTraceElement_of_name, "of") \
755 template(java_lang_StackTraceElement_of_signature, "([Ljava/lang/StackTraceElement;)[Ljava/lang/StackTraceElement;") \
756 \
757 /* jcmd Thread.vthread_scheduler and Thread.vthread_pollers */ \
758 template(jdk_internal_vm_JcmdVThreadCommands, "jdk/internal/vm/JcmdVThreadCommands") \
759 template(printScheduler_name, "printScheduler") \
760 template(printPollers_name, "printPollers") \
761
762 /*end*/
763
764 // enum for figuring positions and size of Symbol::_vm_symbols[]
765 enum class vmSymbolID : int {
809
810 static constexpr int as_int(vmSymbolID sid) {
811 assert(is_valid_id(sid), "must be");
812 return static_cast<int>(sid);
813 }
814
815 static constexpr int number_of_symbols() {
816 static_assert(NO_SID == 0, "must be a valid array index");
817 static_assert(FIRST_SID == 1, "must not be the same as NO_SID");
818 return SID_LIMIT;
819 }
820
821 enum {
822 log2_SID_LIMIT = 11 // checked by an assert at start-up
823 };
824
825 private:
826
827 // Field signatures indexed by BasicType.
828 static Symbol* _type_signatures[T_VOID+1];
829
830 public:
831 // Initialization
832 static void initialize();
833 // Accessing
834 #define VM_SYMBOL_DECLARE(name, ignore) \
835 static Symbol* name() { \
836 return Symbol::_vm_symbols[static_cast<int>(VM_SYMBOL_ENUM_NAME(name))]; \
837 }
838 VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
839 #undef VM_SYMBOL_DECLARE
840
841 // Sharing support
842 static void symbols_do(SymbolClosure* f);
843 static void metaspace_pointers_do(MetaspaceClosure *it);
844 static void serialize(SerializeClosure* soc);
845
846 static Symbol* type_signature(BasicType t) {
847 assert((uint)t < T_VOID+1, "range check");
848 assert(_type_signatures[t] != nullptr, "domain check");
849 return _type_signatures[t];
850 }
851
852 static Symbol* symbol_at(vmSymbolID id) {
853 return Symbol::vm_symbol_at(id);
854 }
855
856 // Returns symbol's vmSymbolID if one is assigned, else vmSymbolID::NO_SID.
857 static vmSymbolID find_sid(const Symbol* symbol);
858 static vmSymbolID find_sid(const char* symbol_name);
859
860 #ifndef PRODUCT
861 // No need for this in the product:
862 static const char* name_for(vmSymbolID sid);
863 #endif //PRODUCT
864 };
865
866 #endif // SHARE_CLASSFILE_VMSYMBOLS_HPP
|
74 template(java_lang_ClassLoader, "java/lang/ClassLoader") \
75 template(java_lang_Runnable, "java/lang/Runnable") \
76 template(jdk_internal_vm_ContinuationScope, "jdk/internal/vm/ContinuationScope") \
77 template(jdk_internal_vm_StackChunk, "jdk/internal/vm/StackChunk") \
78 template(java_lang_Boolean, "java/lang/Boolean") \
79 template(java_lang_Character, "java/lang/Character") \
80 template(java_lang_Character_CharacterCache, "java/lang/Character$CharacterCache") \
81 template(java_lang_CharacterDataLatin1, "java/lang/CharacterDataLatin1") \
82 template(java_lang_Float, "java/lang/Float") \
83 template(java_lang_Double, "java/lang/Double") \
84 template(java_lang_Byte, "java/lang/Byte") \
85 template(java_lang_Byte_ByteCache, "java/lang/Byte$ByteCache") \
86 template(java_lang_Short, "java/lang/Short") \
87 template(java_lang_Short_ShortCache, "java/lang/Short$ShortCache") \
88 template(java_lang_Integer, "java/lang/Integer") \
89 template(java_lang_Integer_IntegerCache, "java/lang/Integer$IntegerCache") \
90 template(java_lang_Long, "java/lang/Long") \
91 template(java_lang_Long_LongCache, "java/lang/Long$LongCache") \
92 template(java_lang_Void, "java/lang/Void") \
93 \
94 /* Valhalla migrated classes. */ \
95 template(java_lang_Number, "java/lang/Number") \
96 template(java_lang_Record, "java/lang/Record") \
97 template(java_util_Optional, "java/util/Optional") \
98 template(java_util_OptionalInt, "java/util/OptionalInt") \
99 template(java_util_OptionalLong, "java/util/OptionalLong") \
100 template(java_util_OptionalDouble, "java/util/OptionalDouble") \
101 template(java_time_LocalDate, "java/time/LocalDate") \
102 template(java_time_LocalDateTime, "java/time/LocalDateTime") \
103 template(java_time_LocalTime, "java/time/LocalTime") \
104 template(java_time_Duration, "java/time/Duration") \
105 template(java_time_Instant, "java/time/Instant") \
106 template(java_time_MonthDay, "java/time/MonthDay") \
107 template(java_time_ZonedDateTime, "java/time/ZonedDateTime") \
108 template(java_time_OffsetDateTime, "java/time/OffsetDateTime") \
109 template(java_time_OffsetTime, "java/time/OffsetTime") \
110 template(java_time_YearMonth, "java/time/YearMonth") \
111 template(java_time_Year, "java/time/Year") \
112 template(java_time_Period, "java/time/Period") \
113 template(java_time_chrono_ChronoLocalDateImpl, "java/time/chrono/ChronoLocalDateImpl") \
114 template(java_time_chrono_MinguoDate, "java/time/chrono/MinguoDate") \
115 template(java_time_chrono_HijrahDate, "java/time/chrono/HijrahDate") \
116 template(java_time_chrono_JapaneseDate, "java/time/chrono/JapaneseDate") \
117 template(java_time_chrono_ThaiBuddhistDate, "java/time/chrono/ThaiBuddhistDate") \
118 \
119 template(jdk_internal_vm_vector_VectorSupport, "jdk/internal/vm/vector/VectorSupport") \
120 template(jdk_internal_vm_vector_Float16Math, "jdk/internal/vm/vector/Float16Math") \
121 template(jdk_internal_vm_vector_VectorPayload, "jdk/internal/vm/vector/VectorSupport$VectorPayload") \
122 template(jdk_internal_vm_vector_Vector, "jdk/internal/vm/vector/VectorSupport$Vector") \
123 template(jdk_internal_vm_vector_VectorMask, "jdk/internal/vm/vector/VectorSupport$VectorMask") \
124 template(jdk_internal_vm_vector_VectorShuffle, "jdk/internal/vm/vector/VectorSupport$VectorShuffle") \
125 template(payload_name, "payload") \
126 template(ETYPE_name, "ETYPE") \
127 template(VLENGTH_name, "VLENGTH") \
128 \
129 template(jdk_internal_vm_FillerObject, "jdk/internal/vm/FillerObject") \
130 \
131 template(java_lang_Shutdown, "java/lang/Shutdown") \
132 template(java_lang_ref_Reference, "java/lang/ref/Reference") \
133 template(java_lang_ref_SoftReference, "java/lang/ref/SoftReference") \
134 template(java_lang_ref_WeakReference, "java/lang/ref/WeakReference") \
135 template(java_lang_ref_FinalReference, "java/lang/ref/FinalReference") \
136 template(java_lang_ref_PhantomReference, "java/lang/ref/PhantomReference") \
137 template(java_lang_ref_Finalizer, "java/lang/ref/Finalizer") \
138 template(java_lang_reflect_AccessibleObject, "java/lang/reflect/AccessibleObject") \
145 template(java_lang_StringBuffer, "java/lang/StringBuffer") \
146 template(java_lang_StringBuilder, "java/lang/StringBuilder") \
147 template(java_lang_ScopedValue, "java/lang/ScopedValue") \
148 template(java_lang_ScopedValue_Carrier, "java/lang/ScopedValue$Carrier") \
149 template(java_security_CodeSource, "java/security/CodeSource") \
150 template(java_security_ProtectionDomain, "java/security/ProtectionDomain") \
151 template(java_security_SecureClassLoader, "java/security/SecureClassLoader") \
152 template(java_net_URL, "java/net/URL") \
153 template(java_util_jar_Manifest, "java/util/jar/Manifest") \
154 template(java_io_ByteArrayInputStream, "java/io/ByteArrayInputStream") \
155 template(java_io_Serializable, "java/io/Serializable") \
156 template(java_nio_Buffer, "java/nio/Buffer") \
157 template(java_util_Arrays, "java/util/Arrays") \
158 template(java_util_Properties, "java/util/Properties") \
159 template(java_util_DualPivotQuicksort, "java/util/DualPivotQuicksort") \
160 template(jdk_internal_misc_Signal, "jdk/internal/misc/Signal") \
161 template(jdk_internal_util_Preconditions, "jdk/internal/util/Preconditions") \
162 template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
163 template(jdk_internal_vm_PostVMInitHook, "jdk/internal/vm/PostVMInitHook") \
164 template(java_util_Iterator, "java/util/Iterator") \
165 template(sun_instrument_InstrumentationImpl, "sun/instrument/InstrumentationImpl") \
166 template(sun_invoke_util_ValueConversions, "sun/invoke/util/ValueConversions") \
167 \
168 template(jdk_internal_loader_NativeLibraries, "jdk/internal/loader/NativeLibraries") \
169 template(jdk_internal_loader_BuiltinClassLoader, "jdk/internal/loader/BuiltinClassLoader") \
170 template(jdk_internal_loader_ClassLoaders_AppClassLoader, "jdk/internal/loader/ClassLoaders$AppClassLoader") \
171 template(jdk_internal_loader_ClassLoaders_PlatformClassLoader, "jdk/internal/loader/ClassLoaders$PlatformClassLoader") \
172 template(java_lang_Deprecated, "Ljava/lang/Deprecated;") \
173 template(since, "since") \
174 template(for_removal, "forRemoval") \
175 /* Java runtime version access */ \
176 template(java_lang_VersionProps, "java/lang/VersionProps") \
177 template(java_version_name, "java_version") \
178 template(java_runtime_name_name, "java_runtime_name") \
179 template(java_runtime_version_name, "java_runtime_version") \
180 template(java_runtime_vendor_version_name, "VENDOR_VERSION") \
181 template(java_runtime_vendor_vm_bug_url_name, "VENDOR_URL_VM_BUG") \
182 \
183 /* system initialization */ \
184 template(initPhase1_name, "initPhase1") \
185 template(initPhase2_name, "initPhase2") \
186 template(initPhase3_name, "initPhase3") \
187 template(java_lang_module_init_signature, "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
188 \
189 /* class file format tags */ \
190 template(tag_source_file, "SourceFile") \
191 template(tag_inner_classes, "InnerClasses") \
192 template(tag_nest_members, "NestMembers") \
193 template(tag_nest_host, "NestHost") \
194 template(tag_loadable_descriptors, "LoadableDescriptors") \
195 template(tag_constant_value, "ConstantValue") \
196 template(tag_code, "Code") \
197 template(tag_exceptions, "Exceptions") \
198 template(tag_line_number_table, "LineNumberTable") \
199 template(tag_local_variable_table, "LocalVariableTable") \
200 template(tag_local_variable_type_table, "LocalVariableTypeTable") \
201 template(tag_method_parameters, "MethodParameters") \
202 template(tag_stack_map_table, "StackMapTable") \
203 template(tag_synthetic, "Synthetic") \
204 template(tag_deprecated, "Deprecated") \
205 template(tag_source_debug_extension, "SourceDebugExtension") \
206 template(tag_signature, "Signature") \
207 template(tag_record, "Record") \
208 template(tag_runtime_visible_annotations, "RuntimeVisibleAnnotations") \
209 template(tag_runtime_invisible_annotations, "RuntimeInvisibleAnnotations") \
210 template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations") \
211 template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations") \
212 template(tag_annotation_default, "AnnotationDefault") \
213 template(tag_runtime_visible_type_annotations, "RuntimeVisibleTypeAnnotations") \
214 template(tag_runtime_invisible_type_annotations, "RuntimeInvisibleTypeAnnotations") \
215 template(tag_enclosing_method, "EnclosingMethod") \
216 template(tag_bootstrap_methods, "BootstrapMethods") \
217 template(tag_permitted_subclasses, "PermittedSubclasses") \
218 \
219 /* exception klasses: at least all exceptions thrown by the VM have entries here */ \
220 template(java_lang_ArithmeticException, "java/lang/ArithmeticException") \
221 template(java_lang_ArrayIndexOutOfBoundsException, "java/lang/ArrayIndexOutOfBoundsException") \
222 template(java_lang_ArrayStoreException, "java/lang/ArrayStoreException") \
223 template(java_lang_ClassCastException, "java/lang/ClassCastException") \
224 template(java_lang_ClassNotFoundException, "java/lang/ClassNotFoundException") \
225 template(java_lang_CloneNotSupportedException, "java/lang/CloneNotSupportedException") \
226 template(java_lang_IllegalAccessException, "java/lang/IllegalAccessException") \
227 template(java_lang_IllegalArgumentException, "java/lang/IllegalArgumentException") \
228 template(java_lang_IllegalCallerException, "java/lang/IllegalCallerException") \
229 template(java_lang_IllegalStateException, "java/lang/IllegalStateException") \
230 template(java_lang_IllegalMonitorStateException, "java/lang/IllegalMonitorStateException") \
231 template(java_lang_IdentityException, "java/lang/IdentityException") \
232 template(java_lang_IllegalThreadStateException, "java/lang/IllegalThreadStateException") \
233 template(java_lang_IndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException") \
234 template(java_lang_InstantiationException, "java/lang/InstantiationException") \
235 template(java_lang_InstantiationError, "java/lang/InstantiationError") \
236 template(java_lang_InterruptedException, "java/lang/InterruptedException") \
237 template(java_lang_BootstrapMethodError, "java/lang/BootstrapMethodError") \
238 template(java_lang_LinkageError, "java/lang/LinkageError") \
239 template(java_lang_NegativeArraySizeException, "java/lang/NegativeArraySizeException") \
240 template(java_lang_NoSuchMethodException, "java/lang/NoSuchMethodException") \
241 template(java_lang_NullPointerException, "java/lang/NullPointerException") \
242 template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\
243 template(java_lang_UnsupportedOperationException, "java/lang/UnsupportedOperationException") \
244 template(java_lang_InvalidClassException, "java/lang/InvalidClassException") \
245 template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \
246 template(java_lang_Exception, "java/lang/Exception") \
247 template(java_lang_RuntimeException, "java/lang/RuntimeException") \
248 template(java_io_IOException, "java/io/IOException") \
249 template(jdk_internal_vm_PreemptedException, "jdk/internal/vm/PreemptedException") \
250 \
251 /* error klasses: at least all errors thrown by the VM have entries here */ \
260 template(java_lang_InternalError, "java/lang/InternalError") \
261 template(java_lang_NoClassDefFoundError, "java/lang/NoClassDefFoundError") \
262 template(java_lang_NoSuchFieldError, "java/lang/NoSuchFieldError") \
263 template(java_lang_NoSuchMethodError, "java/lang/NoSuchMethodError") \
264 template(java_lang_OutOfMemoryError, "java/lang/OutOfMemoryError") \
265 template(java_lang_UnsatisfiedLinkError, "java/lang/UnsatisfiedLinkError") \
266 template(java_lang_VerifyError, "java/lang/VerifyError") \
267 template(java_lang_SecurityException, "java/lang/SecurityException") \
268 template(java_lang_VirtualMachineError, "java/lang/VirtualMachineError") \
269 template(java_lang_StackOverflowError, "java/lang/StackOverflowError") \
270 template(java_lang_StackTraceElement, "java/lang/StackTraceElement") \
271 \
272 /* Concurrency support */ \
273 template(java_util_concurrent_locks_AbstractOwnableSynchronizer, "java/util/concurrent/locks/AbstractOwnableSynchronizer") \
274 template(java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl, "java/util/concurrent/atomic/AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl") \
275 template(java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$CASUpdater") \
276 template(java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$LockedUpdater") \
277 template(java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl, "java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl") \
278 template(jdk_internal_vm_annotation_Contended_signature, "Ljdk/internal/vm/annotation/Contended;") \
279 template(jdk_internal_vm_annotation_ReservedStackAccess_signature, "Ljdk/internal/vm/annotation/ReservedStackAccess;") \
280 template(jdk_internal_vm_annotation_LooselyConsistentValue_signature, "Ljdk/internal/vm/annotation/LooselyConsistentValue;") \
281 template(jdk_internal_vm_annotation_NullRestricted_signature, "Ljdk/internal/vm/annotation/NullRestricted;") \
282 template(jdk_internal_ValueBased_signature, "Ljdk/internal/ValueBased;") \
283 \
284 /* class symbols needed by intrinsics */ \
285 VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
286 \
287 /* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */ \
288 \
289 template(jdk_internal_reflect, "jdk/internal/reflect") \
290 template(reflect_MethodAccessorImpl, "jdk/internal/reflect/MethodAccessorImpl") \
291 template(reflect_Reflection, "jdk/internal/reflect/Reflection") \
292 template(reflect_CallerSensitive, "jdk/internal/reflect/CallerSensitive") \
293 template(reflect_CallerSensitive_signature, "Ljdk/internal/reflect/CallerSensitive;") \
294 template(reflect_DirectConstructorHandleAccessor_NativeAccessor, "jdk/internal/reflect/DirectConstructorHandleAccessor$NativeAccessor") \
295 template(clazz_name, "clazz") \
296 template(exceptionTypes_name, "exceptionTypes") \
297 template(modifiers_name, "modifiers") \
298 template(invokeBasic_name, "invokeBasic") \
299 template(linkToVirtual_name, "linkToVirtual") \
300 template(linkToStatic_name, "linkToStatic") \
301 template(linkToSpecial_name, "linkToSpecial") \
302 template(linkToInterface_name, "linkToInterface") \
303 template(linkToNative_name, "linkToNative") \
304 template(compiledLambdaForm_name, "<compiledLambdaForm>") /*fake name*/ \
305 template(star_name, "*") /*not really a name*/ \
306 template(invoke_name, "invoke") \
307 template(parameterTypes_name, "parameterTypes") \
308 template(returnType_name, "returnType") \
309 template(signature_name, "signature") \
310 template(slot_name, "slot") \
311 template(blackhole_name, "<blackhole>") /*fake name*/ \
312 \
313 /* Support for annotations (JDK 1.5 and above) */ \
314 \
315 template(annotations_name, "annotations") \
316 template(index_name, "index") \
317 template(executable_name, "executable") \
318 template(parameter_annotations_name, "parameterAnnotations") \
319 template(annotation_default_name, "annotationDefault") \
320 template(reflect_ConstantPool, "jdk/internal/reflect/ConstantPool") \
321 template(base_name, "base") \
322 /* Type Annotations (JDK 8 and above) */ \
323 template(type_annotations_name, "typeAnnotations") \
324 \
325 /* Intrinsic Annotation (JDK 9 and above) */ \
326 template(jdk_internal_vm_annotation_DontInline_signature, "Ljdk/internal/vm/annotation/DontInline;") \
327 template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \
328 template(jdk_internal_vm_annotation_Hidden_signature, "Ljdk/internal/vm/annotation/Hidden;") \
329 template(jdk_internal_misc_Scoped_signature, "Ljdk/internal/misc/ScopedMemoryAccess$Scoped;") \
330 template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \
512 template(input_stream_void_signature, "(Ljava/io/InputStream;)V") \
513 template(input_stream_signature, "Ljava/io/InputStream;") \
514 template(print_stream_signature, "Ljava/io/PrintStream;") \
515 template(defineOrCheckPackage_name, "defineOrCheckPackage") \
516 template(defineOrCheckPackage_signature, "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
517 template(getProtectionDomain_name, "getProtectionDomain") \
518 template(getProtectionDomain_signature, "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
519 template(java_lang_Integer_array_signature, "[Ljava/lang/Integer;") \
520 template(java_lang_Long_array_signature, "[Ljava/lang/Long;") \
521 template(java_lang_Character_array_signature, "[Ljava/lang/Character;") \
522 template(java_lang_Short_array_signature, "[Ljava/lang/Short;") \
523 template(java_lang_Byte_array_signature, "[Ljava/lang/Byte;") \
524 template(java_lang_Boolean_signature, "Ljava/lang/Boolean;") \
525 template(url_code_signer_array_void_signature, "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
526 template(jvmti_thread_state_name, "jvmti_thread_state") \
527 template(jvmti_VTMS_transition_disable_count_name, "jvmti_VTMS_transition_disable_count") \
528 template(jvmti_is_in_VTMS_transition_name, "jvmti_is_in_VTMS_transition") \
529 template(module_entry_name, "module_entry") \
530 template(resolved_references_name, "<resolved_references>") \
531 template(init_lock_name, "<init_lock>") \
532 template(null_reset_value_name, ".null_reset") \
533 template(acmp_maps_name, ".acmp_maps") \
534 template(empty_marker_name, ".empty") \
535 template(address_size_name, "ADDRESS_SIZE0") \
536 template(page_size_name, "PAGE_SIZE") \
537 template(big_endian_name, "BIG_ENDIAN") \
538 template(use_unaligned_access_name, "UNALIGNED_ACCESS") \
539 template(data_cache_line_flush_size_name, "DATA_CACHE_LINE_FLUSH_SIZE") \
540 template(during_unsafe_access_name, "during_unsafe_access") \
541 template(checkIndex_name, "checkIndex") \
542 template(jfr_epoch_name, "jfr_epoch") \
543 template(maxThawingSize_name, "maxThawingSize") \
544 template(lockStackSize_name, "lockStackSize") \
545 template(objectWaiter_name, "objectWaiter") \
546 template(atKlassInit_name, "atKlassInit") \
547 template(hasArgsAtTop_name, "hasArgsAtTop") \
548 \
549 /* name symbols needed by intrinsics */ \
550 VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
551 \
552 /* common signatures names */ \
553 template(void_method_signature, "()V") \
554 template(void_boolean_signature, "()Z") \
591 template(int_array_signature, "[I") \
592 template(runnable_signature, "Ljava/lang/Runnable;") \
593 template(continuation_signature, "Ljdk/internal/vm/Continuation;") \
594 template(continuationscope_signature, "Ljdk/internal/vm/ContinuationScope;") \
595 template(stackchunk_signature, "Ljdk/internal/vm/StackChunk;") \
596 template(vthread_signature, "Ljava/lang/VirtualThread;") \
597 template(object_void_signature, "(Ljava/lang/Object;)V") \
598 template(object_int_signature, "(Ljava/lang/Object;)I") \
599 template(long_object_long_signature, "(JLjava/lang/Object;)J") \
600 template(object_boolean_signature, "(Ljava/lang/Object;)Z") \
601 template(object_object_signature, "(Ljava/lang/Object;)Ljava/lang/Object;") \
602 template(string_void_signature, "(Ljava/lang/String;)V") \
603 template(string_bool_byte_array_signature, "(Ljava/lang/String;Z)[B") \
604 template(throwable_signature, "Ljava/lang/Throwable;") \
605 template(throwable_void_signature, "(Ljava/lang/Throwable;)V") \
606 template(void_throwable_signature, "()Ljava/lang/Throwable;") \
607 template(class_void_signature, "(Ljava/lang/Class;)V") \
608 template(class_int_signature, "(Ljava/lang/Class;)I") \
609 template(class_long_signature, "(Ljava/lang/Class;)J") \
610 template(class_boolean_signature, "(Ljava/lang/Class;)Z") \
611 template(class_class_signature, "(Ljava/lang/Class;)Ljava/lang/Class;") \
612 template(throwable_throwable_signature, "(Ljava/lang/Throwable;)Ljava/lang/Throwable;") \
613 template(thread_void_signature, "(Ljava/lang/Thread;)V") \
614 template(runnable_void_signature, "(Ljava/lang/Runnable;)V") \
615 template(threadgroup_runnable_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V") \
616 template(threadgroup_string_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V") \
617 template(void_threadgroup_array_signature, "()[Ljava/lang/ThreadGroup;") \
618 template(string_class_signature, "(Ljava/lang/String;)Ljava/lang/Class;") \
619 template(string_boolean_class_signature, "(Ljava/lang/String;Z)Ljava/lang/Class;") \
620 template(object_object_object_signature, "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
621 template(object_object_boolean_signature, "(Ljava/lang/Object;Ljava/lang/Object;)Z") \
622 template(string_string_signature, "(Ljava/lang/String;)Ljava/lang/String;") \
623 template(classloader_class_string_string_long_signature, "(Ljava/lang/ClassLoader;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)J") \
624 template(byte_array_void_signature, "([B)V") \
625 template(long_long_void_signature, "(JJ)V") \
626 template(void_byte_array_signature, "()[B") \
627 template(void_classloader_signature, "()Ljava/lang/ClassLoader;") \
628 template(void_BuiltinClassLoader_signature, "()Ljdk/internal/loader/BuiltinClassLoader;") \
629 template(void_object_signature, "()Ljava/lang/Object;") \
630 template(void_class_signature, "()Ljava/lang/Class;") \
631 template(void_class_array_signature, "()[Ljava/lang/Class;") \
632 template(void_string_signature, "()Ljava/lang/String;") \
633 template(object_array_object_signature, "([Ljava/lang/Object;)Ljava/lang/Object;") \
634 template(object_object_array_object_signature, "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
635 template(thread_signature, "Ljava/lang/Thread;") \
636 template(thread_fieldholder_signature, "Ljava/lang/Thread$FieldHolder;") \
637 template(threadgroup_signature, "Ljava/lang/ThreadGroup;") \
638 template(threadgroup_array_signature, "[Ljava/lang/ThreadGroup;") \
639 template(class_array_signature, "[Ljava/lang/Class;") \
640 template(classloader_signature, "Ljava/lang/ClassLoader;") \
641 template(object_signature, "Ljava/lang/Object;") \
729 template(addUses_signature, "(Ljava/lang/Module;Ljava/lang/Class;)V") \
730 template(addProvides_name, "addProvides") \
731 template(addProvides_signature, "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
732 template(loadModule_name, "loadModule") \
733 template(loadModule_signature, "(Ljava/lang/String;)Ljava/lang/Module;") \
734 template(transformedByAgent_name, "transformedByAgent") \
735 template(transformedByAgent_signature, "(Ljava/lang/Module;)V") \
736 template(appendToClassPathForInstrumentation_name, "appendToClassPathForInstrumentation") \
737 do_alias(appendToClassPathForInstrumentation_signature, string_void_signature) \
738 template(serializePropertiesToByteArray_name, "serializePropertiesToByteArray") \
739 template(serializeAgentPropertiesToByteArray_name, "serializeAgentPropertiesToByteArray") \
740 template(encodeThrowable_name, "encodeThrowable") \
741 template(encodeThrowable_signature, "(Ljava/lang/Throwable;JI)I") \
742 template(decodeAndThrowThrowable_name, "decodeAndThrowThrowable") \
743 template(encodeAnnotations_name, "encodeAnnotations") \
744 template(encodeAnnotations_signature, "([BLjava/lang/Class;Ljdk/internal/reflect/ConstantPool;Z[Ljava/lang/Class;)[B")\
745 template(decodeAndThrowThrowable_signature, "(IJZZ)V") \
746 template(classRedefinedCount_name, "classRedefinedCount") \
747 template(classLoader_name, "classLoader") \
748 template(componentType_name, "componentType") \
749 template(primaryType_name, "primaryType") \
750 template(secondaryType_name, "secondaryType") \
751 \
752 /* forEachRemaining support */ \
753 template(java_util_stream_StreamsRangeIntSpliterator, "java/util/stream/Streams$RangeIntSpliterator") \
754 \
755 /* jfr signatures */ \
756 JFR_TEMPLATES(template) \
757 \
758 /* CDS */ \
759 template(dumpSharedArchive, "dumpSharedArchive") \
760 template(dumpSharedArchive_signature, "(ZLjava/lang/String;)Ljava/lang/String;") \
761 template(generateLambdaFormHolderClasses, "generateLambdaFormHolderClasses") \
762 template(generateLambdaFormHolderClasses_signature, "([Ljava/lang/String;)[Ljava/lang/Object;") \
763 template(getResourceAsByteArray_name, "getResourceAsByteArray") \
764 template(getResourceAsByteArray_signature, "(Ljava/lang/String;)[B") \
765 template(java_lang_Enum, "java/lang/Enum") \
766 template(java_lang_invoke_Invokers_Holder, "java/lang/invoke/Invokers$Holder") \
767 template(java_lang_invoke_DirectMethodHandle_Holder, "java/lang/invoke/DirectMethodHandle$Holder") \
768 template(java_lang_invoke_LambdaForm_Holder, "java/lang/invoke/LambdaForm$Holder") \
769 template(java_lang_invoke_DelegatingMethodHandle_Holder, "java/lang/invoke/DelegatingMethodHandle$Holder") \
770 template(jdk_internal_loader_ClassLoaders, "jdk/internal/loader/ClassLoaders") \
771 template(jdk_internal_misc_CDS, "jdk/internal/misc/CDS") \
772 template(jdk_internal_vm_annotation_AOTSafeClassInitializer_signature, "Ljdk/internal/vm/annotation/AOTSafeClassInitializer;")\
773 template(java_util_concurrent_ConcurrentHashMap, "java/util/concurrent/ConcurrentHashMap") \
774 template(java_util_ArrayList, "java/util/ArrayList") \
775 template(jdk_internal_vm_annotation_AOTRuntimeSetup_signature, "Ljdk/internal/vm/annotation/AOTRuntimeSetup;") \
776 template(runtimeSetup, "runtimeSetup") \
777 template(toFileURL_name, "toFileURL") \
778 template(toFileURL_signature, "(Ljava/lang/String;)Ljava/net/URL;") \
779 \
780 template(java_lang_runtime_ValueObjectMethods, "java/lang/runtime/ValueObjectMethods") \
781 template(isSubstitutable_name, "isSubstitutable") \
782 template(isSubstitutableAlt_name, "isSubstitutableAlt") \
783 template(valueObjectHashCode_name, "valueObjectHashCode") \
784 template(valueObjectHashCodeAlt_name, "valueObjectHashCodeAlt") \
785 template(jdk_internal_value_PrimitiveClass, "jdk/internal/value/PrimitiveClass") \
786 template(jdk_internal_value_ValueClass, "jdk/internal/value/ValueClass") \
787 \
788 /* jcmd Thread.dump_to_file */ \
789 template(jdk_internal_vm_ThreadDumper, "jdk/internal/vm/ThreadDumper") \
790 template(dumpThreads_name, "dumpThreads") \
791 template(dumpThreadsToJson_name, "dumpThreadsToJson") \
792 template(jdk_internal_vm_ThreadSnapshot, "jdk/internal/vm/ThreadSnapshot") \
793 template(jdk_internal_vm_ThreadLock, "jdk/internal/vm/ThreadSnapshot$ThreadLock") \
794 template(jdk_internal_vm_ThreadLock_signature, "Ljdk/internal/vm/ThreadSnapshot$ThreadLock;") \
795 template(jdk_internal_vm_ThreadLock_array, "[Ljdk/internal/vm/ThreadSnapshot$ThreadLock;") \
796 template(java_lang_StackTraceElement_of_name, "of") \
797 template(java_lang_StackTraceElement_of_signature, "([Ljava/lang/StackTraceElement;)[Ljava/lang/StackTraceElement;") \
798 \
799 /* jcmd Thread.vthread_scheduler and Thread.vthread_pollers */ \
800 template(jdk_internal_vm_JcmdVThreadCommands, "jdk/internal/vm/JcmdVThreadCommands") \
801 template(printScheduler_name, "printScheduler") \
802 template(printPollers_name, "printPollers") \
803
804 /*end*/
805
806 // enum for figuring positions and size of Symbol::_vm_symbols[]
807 enum class vmSymbolID : int {
851
852 static constexpr int as_int(vmSymbolID sid) {
853 assert(is_valid_id(sid), "must be");
854 return static_cast<int>(sid);
855 }
856
857 static constexpr int number_of_symbols() {
858 static_assert(NO_SID == 0, "must be a valid array index");
859 static_assert(FIRST_SID == 1, "must not be the same as NO_SID");
860 return SID_LIMIT;
861 }
862
863 enum {
864 log2_SID_LIMIT = 11 // checked by an assert at start-up
865 };
866
867 private:
868
869 // Field signatures indexed by BasicType.
870 static Symbol* _type_signatures[T_VOID+1];
871 static void initialize_migrated_class_names();
872
873 static const int _migrated_class_names_length = 31;
874 static Symbol* _migrated_class_names[_migrated_class_names_length];
875
876 public:
877 // Initialization
878 static void initialize();
879 // Accessing
880 #define VM_SYMBOL_DECLARE(name, ignore) \
881 static Symbol* name() { \
882 return Symbol::_vm_symbols[static_cast<int>(VM_SYMBOL_ENUM_NAME(name))]; \
883 }
884 VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
885 #undef VM_SYMBOL_DECLARE
886
887 // Sharing support
888 static void symbols_do(SymbolClosure* f);
889 static void metaspace_pointers_do(MetaspaceClosure *it);
890 static void serialize(SerializeClosure* soc);
891
892 static Symbol* type_signature(BasicType t) {
893 assert((uint)t < T_VOID+1, "range check");
894 assert(_type_signatures[t] != nullptr, "domain check");
895 return _type_signatures[t];
896 }
897
898 static Symbol* symbol_at(vmSymbolID id) {
899 return Symbol::vm_symbol_at(id);
900 }
901
902 // Returns symbol's vmSymbolID if one is assigned, else vmSymbolID::NO_SID.
903 static vmSymbolID find_sid(const Symbol* symbol);
904 static vmSymbolID find_sid(const char* symbol_name);
905
906 #ifndef PRODUCT
907 // No need for this in the product:
908 static const char* name_for(vmSymbolID sid);
909 #endif //PRODUCT
910
911 template<typename Function>
912 static void migrated_class_names_do(Function f) {
913 for (int i = 0; i < _migrated_class_names_length; i++) {
914 f(_migrated_class_names[i]);
915 }
916 }
917 };
918
919 #endif // SHARE_CLASSFILE_VMSYMBOLS_HPP
|