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