1 /*
  2  * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_CLASSFILE_VMSYMBOLS_HPP
 26 #define SHARE_CLASSFILE_VMSYMBOLS_HPP
 27 
 28 #include "classfile/vmIntrinsics.hpp"
 29 #include "jvmci/vmSymbols_jvmci.hpp"
 30 #include "memory/iterator.hpp"
 31 #include "oops/symbol.hpp"
 32 #include "utilities/macros.hpp"
 33 #include "utilities/enumIterator.hpp"
 34 
 35 // The class vmSymbols is a name space for fast lookup of
 36 // symbols commonly used in the VM.
 37 //
 38 // Sample usage:
 39 //
 40 //   Symbol* obj       = vmSymbols::java_lang_Object();
 41 
 42 
 43 // Useful sub-macros exported by this header file:
 44 
 45 #define VM_SYMBOL_ENUM_NAME_(name)    name##_enum
 46 #define VM_SYMBOL_ENUM_NAME(name)    vmSymbolID::VM_SYMBOL_ENUM_NAME_(name)
 47 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/
 48 #define VM_SYMBOL_IGNORE(id, name)                       /*ignored*/
 49 #define VM_ALIAS_IGNORE(id, id2)                         /*ignored*/
 50 
 51 // Mapping function names to values. New entries should be added below.
 52 
 53 #define VM_SYMBOLS_DO(template, do_alias)                                                         \
 54   /* commonly used class, package, module names */                                                \
 55   template(java_base,                                 "java.base")                                \
 56   template(java_lang_System,                          "java/lang/System")                         \
 57   template(java_lang_Object,                          "java/lang/Object")                         \
 58   template(java_lang_Class,                           "java/lang/Class")                          \
 59   template(java_lang_Package,                         "java/lang/Package")                        \
 60   template(java_lang_Module,                          "java/lang/Module")                         \
 61   template(java_lang_String,                          "java/lang/String")                         \
 62   template(java_lang_StringLatin1,                    "java/lang/StringLatin1")                   \
 63   template(java_lang_StringUTF16,                     "java/lang/StringUTF16")                    \
 64   template(java_lang_Thread,                          "java/lang/Thread")                         \
 65   template(java_lang_Thread_FieldHolder,              "java/lang/Thread$FieldHolder")             \
 66   template(java_lang_Thread_VirtualThreads,           "java/lang/Thread$VirtualThreads")          \
 67   template(java_lang_Thread_ClassLoaders,             "java/lang/Thread$ClassLoaders")            \
 68   template(java_lang_ThreadGroup,                     "java/lang/ThreadGroup")                    \
 69   template(java_lang_VirtualThread,                   "java/lang/VirtualThread")                  \
 70   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
 71   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
 72   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
 73   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \
 74   template(java_lang_Runnable,                        "java/lang/Runnable")                       \
 75   /*template(jdk_internal_vm_Continuation,            "jdk/internal/vm/Continuation")           */\
 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                                                                                                   \
 93   template(jdk_internal_vm_vector_VectorSupport,      "jdk/internal/vm/vector/VectorSupport")               \
 94   template(jdk_internal_vm_vector_VectorPayload,      "jdk/internal/vm/vector/VectorSupport$VectorPayload") \
 95   template(jdk_internal_vm_vector_Vector,             "jdk/internal/vm/vector/VectorSupport$Vector")        \
 96   template(jdk_internal_vm_vector_VectorMask,         "jdk/internal/vm/vector/VectorSupport$VectorMask")    \
 97   template(jdk_internal_vm_vector_VectorShuffle,      "jdk/internal/vm/vector/VectorSupport$VectorShuffle") \
 98   template(payload_name,                              "payload")                                            \
 99   template(ETYPE_name,                                "ETYPE")                                              \
100   template(VLENGTH_name,                              "VLENGTH")                                            \
101                                                                                                   \
102   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
103   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
104   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
105   template(java_lang_ref_WeakReference,               "java/lang/ref/WeakReference")              \
106   template(java_lang_ref_FinalReference,              "java/lang/ref/FinalReference")             \
107   template(java_lang_ref_PhantomReference,            "java/lang/ref/PhantomReference")           \
108   template(java_lang_ref_Finalizer,                   "java/lang/ref/Finalizer")                  \
109   template(java_lang_reflect_AccessibleObject,        "java/lang/reflect/AccessibleObject")       \
110   template(java_lang_reflect_Method,                  "java/lang/reflect/Method")                 \
111   template(java_lang_reflect_Constructor,             "java/lang/reflect/Constructor")            \
112   template(java_lang_reflect_Field,                   "java/lang/reflect/Field")                  \
113   template(java_lang_reflect_Parameter,               "java/lang/reflect/Parameter")              \
114   template(java_lang_reflect_Array,                   "java/lang/reflect/Array")                  \
115   template(java_lang_reflect_RecordComponent,         "java/lang/reflect/RecordComponent")        \
116   template(java_lang_StringBuffer,                    "java/lang/StringBuffer")                   \
117   template(java_lang_StringBuilder,                   "java/lang/StringBuilder")                  \
118   template(java_lang_CharSequence,                    "java/lang/CharSequence")                   \
119   template(java_lang_SecurityManager,                 "java/lang/SecurityManager")                \
120   template(java_security_AccessControlContext,        "java/security/AccessControlContext")       \
121   template(java_security_AccessController,            "java/security/AccessController")           \
122   template(executePrivileged_name,                    "executePrivileged")                        \
123   template(java_security_CodeSource,                  "java/security/CodeSource")                 \
124   template(java_security_ProtectionDomain,            "java/security/ProtectionDomain")           \
125   template(java_security_SecureClassLoader,           "java/security/SecureClassLoader")          \
126   template(java_net_URL,                              "java/net/URL")                             \
127   template(java_net_URLClassLoader,                   "java/net/URLClassLoader")                  \
128   template(java_util_jar_Manifest,                    "java/util/jar/Manifest")                   \
129   template(java_io_OutputStream,                      "java/io/OutputStream")                     \
130   template(java_io_Reader,                            "java/io/Reader")                           \
131   template(java_io_BufferedReader,                    "java/io/BufferedReader")                   \
132   template(java_io_File,                              "java/io/File")                             \
133   template(java_io_FileInputStream,                   "java/io/FileInputStream")                  \
134   template(java_io_ByteArrayInputStream,              "java/io/ByteArrayInputStream")             \
135   template(java_io_Serializable,                      "java/io/Serializable")                     \
136   template(java_nio_Buffer,                           "java/nio/Buffer")                          \
137   template(java_util_Arrays,                          "java/util/Arrays")                         \
138   template(java_util_Objects,                         "java/util/Objects")                        \
139   template(java_util_Properties,                      "java/util/Properties")                     \
140   template(java_util_Vector,                          "java/util/Vector")                         \
141   template(java_util_AbstractList,                    "java/util/AbstractList")                   \
142   template(java_util_Hashtable,                       "java/util/Hashtable")                      \
143   template(java_lang_Compiler,                        "java/lang/Compiler")                       \
144   template(jdk_internal_misc_Signal,                  "jdk/internal/misc/Signal")                 \
145   template(jdk_internal_util_Preconditions,           "jdk/internal/util/Preconditions")          \
146   template(java_lang_AssertionStatusDirectives,       "java/lang/AssertionStatusDirectives")      \
147   template(getBootClassPathEntryForClass_name,        "getBootClassPathEntryForClass")            \
148   template(jdk_internal_vm_PostVMInitHook,            "jdk/internal/vm/PostVMInitHook")           \
149   template(sun_net_www_ParseUtil,                     "sun/net/www/ParseUtil")                    \
150   template(java_util_Iterator,                        "java/util/Iterator")                       \
151   template(java_lang_Record,                          "java/lang/Record")                         \
152   template(sun_instrument_InstrumentationImpl,        "sun/instrument/InstrumentationImpl")       \
153                                                                                                   \
154   template(jdk_internal_loader_NativeLibraries,       "jdk/internal/loader/NativeLibraries")      \
155   template(jdk_internal_loader_BuiltinClassLoader,    "jdk/internal/loader/BuiltinClassLoader")   \
156   template(jdk_internal_loader_ClassLoaders_AppClassLoader,      "jdk/internal/loader/ClassLoaders$AppClassLoader")      \
157   template(jdk_internal_loader_ClassLoaders_PlatformClassLoader, "jdk/internal/loader/ClassLoaders$PlatformClassLoader") \
158                                                                                                   \
159   /* Java runtime version access */                                                               \
160   template(java_lang_VersionProps,                    "java/lang/VersionProps")                   \
161   template(java_version_name,                         "java_version")                             \
162   template(java_runtime_name_name,                    "java_runtime_name")                        \
163   template(java_runtime_version_name,                 "java_runtime_version")                     \
164   template(java_runtime_vendor_version_name,          "VENDOR_VERSION")                           \
165   template(java_runtime_vendor_vm_bug_url_name,       "VENDOR_URL_VM_BUG")                        \
166                                                                                                   \
167   /* system initialization */                                                                     \
168   template(initPhase1_name,                           "initPhase1")                               \
169   template(initPhase2_name,                           "initPhase2")                               \
170   template(initPhase3_name,                           "initPhase3")                               \
171   template(java_lang_module_init_signature,           "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
172                                                                                                   \
173   /* class file format tags */                                                                    \
174   template(tag_source_file,                           "SourceFile")                               \
175   template(tag_inner_classes,                         "InnerClasses")                             \
176   template(tag_nest_members,                          "NestMembers")                              \
177   template(tag_nest_host,                             "NestHost")                                 \
178   template(tag_constant_value,                        "ConstantValue")                            \
179   template(tag_code,                                  "Code")                                     \
180   template(tag_exceptions,                            "Exceptions")                               \
181   template(tag_line_number_table,                     "LineNumberTable")                          \
182   template(tag_local_variable_table,                  "LocalVariableTable")                       \
183   template(tag_local_variable_type_table,             "LocalVariableTypeTable")                   \
184   template(tag_method_parameters,                     "MethodParameters")                         \
185   template(tag_stack_map_table,                       "StackMapTable")                            \
186   template(tag_synthetic,                             "Synthetic")                                \
187   template(tag_deprecated,                            "Deprecated")                               \
188   template(tag_source_debug_extension,                "SourceDebugExtension")                     \
189   template(tag_signature,                             "Signature")                                \
190   template(tag_record,                                "Record")                                   \
191   template(tag_runtime_visible_annotations,           "RuntimeVisibleAnnotations")                \
192   template(tag_runtime_invisible_annotations,         "RuntimeInvisibleAnnotations")              \
193   template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations")       \
194   template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations")    \
195   template(tag_annotation_default,                    "AnnotationDefault")                        \
196   template(tag_runtime_visible_type_annotations,      "RuntimeVisibleTypeAnnotations")            \
197   template(tag_runtime_invisible_type_annotations,    "RuntimeInvisibleTypeAnnotations")          \
198   template(tag_enclosing_method,                      "EnclosingMethod")                          \
199   template(tag_bootstrap_methods,                     "BootstrapMethods")                         \
200   template(tag_permitted_subclasses,                  "PermittedSubclasses")                      \
201                                                                                                   \
202   /* exception klasses: at least all exceptions thrown by the VM have entries here */             \
203   template(java_lang_ArithmeticException,             "java/lang/ArithmeticException")            \
204   template(java_lang_ArrayIndexOutOfBoundsException,  "java/lang/ArrayIndexOutOfBoundsException") \
205   template(java_lang_ArrayStoreException,             "java/lang/ArrayStoreException")            \
206   template(java_lang_ClassCastException,              "java/lang/ClassCastException")             \
207   template(java_lang_ClassNotFoundException,          "java/lang/ClassNotFoundException")         \
208   template(java_lang_CloneNotSupportedException,      "java/lang/CloneNotSupportedException")     \
209   template(java_lang_IllegalAccessException,          "java/lang/IllegalAccessException")         \
210   template(java_lang_IllegalArgumentException,        "java/lang/IllegalArgumentException")       \
211   template(java_lang_IllegalStateException,           "java/lang/IllegalStateException")          \
212   template(java_lang_IllegalMonitorStateException,    "java/lang/IllegalMonitorStateException")   \
213   template(java_lang_IllegalThreadStateException,     "java/lang/IllegalThreadStateException")    \
214   template(java_lang_IndexOutOfBoundsException,       "java/lang/IndexOutOfBoundsException")      \
215   template(java_lang_InstantiationException,          "java/lang/InstantiationException")         \
216   template(java_lang_InstantiationError,              "java/lang/InstantiationError")             \
217   template(java_lang_InterruptedException,            "java/lang/InterruptedException")           \
218   template(java_lang_BootstrapMethodError,            "java/lang/BootstrapMethodError")           \
219   template(java_lang_LinkageError,                    "java/lang/LinkageError")                   \
220   template(java_lang_NegativeArraySizeException,      "java/lang/NegativeArraySizeException")     \
221   template(java_lang_NoSuchFieldException,            "java/lang/NoSuchFieldException")           \
222   template(java_lang_NoSuchMethodException,           "java/lang/NoSuchMethodException")          \
223   template(java_lang_NullPointerException,            "java/lang/NullPointerException")           \
224   template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\
225   template(java_lang_UnsupportedOperationException,   "java/lang/UnsupportedOperationException")  \
226   template(java_lang_InvalidClassException,           "java/lang/InvalidClassException")          \
227   template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \
228   template(java_lang_Exception,                       "java/lang/Exception")                      \
229   template(java_lang_RuntimeException,                "java/lang/RuntimeException")               \
230   template(java_io_IOException,                       "java/io/IOException")                      \
231   template(java_security_PrivilegedActionException,   "java/security/PrivilegedActionException")  \
232                                                                                                   \
233   /* error klasses: at least all errors thrown by the VM have entries here */                     \
234   template(java_lang_AbstractMethodError,             "java/lang/AbstractMethodError")            \
235   template(java_lang_ClassCircularityError,           "java/lang/ClassCircularityError")          \
236   template(java_lang_ClassFormatError,                "java/lang/ClassFormatError")               \
237   template(java_lang_UnsupportedClassVersionError,    "java/lang/UnsupportedClassVersionError")   \
238   template(java_lang_Error,                           "java/lang/Error")                          \
239   template(java_lang_ExceptionInInitializerError,     "java/lang/ExceptionInInitializerError")    \
240   template(java_lang_IllegalAccessError,              "java/lang/IllegalAccessError")             \
241   template(java_lang_IncompatibleClassChangeError,    "java/lang/IncompatibleClassChangeError")   \
242   template(java_lang_InternalError,                   "java/lang/InternalError")                  \
243   template(java_lang_NoClassDefFoundError,            "java/lang/NoClassDefFoundError")           \
244   template(java_lang_NoSuchFieldError,                "java/lang/NoSuchFieldError")               \
245   template(java_lang_NoSuchMethodError,               "java/lang/NoSuchMethodError")              \
246   template(java_lang_OutOfMemoryError,                "java/lang/OutOfMemoryError")               \
247   template(java_lang_UnsatisfiedLinkError,            "java/lang/UnsatisfiedLinkError")           \
248   template(java_lang_VerifyError,                     "java/lang/VerifyError")                    \
249   template(java_lang_SecurityException,               "java/lang/SecurityException")              \
250   template(java_lang_VirtualMachineError,             "java/lang/VirtualMachineError")            \
251   template(java_lang_StackOverflowError,              "java/lang/StackOverflowError")             \
252   template(java_lang_StackTraceElement,               "java/lang/StackTraceElement")              \
253                                                                                                   \
254   /* Concurrency support */                                                                       \
255   template(java_util_concurrent_locks_AbstractOwnableSynchronizer,           "java/util/concurrent/locks/AbstractOwnableSynchronizer") \
256   template(java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl,       "java/util/concurrent/atomic/AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl") \
257   template(java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater,    "java/util/concurrent/atomic/AtomicLongFieldUpdater$CASUpdater") \
258   template(java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$LockedUpdater") \
259   template(java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl,     "java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl") \
260   template(jdk_internal_vm_annotation_Contended_signature,                   "Ljdk/internal/vm/annotation/Contended;")    \
261   template(jdk_internal_vm_annotation_ReservedStackAccess_signature,         "Ljdk/internal/vm/annotation/ReservedStackAccess;") \
262   template(jdk_internal_ValueBased_signature,                                "Ljdk/internal/ValueBased;") \
263                                                                                                   \
264   /* class symbols needed by intrinsics */                                                        \
265   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
266                                                                                                   \
267   /* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */           \
268                                                                                                   \
269   template(jdk_internal_reflect,                      "jdk/internal/reflect")                     \
270   template(reflect_MagicAccessorImpl,                 "jdk/internal/reflect/MagicAccessorImpl")       \
271   template(reflect_MethodAccessorImpl,                "jdk/internal/reflect/MethodAccessorImpl")      \
272   template(reflect_ConstructorAccessorImpl,           "jdk/internal/reflect/ConstructorAccessorImpl") \
273   template(reflect_DelegatingClassLoader,             "jdk/internal/reflect/DelegatingClassLoader")   \
274   template(reflect_Reflection,                        "jdk/internal/reflect/Reflection")              \
275   template(reflect_CallerSensitive,                   "jdk/internal/reflect/CallerSensitive")         \
276   template(reflect_CallerSensitive_signature,         "Ljdk/internal/reflect/CallerSensitive;")       \
277   template(reflect_NativeConstructorAccessorImpl,     "jdk/internal/reflect/NativeConstructorAccessorImpl")\
278   template(checkedExceptions_name,                    "checkedExceptions")                        \
279   template(clazz_name,                                "clazz")                                    \
280   template(exceptionTypes_name,                       "exceptionTypes")                           \
281   template(modifiers_name,                            "modifiers")                                \
282   template(invokeBasic_name,                          "invokeBasic")                              \
283   template(linkToVirtual_name,                        "linkToVirtual")                            \
284   template(linkToStatic_name,                         "linkToStatic")                             \
285   template(linkToSpecial_name,                        "linkToSpecial")                            \
286   template(linkToInterface_name,                      "linkToInterface")                          \
287   template(linkToNative_name,                         "linkToNative")                             \
288   template(compiledLambdaForm_name,                   "<compiledLambdaForm>")  /*fake name*/      \
289   template(star_name,                                 "*") /*not really a name*/                  \
290   template(invoke_name,                               "invoke")                                   \
291   template(parameterTypes_name,                       "parameterTypes")                           \
292   template(returnType_name,                           "returnType")                               \
293   template(signature_name,                            "signature")                                \
294   template(slot_name,                                 "slot")                                     \
295   template(trusted_final_name,                        "trustedFinal")                             \
296   template(blackhole_name,                            "<blackhole>")  /*fake name*/               \
297                                                                                                   \
298   /* Support for annotations (JDK 1.5 and above) */                                               \
299                                                                                                   \
300   template(annotations_name,                          "annotations")                              \
301   template(index_name,                                "index")                                    \
302   template(executable_name,                           "executable")                               \
303   template(parameter_annotations_name,                "parameterAnnotations")                     \
304   template(annotation_default_name,                   "annotationDefault")                        \
305   template(reflect_ConstantPool,                      "jdk/internal/reflect/ConstantPool")        \
306   template(reflect_UnsafeStaticFieldAccessorImpl,     "jdk/internal/reflect/UnsafeStaticFieldAccessorImpl")\
307   template(base_name,                                 "base")                                     \
308   /* Type Annotations (JDK 8 and above) */                                                        \
309   template(type_annotations_name,                     "typeAnnotations")                          \
310                                                                                                   \
311   /* Intrinsic Annotation (JDK 9 and above) */                                                    \
312   template(jdk_internal_vm_annotation_DontInline_signature,  "Ljdk/internal/vm/annotation/DontInline;")  \
313   template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \
314   template(jdk_internal_vm_annotation_Hidden_signature,      "Ljdk/internal/vm/annotation/Hidden;") \
315   template(jdk_internal_misc_Scoped_signature,               "Ljdk/internal/misc/ScopedMemoryAccess$Scoped;") \
316   template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \
317   template(jdk_internal_vm_annotation_Stable_signature,      "Ljdk/internal/vm/annotation/Stable;") \
318                                                                                                   \
319   template(jdk_internal_vm_annotation_ChangesCurrentThread_signature,  "Ljdk/internal/vm/annotation/ChangesCurrentThread;")  \
320   template(jdk_internal_vm_annotation_JvmtiMountTransition_signature,  "Ljdk/internal/vm/annotation/JvmtiMountTransition;")  \
321                                                                                                   \
322   /* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */                                   \
323   template(java_lang_invoke_CallSite,                 "java/lang/invoke/CallSite")                \
324   template(java_lang_invoke_ConstantCallSite,         "java/lang/invoke/ConstantCallSite")        \
325   template(java_lang_invoke_DirectMethodHandle,       "java/lang/invoke/DirectMethodHandle")      \
326   template(java_lang_invoke_MutableCallSite,          "java/lang/invoke/MutableCallSite")         \
327   template(java_lang_invoke_VolatileCallSite,         "java/lang/invoke/VolatileCallSite")        \
328   template(java_lang_invoke_MethodHandle,             "java/lang/invoke/MethodHandle")            \
329   template(java_lang_invoke_VarHandle,                "java/lang/invoke/VarHandle")               \
330   template(java_lang_invoke_MethodType,               "java/lang/invoke/MethodType")              \
331   template(java_lang_invoke_MethodType_signature,     "Ljava/lang/invoke/MethodType;")            \
332   template(java_lang_invoke_ResolvedMethodName_signature, "Ljava/lang/invoke/ResolvedMethodName;")\
333   template(java_lang_invoke_MemberName_signature,     "Ljava/lang/invoke/MemberName;")            \
334   template(java_lang_invoke_LambdaForm_signature,     "Ljava/lang/invoke/LambdaForm;")            \
335   template(java_lang_invoke_MethodHandle_signature,   "Ljava/lang/invoke/MethodHandle;")          \
336   /* internal classes known only to the JVM: */                                                   \
337   template(java_lang_invoke_MemberName,               "java/lang/invoke/MemberName")              \
338   template(java_lang_invoke_ResolvedMethodName,       "java/lang/invoke/ResolvedMethodName")      \
339   template(java_lang_invoke_MethodHandleNatives,      "java/lang/invoke/MethodHandleNatives")     \
340   template(java_lang_invoke_MethodHandleNatives_CallSiteContext, "java/lang/invoke/MethodHandleNatives$CallSiteContext") \
341   template(java_lang_invoke_LambdaForm,               "java/lang/invoke/LambdaForm")              \
342   template(java_lang_invoke_InjectedProfile_signature, "Ljava/lang/invoke/InjectedProfile;")      \
343   template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
344   template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
345   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
346   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
347   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
348   template(invokeExact_name,                          "invokeExact")                              \
349   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
350   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
351   template(linkMethod_name,                           "linkMethod")                               \
352   template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
353   template(linkDynamicConstant_name,                  "linkDynamicConstant")                      \
354   template(linkDynamicConstant_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
355   template(linkCallSite_name,                         "linkCallSite")                             \
356   template(linkCallSite_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
357   template(setTargetNormal_name,                      "setTargetNormal")                          \
358   template(setTargetVolatile_name,                    "setTargetVolatile")                        \
359   template(setTarget_signature,                       "(Ljava/lang/invoke/MethodHandle;)V")       \
360   template(DEFAULT_CONTEXT_name,                      "DEFAULT_CONTEXT")                          \
361   NOT_LP64(  do_alias(intptr_signature,               int_signature)  )                           \
362   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
363   /* Foreign API Support */                                                                                          \
364   template(jdk_internal_invoke_NativeEntryPoint,                 "jdk/internal/invoke/NativeEntryPoint")           \
365   template(jdk_internal_invoke_NativeEntryPoint_signature,       "Ljdk/internal/invoke/NativeEntryPoint;")         \
366   template(jdk_incubator_foreign_MemoryAccess,       "jdk/incubator/foreign/MemoryAccess")        \
367                                                                                                   \
368   /* Support for JVMCI */                                                                         \
369   JVMCI_VM_SYMBOLS_DO(template, do_alias)                                                         \
370                                                                                                   \
371   template(java_lang_StackWalker,                     "java/lang/StackWalker")                    \
372   template(java_lang_StackFrameInfo,                  "java/lang/StackFrameInfo")                 \
373   template(java_lang_LiveStackFrameInfo,              "java/lang/LiveStackFrameInfo")             \
374   template(java_lang_StackStreamFactory_AbstractStackWalker, "java/lang/StackStreamFactory$AbstractStackWalker") \
375   template(doStackWalk_signature,                     "(JIIII)Ljava/lang/Object;")                \
376   template(asPrimitive_name,                          "asPrimitive")                              \
377   template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
378   template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
379                                                                                                   \
380   /* common method and field names */                                                             \
381   template(object_initializer_name,                   "<init>")                                   \
382   template(class_initializer_name,                    "<clinit>")                                 \
383   template(println_name,                              "println")                                  \
384   template(printStackTrace_name,                      "printStackTrace")                          \
385   template(getStackTrace_name,                        "getStackTrace")                            \
386   template(main_name,                                 "main")                                     \
387   template(name_name,                                 "name")                                     \
388   template(priority_name,                             "priority")                                 \
389   template(stillborn_name,                            "stillborn")                                \
390   template(group_name,                                "group")                                    \
391   template(daemon_name,                               "daemon")                                   \
392   template(run_method_name,                           "run")                                      \
393   template(interrupt_method_name,                     "interrupt")                                \
394   template(exit_method_name,                          "exit")                                     \

395   template(remove_method_name,                        "remove")                                   \
396   template(parent_name,                               "parent")                                   \
397   template(ngroups_name,                              "ngroups")                                  \
398   template(groups_name,                               "groups")                                   \
399   template(nweaks_name,                               "nweaks")                                   \
400   template(weaks_name,                                "weaks")                                    \
401   template(maxPriority_name,                          "maxPriority")                              \



402   template(shutdown_name,                             "shutdown")                                 \
403   template(finalize_method_name,                      "finalize")                                 \
404   template(reference_lock_name,                       "lock")                                     \
405   template(reference_discovered_name,                 "discovered")                               \
406   template(run_finalization_name,                     "runFinalization")                          \
407   template(dispatchUncaughtException_name,            "dispatchUncaughtException")                \
408   template(loadClass_name,                            "loadClass")                                \
409   template(doYield_name,                              "doYield")                                  \
410   template(enter_name,                                "enter")                                    \
411   template(enterSpecial_name,                         "enterSpecial")                             \
412   template(onContinue_name,                           "onContinue0")                              \
413   template(getStacks_name,                            "getStacks")                                \
414   template(onPinned_name,                             "onPinned0")                                \
415   template(scope_name,                                "scope")                                    \
416   template(yieldInfo_name,                            "yieldInfo")                                \
417   template(tail_name,                                 "tail")                                     \
418   template(size_name,                                 "size")                                     \
419   template(argsize_name,                              "argsize")                                  \
420   template(mode_name,                                 "mode")                                     \
421   template(numFrames_name,                            "numFrames")                                \
422   template(numOops_name,                              "numOops")                                  \
423   template(stack_name,                                "stack")                                    \
424   template(maxSize_name,                              "maxSize")                                  \
425   template(reset_name,                                "reset")                                    \
426   template(done_name,                                 "done")                                     \
427   template(mounted_name,                              "mounted")                                  \
428   template(numInterpretedFrames_name,                 "numInterpretedFrames")                     \
429   template(jfrTraceId_name,                           "jfrTraceId")                               \
430   template(fp_name,                                   "fp")                                       \
431   template(sp_name,                                   "sp")                                       \
432   template(pc_name,                                   "pc")                                       \
433   template(cs_name,                                   "cs")                                       \
434   template(refStack_name,                             "refStack")                                 \
435   template(refSP_name,                                "refSP")                                    \
436   template(get_name,                                  "get")                                      \
437   template(refersTo0_name,                            "refersTo0")                                \
438   template(put_name,                                  "put")                                      \
439   template(type_name,                                 "type")                                     \
440   template(findNative_name,                           "findNative")                               \
441   template(deadChild_name,                            "deadChild")                                \
442   template(getFromClass_name,                         "getFromClass")                             \
443   template(dispatch_name,                             "dispatch")                                 \
444   template(getPlatformClassLoader_name,               "getPlatformClassLoader")                   \
445   template(getSystemClassLoader_name,                 "getSystemClassLoader")                     \
446   template(fillInStackTrace_name,                     "fillInStackTrace")                         \
447   template(getCause_name,                             "getCause")                                 \
448   template(initCause_name,                            "initCause")                                \
449   template(getProperty_name,                          "getProperty")                              \
450   template(context_name,                              "context")                                  \
451   template(contextClassLoader_name,                   "contextClassLoader")                       \
452   template(inheritedAccessControlContext_name,        "inheritedAccessControlContext")            \
453   template(getClassContext_name,                      "getClassContext")                          \
454   template(wait_name,                                 "wait0")                                     \
455   template(checkPackageAccess_name,                   "checkPackageAccess")                       \
456   template(newInstance0_name,                         "newInstance0")                             \
457   template(forName_name,                              "forName")                                  \
458   template(forName0_name,                             "forName0")                                 \
459   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
460   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
461   template(cache_field_name,                          "cache")                                    \
462   template(value_name,                                "value")                                    \
463   template(compact_strings_name,                      "COMPACT_STRINGS")                          \
464   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
465   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
466   template(bitCount_name,                             "bitCount")                                 \
467   template(profile_name,                              "profile")                                  \
468   template(equals_name,                               "equals")                                   \
469   template(length_name,                               "length")                                   \
470   template(target_name,                               "target")                                   \
471   template(toString_name,                             "toString")                                 \
472   template(values_name,                               "values")                                   \
473   template(receiver_name,                             "receiver")                                 \
474   template(vmtarget_name,                             "vmtarget")                                 \
475   template(vmholder_name,                             "vmholder")                                 \
476   template(method_name,                               "method")                                   \
477   template(vmindex_name,                              "vmindex")                                  \
478   template(vmcount_name,                              "vmcount")                                  \
479   template(flags_name,                                "flags")                                    \
480   template(basicType_name,                            "basicType")                                \
481   template(append_name,                               "append")                                   \
482   template(klass_name,                                "klass")                                    \
483   template(array_klass_name,                          "array_klass")                              \
484   template(mid_name,                                  "mid")                                      \
485   template(cpref_name,                                "cpref")                                    \
486   template(version_name,                              "version")                                  \
487   template(methodName_name,                           "methodName")                               \
488   template(fileName_name,                             "fileName")                                 \
489   template(lineNumber_name,                           "lineNumber")                               \
490   template(oop_size_name,                             "oop_size")                                 \
491   template(static_oop_field_count_name,               "static_oop_field_count")                   \
492   template(protection_domain_name,                    "protection_domain")                        \
493   template(signers_name,                              "signers_name")                             \
494   template(source_file_name,                          "source_file")                              \
495   template(loader_data_name,                          "loader_data")                              \
496   template(vmdependencies_name,                       "vmdependencies")                           \
497   template(last_cleanup_name,                         "last_cleanup")                             \
498   template(loader_name,                               "loader")                                   \
499   template(getModule_name,                            "getModule")                                \
500   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
501   template(input_stream_signature,                    "Ljava/io/InputStream;")                    \
502   template(print_stream_signature,                    "Ljava/io/PrintStream;")                    \
503   template(security_manager_signature,                "Ljava/lang/SecurityManager;")              \
504   template(defineOrCheckPackage_name,                 "defineOrCheckPackage")                     \
505   template(defineOrCheckPackage_signature,            "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
506   template(fileToEncodedURL_name,                     "fileToEncodedURL")                         \
507   template(fileToEncodedURL_signature,                "(Ljava/io/File;)Ljava/net/URL;")           \
508   template(getProtectionDomain_name,                  "getProtectionDomain")                      \
509   template(getProtectionDomain_signature,             "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
510   template(java_lang_Integer_array_signature,         "[Ljava/lang/Integer;")                     \
511   template(java_lang_Long_array_signature,            "[Ljava/lang/Long;")                        \
512   template(java_lang_Character_array_signature,       "[Ljava/lang/Character;")                   \
513   template(java_lang_Short_array_signature,           "[Ljava/lang/Short;")                       \
514   template(java_lang_Byte_array_signature,            "[Ljava/lang/Byte;")                        \
515   template(java_lang_Boolean_signature,               "Ljava/lang/Boolean;")                      \
516   template(url_code_signer_array_void_signature,      "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
517   template(jvmti_thread_state_name,                   "jvmti_thread_state")                       \
518   template(module_entry_name,                         "module_entry")                             \
519   template(resolved_references_name,                  "<resolved_references>")                    \
520   template(init_lock_name,                            "<init_lock>")                              \
521   template(address_size_name,                         "ADDRESS_SIZE0")                            \
522   template(page_size_name,                            "PAGE_SIZE")                                \
523   template(big_endian_name,                           "BIG_ENDIAN")                               \
524   template(use_unaligned_access_name,                 "UNALIGNED_ACCESS")                         \
525   template(data_cache_line_flush_size_name,           "DATA_CACHE_LINE_FLUSH_SIZE")               \
526   template(during_unsafe_access_name,                 "during_unsafe_access")                     \
527   template(checkIndex_name,                           "checkIndex")                               \
528   template(scoped_cache_shift_name,                   "SCOPED_CACHE_SHIFT")                       \
529   template(scopeLocalSnapshot_name,                   "Ljava/lang/ScopeLocal$Snapshot;")          \
530                                                                                                   \
531   /* name symbols needed by intrinsics */                                                         \
532   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
533                                                                                                   \
534   /* common signatures names */                                                                   \
535   template(void_method_signature,                     "()V")                                      \
536   template(void_boolean_signature,                    "()Z")                                      \
537   template(void_byte_signature,                       "()B")                                      \
538   template(void_char_signature,                       "()C")                                      \
539   template(void_short_signature,                      "()S")                                      \
540   template(void_int_signature,                        "()I")                                      \
541   template(void_long_signature,                       "()J")                                      \
542   template(void_float_signature,                      "()F")                                      \
543   template(void_double_signature,                     "()D")                                      \
544   template(bool_void_signature,                       "(Z)V")                                     \
545   template(int_void_signature,                        "(I)V")                                     \
546   template(int_int_signature,                         "(I)I")                                     \
547   template(char_char_signature,                       "(C)C")                                     \
548   template(short_short_signature,                     "(S)S")                                     \
549   template(int_bool_signature,                        "(I)Z")                                     \
550   template(float_int_signature,                       "(F)I")                                     \
551   template(double_long_signature,                     "(D)J")                                     \
552   template(double_double_signature,                   "(D)D")                                     \
553   template(float_float_signature,                     "(F)F")                                     \
554   template(int_float_signature,                       "(I)F")                                     \
555   template(long_int_signature,                        "(J)I")                                     \
556   template(long_long_signature,                       "(J)J")                                     \
557   template(long_double_signature,                     "(J)D")                                     \
558   template(long_void_signature,                       "(J)V")                                     \
559   template(byte_signature,                            "B")                                        \
560   template(char_signature,                            "C")                                        \
561   template(double_signature,                          "D")                                        \
562   template(float_signature,                           "F")                                        \
563   template(int_signature,                             "I")                                        \
564   template(long_signature,                            "J")                                        \
565   template(short_signature,                           "S")                                        \
566   template(bool_signature,                            "Z")                                        \
567   template(void_signature,                            "V")                                        \
568   template(bool_array_signature,                      "[Z")                                       \
569   template(byte_array_signature,                      "[B")                                       \
570   template(char_array_signature,                      "[C")                                       \
571   template(int_array_signature,                       "[I")                                       \
572   template(long_array_signature,                      "[J")                                       \
573   template(runnable_signature,                        "Ljava/lang/Runnable;")                     \
574   template(continuation_signature,                    "Ljdk/internal/vm/Continuation;")           \
575   template(continuationscope_signature,               "Ljdk/internal/vm/ContinuationScope;")      \
576   template(stackchunk_signature,                      "Ljdk/internal/vm/StackChunk;")             \
577   template(vthread_signature,                         "Ljava/lang/VirtualThread;")                \
578   template(object_void_signature,                     "(Ljava/lang/Object;)V")                    \
579   template(object_int_signature,                      "(Ljava/lang/Object;)I")                    \
580   template(long_object_long_signature,                "(JLjava/lang/Object;)J")                   \
581   template(object_boolean_signature,                  "(Ljava/lang/Object;)Z")                    \
582   template(object_object_signature,                   "(Ljava/lang/Object;)Ljava/lang/Object;")   \
583   template(string_void_signature,                     "(Ljava/lang/String;)V")                    \
584   template(string_int_signature,                      "(Ljava/lang/String;)I")                    \
585   template(string_byte_array_signature,               "(Ljava/lang/String;)[B")                   \
586   template(string_bool_byte_array_signature,          "(Ljava/lang/String;Z)[B")                  \
587   template(throwable_signature,                       "Ljava/lang/Throwable;")                    \
588   template(throwable_void_signature,                  "(Ljava/lang/Throwable;)V")                 \
589   template(void_throwable_signature,                  "()Ljava/lang/Throwable;")                  \
590   template(class_void_signature,                      "(Ljava/lang/Class;)V")                     \
591   template(class_int_signature,                       "(Ljava/lang/Class;)I")                     \
592   template(class_long_signature,                      "(Ljava/lang/Class;)J")                     \
593   template(class_boolean_signature,                   "(Ljava/lang/Class;)Z")                     \
594   template(throwable_throwable_signature,             "(Ljava/lang/Throwable;)Ljava/lang/Throwable;")             \
595   template(throwable_string_void_signature,           "(Ljava/lang/Throwable;Ljava/lang/String;)V")               \
596   template(string_array_void_signature,               "([Ljava/lang/String;)V")                                   \
597   template(string_array_string_array_void_signature,  "([Ljava/lang/String;[Ljava/lang/String;)V")                \
598   template(thread_throwable_void_signature,           "(Ljava/lang/Thread;Ljava/lang/Throwable;)V")               \
599   template(thread_void_signature,                     "(Ljava/lang/Thread;)V")                                    \
600   template(threadgroup_runnable_void_signature,       "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V")           \
601   template(threadgroup_string_void_signature,         "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V")             \
602   template(string_class_signature,                    "(Ljava/lang/String;)Ljava/lang/Class;")                    \
603   template(string_boolean_class_signature,            "(Ljava/lang/String;Z)Ljava/lang/Class;")                   \
604   template(object_object_object_signature,            "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
605   template(string_string_string_signature,            "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;") \
606   template(string_string_signature,                   "(Ljava/lang/String;)Ljava/lang/String;")                   \
607   template(classloader_string_long_signature,         "(Ljava/lang/ClassLoader;Ljava/lang/String;)J")             \
608   template(byte_array_void_signature,                 "([B)V")                                                    \
609   template(char_array_void_signature,                 "([C)V")                                                    \
610   template(int_int_void_signature,                    "(II)V")                                                    \
611   template(long_long_void_signature,                  "(JJ)V")                                                    \
612   template(void_byte_array_signature,                 "()[B")                                                     \
613   template(void_classloader_signature,                "()Ljava/lang/ClassLoader;")                                \
614   template(void_object_signature,                     "()Ljava/lang/Object;")                                     \
615   template(void_class_signature,                      "()Ljava/lang/Class;")                                      \
616   template(void_class_array_signature,                "()[Ljava/lang/Class;")                                     \
617   template(void_string_signature,                     "()Ljava/lang/String;")                                     \
618   template(void_module_signature,                     "()Ljava/lang/Module;")                                     \
619   template(object_array_object_signature,             "([Ljava/lang/Object;)Ljava/lang/Object;")                  \
620   template(object_object_array_object_signature,      "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
621   template(exception_void_signature,                  "(Ljava/lang/Exception;)V")                                 \
622   template(protectiondomain_signature,                "[Ljava/security/ProtectionDomain;")                        \
623   template(accesscontrolcontext_signature,            "Ljava/security/AccessControlContext;")                     \
624   template(class_protectiondomain_signature,          "(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V")     \
625   template(thread_signature,                          "Ljava/lang/Thread;")                                       \
626   template(thread_fieldholder_signature,              "Ljava/lang/Thread$FieldHolder;")                           \
627   template(thread_array_signature,                    "[Ljava/lang/Thread;")                                      \
628   template(threadgroup_signature,                     "Ljava/lang/ThreadGroup;")                                  \
629   template(threadgroup_array_signature,               "[Ljava/lang/ThreadGroup;")                                 \
630   template(class_array_signature,                     "[Ljava/lang/Class;")                                       \
631   template(classloader_signature,                     "Ljava/lang/ClassLoader;")                                  \
632   template(object_signature,                          "Ljava/lang/Object;")                                       \
633   template(object_array_signature,                    "[Ljava/lang/Object;")                                      \
634   template(class_signature,                           "Ljava/lang/Class;")                                        \
635   template(string_signature,                          "Ljava/lang/String;")                                       \
636   template(string_array_signature,                    "[Ljava/lang/String;")                                      \
637   template(reference_signature,                       "Ljava/lang/ref/Reference;")                                \
638   template(referencequeue_signature,                  "Ljava/lang/ref/ReferenceQueue;")                           \
639   template(weakreference_array_signature,             "[Ljava/lang/ref/WeakReference;")                           \
640   template(executable_signature,                      "Ljava/lang/reflect/Executable;")                           \
641   template(module_signature,                          "Ljava/lang/Module;")                                       \
642   template(concurrenthashmap_signature,               "Ljava/util/concurrent/ConcurrentHashMap;")                 \
643   template(String_StringBuilder_signature,            "(Ljava/lang/String;)Ljava/lang/StringBuilder;")            \
644   template(int_StringBuilder_signature,               "(I)Ljava/lang/StringBuilder;")                             \
645   template(char_StringBuilder_signature,              "(C)Ljava/lang/StringBuilder;")                             \
646   template(String_StringBuffer_signature,             "(Ljava/lang/String;)Ljava/lang/StringBuffer;")             \
647   template(int_StringBuffer_signature,                "(I)Ljava/lang/StringBuffer;")                              \
648   template(char_StringBuffer_signature,               "(C)Ljava/lang/StringBuffer;")                              \
649   template(int_String_signature,                      "(I)Ljava/lang/String;")                                    \
650   template(boolean_boolean_int_signature,             "(ZZ)I")                                                    \
651   template(big_integer_shift_worker_signature,        "([I[IIII)V")                                               \
652   template(reflect_method_signature,                  "Ljava/lang/reflect/Method;")                               \
653   template(getStackTrace_signature,                    "()[Ljava/lang/StackTraceElement;")                        \
654                                                                                                                   \
655   /* signature symbols needed by intrinsics */                                                                    \
656   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE)            \
657                                                                                                                   \
658   /* symbol aliases needed by intrinsics */                                                                       \
659   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, do_alias)           \
660                                                                                                                   \
661   /* returned by the C1 compiler in case there's not enough memory to allocate a new symbol*/                     \
662   template(dummy_symbol,                              "illegal symbol")                                           \
663                                                                                                                   \
664   /* used by ClassFormatError when class name is not known yet */                                                 \
665   template(unknown_class_name,                        "<Unknown>")                                                \
666                                                                                                                   \
667   /* JVM monitoring and management support */                                                                     \
668   template(java_lang_StackTraceElement_array,          "[Ljava/lang/StackTraceElement;")                          \
669   template(java_lang_management_ThreadState,           "java/lang/management/ThreadState")                        \
670   template(java_lang_management_MemoryUsage,           "java/lang/management/MemoryUsage")                        \
671   template(java_lang_management_ThreadInfo,            "java/lang/management/ThreadInfo")                         \
672   template(jdk_internal_agent_Agent,                   "jdk/internal/agent/Agent")                                \
673   template(sun_management_Sensor,                      "sun/management/Sensor")                                   \
674   template(sun_management_ManagementFactoryHelper,     "sun/management/ManagementFactoryHelper")                  \
675   template(com_sun_management_internal_DiagnosticCommandImpl,  "com/sun/management/internal/DiagnosticCommandImpl")     \
676   template(com_sun_management_internal_GarbageCollectorExtImpl,"com/sun/management/internal/GarbageCollectorExtImpl")   \
677   template(getDiagnosticCommandMBean_name,             "getDiagnosticCommandMBean")                               \
678   template(getDiagnosticCommandMBean_signature,        "()Lcom/sun/management/DiagnosticCommandMBean;")           \
679   template(getGcInfoBuilder_name,                      "getGcInfoBuilder")                                        \
680   template(getGcInfoBuilder_signature,                 "()Lcom/sun/management/internal/GcInfoBuilder;")           \
681   template(com_sun_management_GcInfo,                  "com/sun/management/GcInfo")                               \
682   template(com_sun_management_GcInfo_constructor_signature, "(Lcom/sun/management/internal/GcInfoBuilder;JJJ[Ljava/lang/management/MemoryUsage;[Ljava/lang/management/MemoryUsage;[Ljava/lang/Object;)V") \
683   template(createGCNotification_name,                  "createGCNotification")                                    \
684   template(createGCNotification_signature,             "(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/sun/management/GcInfo;)V") \
685   template(createDiagnosticFrameworkNotification_name, "createDiagnosticFrameworkNotification")                   \
686   template(trigger_name,                               "trigger")                                                 \
687   template(clear_name,                                 "clear")                                                   \
688   template(trigger_method_signature,                   "(ILjava/lang/management/MemoryUsage;)V")                  \
689   template(startAgent_name,                            "startAgent")                                              \
690   template(startRemoteAgent_name,                      "startRemoteManagementAgent")                              \
691   template(startLocalAgent_name,                       "startLocalManagementAgent")                               \
692   template(stopRemoteAgent_name,                       "stopRemoteManagementAgent")                               \
693   template(getAgentStatus_name,                        "getManagementAgentStatus")                                \
694   template(java_lang_management_ThreadInfo_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V") \
695   template(java_lang_management_ThreadInfo_with_locks_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;[Ljava/lang/Object;[I[Ljava/lang/Object;)V") \
696   template(long_long_long_long_void_signature,         "(JJJJ)V")                                                 \
697   template(finalizer_histogram_klass,                  "java/lang/ref/FinalizerHistogram")                        \
698   template(void_finalizer_histogram_entry_array_signature,  "()[Ljava/lang/ref/FinalizerHistogram$Entry;")                        \
699   template(get_finalizer_histogram_name,               "getFinalizerHistogram")                                   \
700   template(finalizer_histogram_entry_name_field,       "className")                                               \
701   template(finalizer_histogram_entry_count_field,      "instanceCount")                                           \
702                                                                                                                   \
703   template(java_lang_management_MemoryPoolMXBean,      "java/lang/management/MemoryPoolMXBean")                   \
704   template(java_lang_management_MemoryManagerMXBean,   "java/lang/management/MemoryManagerMXBean")                \
705   template(java_lang_management_GarbageCollectorMXBean,"java/lang/management/GarbageCollectorMXBean")             \
706   template(gcInfoBuilder_name,                         "gcInfoBuilder")                                           \
707   template(createMemoryPool_name,                      "createMemoryPool")                                        \
708   template(createMemoryManager_name,                   "createMemoryManager")                                     \
709   template(createGarbageCollector_name,                "createGarbageCollector")                                  \
710   template(createMemoryPool_signature,                 "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMXBean;") \
711   template(createMemoryManager_signature,              "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMXBean;") \
712   template(createGarbageCollector_signature,           "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMXBean;") \
713   template(addThreadDumpForMonitors_name,              "addThreadDumpForMonitors")                                \
714   template(addThreadDumpForSynchronizers_name,         "addThreadDumpForSynchronizers")                           \
715   template(addThreadDumpForMonitors_signature,         "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;[I)V") \
716   template(addThreadDumpForSynchronizers_signature,    "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;)V")   \
717                                                                                                                   \
718   /* JVMTI/java.lang.instrument support and VM Attach mechanism */                                                \
719   template(jdk_internal_module_Modules,                "jdk/internal/module/Modules")                             \
720   template(jdk_internal_vm_VMSupport,                  "jdk/internal/vm/VMSupport")                               \
721   template(addReads_name,                              "addReads")                                                \
722   template(addReads_signature,                         "(Ljava/lang/Module;Ljava/lang/Module;)V")                 \
723   template(addExports_name,                            "addExports")                                              \
724   template(addOpens_name,                              "addOpens")                                                \
725   template(addExports_signature,                       "(Ljava/lang/Module;Ljava/lang/String;Ljava/lang/Module;)V") \
726   template(addUses_name,                               "addUses")                                                 \
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(classRedefinedCount_name,                   "classRedefinedCount")                                     \
739   template(classLoader_name,                           "classLoader")                                             \
740   template(componentType_name,                         "componentType")                                           \
741                                                                                                                   \
742   /* forEachRemaining support */                                                                                  \
743   template(java_util_stream_StreamsRangeIntSpliterator,          "java/util/stream/Streams$RangeIntSpliterator")  \
744                                                                                                                   \
745   /* jfr signatures */                                                                                            \
746   JFR_TEMPLATES(template)                                                                                         \
747                                                                                                                   \
748   /* CDS */                                                                                                       \
749   template(dumpSharedArchive,                               "dumpSharedArchive")                                  \
750   template(dumpSharedArchive_signature,                     "(ZLjava/lang/String;)Ljava/lang/String;")            \
751   template(generateLambdaFormHolderClasses,                 "generateLambdaFormHolderClasses")                    \
752   template(generateLambdaFormHolderClasses_signature,       "([Ljava/lang/String;)[Ljava/lang/Object;")           \
753   template(java_lang_invoke_Invokers_Holder,                "java/lang/invoke/Invokers$Holder")                   \
754   template(java_lang_invoke_DirectMethodHandle_Holder,      "java/lang/invoke/DirectMethodHandle$Holder")         \
755   template(java_lang_invoke_LambdaForm_Holder,              "java/lang/invoke/LambdaForm$Holder")                 \
756   template(java_lang_invoke_DelegatingMethodHandle_Holder,  "java/lang/invoke/DelegatingMethodHandle$Holder")     \
757   template(jdk_internal_loader_ClassLoaders,                "jdk/internal/loader/ClassLoaders")                   \
758   template(jdk_internal_misc_CDS,                           "jdk/internal/misc/CDS")                              \
759   template(java_util_concurrent_ConcurrentHashMap,          "java/util/concurrent/ConcurrentHashMap")             \
760   template(java_util_ArrayList,                             "java/util/ArrayList")                                \
761   template(toFileURL_name,                                  "toFileURL")                                          \
762   template(toFileURL_signature,                             "(Ljava/lang/String;)Ljava/net/URL;")                 \
763   template(url_void_signature,                              "(Ljava/net/URL;)V")                                  \
764   template(url_array_classloader_void_signature,            "([Ljava/net/URL;Ljava/lang/ClassLoader;)V")          \
765                                                                                                                   \
766   /* JavaThread.dump jcmd */                                                                                      \
767   template(jdk_internal_vm_ThreadDumper,           "jdk/internal/vm/ThreadDumper")                                \
768   template(dumpThreads_name,                       "dumpThreads")                                                 \
769   template(dumpThreadsToJson_name,                 "dumpThreadsToJson")                                           \
770 
771   /*end*/
772 
773 // enum for figuring positions and size of Symbol::_vm_symbols[]
774 enum class vmSymbolID : int {
775   // [FIRST_SID ... LAST_SID] is the iteration range for the *valid* symbols.
776   // NO_SID is used to indicate an invalid symbol. Some implementation code
777   // *may* read _vm_symbols[NO_SID], so it must be a valid array index.
778   NO_SID = 0,                // exclusive lower limit
779 
780   #define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME_(name),
781   VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE)
782   #undef VM_SYMBOL_ENUM
783 
784   SID_LIMIT,                 // exclusive upper limit
785 
786   #define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME_(name) = VM_SYMBOL_ENUM_NAME_(def),
787   VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM)
788   #undef VM_ALIAS_ENUM
789 
790   FIRST_SID = NO_SID + 1,    // inclusive lower limit
791   LAST_SID = SID_LIMIT - 1,  // inclusive upper limit
792 };
793 
794 ENUMERATOR_RANGE(vmSymbolID, vmSymbolID::FIRST_SID, vmSymbolID::LAST_SID)
795 
796 class vmSymbols: AllStatic {
797   friend class vmIntrinsics;
798   friend class VMStructs;
799   friend class JVMCIVMStructs;
800 
801   static const int NO_SID    = static_cast<int>(vmSymbolID::NO_SID);    // exclusive lower limit
802   static const int FIRST_SID = static_cast<int>(vmSymbolID::FIRST_SID); // inclusive lower limit
803   static const int LAST_SID  = static_cast<int>(vmSymbolID::FIRST_SID); // inclusive upper limit
804   static const int SID_LIMIT = static_cast<int>(vmSymbolID::SID_LIMIT); // exclusive upper limit
805 
806  public:
807   static constexpr bool is_valid_id(int id) {
808     return (id >= FIRST_SID && id < SID_LIMIT);
809   }
810   static constexpr bool is_valid_id(vmSymbolID sid) {
811     return is_valid_id(static_cast<int>(sid));
812   }
813 
814   static constexpr vmSymbolID as_SID(int id) {
815     assert(is_valid_id(id), "must be");
816     return static_cast<vmSymbolID>(id);
817   }
818 
819   static constexpr int as_int(vmSymbolID sid) {
820     assert(is_valid_id(sid), "must be");
821     return static_cast<int>(sid);
822   }
823 
824   static constexpr int number_of_symbols() {
825     static_assert(NO_SID == 0, "must be a valid array index");
826     static_assert(FIRST_SID == 1, "must not be the same as NO_SID");
827     return SID_LIMIT;
828   }
829 
830   enum {
831     log2_SID_LIMIT = 11         // checked by an assert at start-up
832   };
833 
834  private:
835 
836   // Field signatures indexed by BasicType.
837   static Symbol* _type_signatures[T_VOID+1];
838 
839  public:
840   // Initialization
841   static void initialize();
842   // Accessing
843   #define VM_SYMBOL_DECLARE(name, ignore)                 \
844     static Symbol* name() {                               \
845       return Symbol::_vm_symbols[static_cast<int>(VM_SYMBOL_ENUM_NAME(name))]; \
846     }
847   VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
848   #undef VM_SYMBOL_DECLARE
849 
850   // Sharing support
851   static void symbols_do(SymbolClosure* f);
852   static void metaspace_pointers_do(MetaspaceClosure *it);
853   static void serialize(SerializeClosure* soc);
854 
855   static Symbol* type_signature(BasicType t) {
856     assert((uint)t < T_VOID+1, "range check");
857     assert(_type_signatures[t] != NULL, "domain check");
858     return _type_signatures[t];
859   }
860 
861   static Symbol* symbol_at(vmSymbolID id) {
862     return Symbol::vm_symbol_at(id);
863   }
864 
865   // Returns symbol's vmSymbolID if one is assigned, else vmSymbolID::NO_SID.
866   static vmSymbolID find_sid(const Symbol* symbol);
867   static vmSymbolID find_sid(const char* symbol_name);
868 
869 #ifndef PRODUCT
870   // No need for this in the product:
871   static const char* name_for(vmSymbolID sid);
872 #endif //PRODUCT
873 };
874 
875 #endif // SHARE_CLASSFILE_VMSYMBOLS_HPP
--- EOF ---