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_ThreadGroup,                     "java/lang/ThreadGroup")                    \

 66   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
 67   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
 68   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
 69   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \




 70   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
 71   template(java_lang_Character,                       "java/lang/Character")                      \
 72   template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
 73   template(java_lang_CharacterDataLatin1,             "java/lang/CharacterDataLatin1")            \
 74   template(java_lang_Float,                           "java/lang/Float")                          \
 75   template(java_lang_Double,                          "java/lang/Double")                         \
 76   template(java_lang_Byte,                            "java/lang/Byte")                           \
 77   template(java_lang_Byte_ByteCache,                  "java/lang/Byte$ByteCache")                 \
 78   template(java_lang_Short,                           "java/lang/Short")                          \
 79   template(java_lang_Short_ShortCache,                "java/lang/Short$ShortCache")               \
 80   template(java_lang_Integer,                         "java/lang/Integer")                        \
 81   template(java_lang_Integer_IntegerCache,            "java/lang/Integer$IntegerCache")           \
 82   template(java_lang_Long,                            "java/lang/Long")                           \
 83   template(java_lang_Long_LongCache,                  "java/lang/Long$LongCache")                 \
 84                                                                                                   \
 85   template(jdk_internal_vm_vector_VectorSupport,      "jdk/internal/vm/vector/VectorSupport")               \
 86   template(jdk_internal_vm_vector_VectorPayload,      "jdk/internal/vm/vector/VectorSupport$VectorPayload") \
 87   template(jdk_internal_vm_vector_Vector,             "jdk/internal/vm/vector/VectorSupport$Vector")        \
 88   template(jdk_internal_vm_vector_VectorMask,         "jdk/internal/vm/vector/VectorSupport$VectorMask")    \
 89   template(jdk_internal_vm_vector_VectorShuffle,      "jdk/internal/vm/vector/VectorSupport$VectorShuffle") \
 90   template(payload_name,                              "payload")                                            \
 91   template(ETYPE_name,                                "ETYPE")                                              \
 92   template(VLENGTH_name,                              "VLENGTH")                                            \
 93                                                                                                   \
 94   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
 95   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
 96   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
 97   template(java_lang_ref_WeakReference,               "java/lang/ref/WeakReference")              \
 98   template(java_lang_ref_FinalReference,              "java/lang/ref/FinalReference")             \
 99   template(java_lang_ref_PhantomReference,            "java/lang/ref/PhantomReference")           \
100   template(java_lang_ref_Finalizer,                   "java/lang/ref/Finalizer")                  \
101   template(java_lang_reflect_AccessibleObject,        "java/lang/reflect/AccessibleObject")       \
102   template(java_lang_reflect_Method,                  "java/lang/reflect/Method")                 \
103   template(java_lang_reflect_Constructor,             "java/lang/reflect/Constructor")            \
104   template(java_lang_reflect_Field,                   "java/lang/reflect/Field")                  \
105   template(java_lang_reflect_Parameter,               "java/lang/reflect/Parameter")              \
106   template(java_lang_reflect_Array,                   "java/lang/reflect/Array")                  \
107   template(java_lang_reflect_RecordComponent,         "java/lang/reflect/RecordComponent")        \
108   template(java_lang_StringBuffer,                    "java/lang/StringBuffer")                   \
109   template(java_lang_StringBuilder,                   "java/lang/StringBuilder")                  \
110   template(java_lang_CharSequence,                    "java/lang/CharSequence")                   \
111   template(java_lang_SecurityManager,                 "java/lang/SecurityManager")                \
112   template(java_security_AccessControlContext,        "java/security/AccessControlContext")       \
113   template(java_security_AccessController,            "java/security/AccessController")           \
114   template(executePrivileged_name,                    "executePrivileged")                        \
115   template(java_security_CodeSource,                  "java/security/CodeSource")                 \
116   template(java_security_ProtectionDomain,            "java/security/ProtectionDomain")           \
117   template(java_security_SecureClassLoader,           "java/security/SecureClassLoader")          \
118   template(java_net_URL,                              "java/net/URL")                             \
119   template(java_net_URLClassLoader,                   "java/net/URLClassLoader")                  \
120   template(java_util_jar_Manifest,                    "java/util/jar/Manifest")                   \
121   template(java_io_OutputStream,                      "java/io/OutputStream")                     \
122   template(java_io_Reader,                            "java/io/Reader")                           \
123   template(java_io_BufferedReader,                    "java/io/BufferedReader")                   \
124   template(java_io_File,                              "java/io/File")                             \
125   template(java_io_FileInputStream,                   "java/io/FileInputStream")                  \
126   template(java_io_ByteArrayInputStream,              "java/io/ByteArrayInputStream")             \
127   template(java_io_Serializable,                      "java/io/Serializable")                     \
128   template(java_nio_Buffer,                           "java/nio/Buffer")                          \
129   template(java_util_Arrays,                          "java/util/Arrays")                         \
130   template(java_util_Objects,                         "java/util/Objects")                        \
131   template(java_util_Properties,                      "java/util/Properties")                     \
132   template(java_util_Vector,                          "java/util/Vector")                         \
133   template(java_util_AbstractList,                    "java/util/AbstractList")                   \
134   template(java_util_Hashtable,                       "java/util/Hashtable")                      \
135   template(java_lang_Compiler,                        "java/lang/Compiler")                       \
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(getBootClassPathEntryForClass_name,        "getBootClassPathEntryForClass")            \
140   template(jdk_internal_vm_PostVMInitHook,            "jdk/internal/vm/PostVMInitHook")           \
141   template(sun_net_www_ParseUtil,                     "sun/net/www/ParseUtil")                    \
142   template(java_util_Iterator,                        "java/util/Iterator")                       \
143   template(java_lang_Record,                          "java/lang/Record")                         \
144   template(sun_instrument_InstrumentationImpl,        "sun/instrument/InstrumentationImpl")       \
145                                                                                                   \
146   template(jdk_internal_loader_NativeLibraries,       "jdk/internal/loader/NativeLibraries")      \
147   template(jdk_internal_loader_BuiltinClassLoader,    "jdk/internal/loader/BuiltinClassLoader")   \
148   template(jdk_internal_loader_ClassLoaders_AppClassLoader,      "jdk/internal/loader/ClassLoaders$AppClassLoader")      \
149   template(jdk_internal_loader_ClassLoaders_PlatformClassLoader, "jdk/internal/loader/ClassLoaders$PlatformClassLoader") \
150                                                                                                   \
151   /* Java runtime version access */                                                               \
152   template(java_lang_VersionProps,                    "java/lang/VersionProps")                   \
153   template(java_version_name,                         "java_version")                             \
154   template(java_runtime_name_name,                    "java_runtime_name")                        \
155   template(java_runtime_version_name,                 "java_runtime_version")                     \
156   template(java_runtime_vendor_version_name,          "VENDOR_VERSION")                           \
157   template(java_runtime_vendor_vm_bug_url_name,       "VENDOR_URL_VM_BUG")                        \
158                                                                                                   \
159   /* system initialization */                                                                     \
160   template(initPhase1_name,                           "initPhase1")                               \
161   template(initPhase2_name,                           "initPhase2")                               \
162   template(initPhase3_name,                           "initPhase3")                               \
163   template(java_lang_module_init_signature,           "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
164                                                                                                   \
165   /* class file format tags */                                                                    \
166   template(tag_source_file,                           "SourceFile")                               \
167   template(tag_inner_classes,                         "InnerClasses")                             \
168   template(tag_nest_members,                          "NestMembers")                              \
169   template(tag_nest_host,                             "NestHost")                                 \
170   template(tag_constant_value,                        "ConstantValue")                            \
171   template(tag_code,                                  "Code")                                     \
172   template(tag_exceptions,                            "Exceptions")                               \
173   template(tag_line_number_table,                     "LineNumberTable")                          \
174   template(tag_local_variable_table,                  "LocalVariableTable")                       \
175   template(tag_local_variable_type_table,             "LocalVariableTypeTable")                   \
176   template(tag_method_parameters,                     "MethodParameters")                         \
177   template(tag_stack_map_table,                       "StackMapTable")                            \
178   template(tag_synthetic,                             "Synthetic")                                \
179   template(tag_deprecated,                            "Deprecated")                               \
180   template(tag_source_debug_extension,                "SourceDebugExtension")                     \
181   template(tag_signature,                             "Signature")                                \
182   template(tag_record,                                "Record")                                   \
183   template(tag_runtime_visible_annotations,           "RuntimeVisibleAnnotations")                \
184   template(tag_runtime_invisible_annotations,         "RuntimeInvisibleAnnotations")              \
185   template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations")       \
186   template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations")    \
187   template(tag_annotation_default,                    "AnnotationDefault")                        \
188   template(tag_runtime_visible_type_annotations,      "RuntimeVisibleTypeAnnotations")            \
189   template(tag_runtime_invisible_type_annotations,    "RuntimeInvisibleTypeAnnotations")          \
190   template(tag_enclosing_method,                      "EnclosingMethod")                          \
191   template(tag_bootstrap_methods,                     "BootstrapMethods")                         \
192   template(tag_permitted_subclasses,                  "PermittedSubclasses")                      \
193                                                                                                   \
194   /* exception klasses: at least all exceptions thrown by the VM have entries here */             \
195   template(java_lang_ArithmeticException,             "java/lang/ArithmeticException")            \
196   template(java_lang_ArrayIndexOutOfBoundsException,  "java/lang/ArrayIndexOutOfBoundsException") \
197   template(java_lang_ArrayStoreException,             "java/lang/ArrayStoreException")            \
198   template(java_lang_ClassCastException,              "java/lang/ClassCastException")             \
199   template(java_lang_ClassNotFoundException,          "java/lang/ClassNotFoundException")         \
200   template(java_lang_CloneNotSupportedException,      "java/lang/CloneNotSupportedException")     \
201   template(java_lang_IllegalAccessException,          "java/lang/IllegalAccessException")         \
202   template(java_lang_IllegalArgumentException,        "java/lang/IllegalArgumentException")       \
203   template(java_lang_IllegalStateException,           "java/lang/IllegalStateException")          \
204   template(java_lang_IllegalMonitorStateException,    "java/lang/IllegalMonitorStateException")   \
205   template(java_lang_IllegalThreadStateException,     "java/lang/IllegalThreadStateException")    \
206   template(java_lang_IndexOutOfBoundsException,       "java/lang/IndexOutOfBoundsException")      \
207   template(java_lang_InstantiationException,          "java/lang/InstantiationException")         \
208   template(java_lang_InstantiationError,              "java/lang/InstantiationError")             \
209   template(java_lang_InterruptedException,            "java/lang/InterruptedException")           \
210   template(java_lang_BootstrapMethodError,            "java/lang/BootstrapMethodError")           \
211   template(java_lang_LinkageError,                    "java/lang/LinkageError")                   \
212   template(java_lang_NegativeArraySizeException,      "java/lang/NegativeArraySizeException")     \
213   template(java_lang_NoSuchFieldException,            "java/lang/NoSuchFieldException")           \
214   template(java_lang_NoSuchMethodException,           "java/lang/NoSuchMethodException")          \
215   template(java_lang_NullPointerException,            "java/lang/NullPointerException")           \
216   template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\
217   template(java_lang_UnsupportedOperationException,   "java/lang/UnsupportedOperationException")  \
218   template(java_lang_InvalidClassException,           "java/lang/InvalidClassException")          \
219   template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \
220   template(java_lang_Exception,                       "java/lang/Exception")                      \
221   template(java_lang_RuntimeException,                "java/lang/RuntimeException")               \
222   template(java_io_IOException,                       "java/io/IOException")                      \
223   template(java_security_PrivilegedActionException,   "java/security/PrivilegedActionException")  \
224                                                                                                   \
225   /* error klasses: at least all errors thrown by the VM have entries here */                     \
226   template(java_lang_AbstractMethodError,             "java/lang/AbstractMethodError")            \
227   template(java_lang_ClassCircularityError,           "java/lang/ClassCircularityError")          \
228   template(java_lang_ClassFormatError,                "java/lang/ClassFormatError")               \
229   template(java_lang_UnsupportedClassVersionError,    "java/lang/UnsupportedClassVersionError")   \
230   template(java_lang_Error,                           "java/lang/Error")                          \
231   template(java_lang_ExceptionInInitializerError,     "java/lang/ExceptionInInitializerError")    \
232   template(java_lang_IllegalAccessError,              "java/lang/IllegalAccessError")             \
233   template(java_lang_IncompatibleClassChangeError,    "java/lang/IncompatibleClassChangeError")   \
234   template(java_lang_InternalError,                   "java/lang/InternalError")                  \
235   template(java_lang_NoClassDefFoundError,            "java/lang/NoClassDefFoundError")           \
236   template(java_lang_NoSuchFieldError,                "java/lang/NoSuchFieldError")               \
237   template(java_lang_NoSuchMethodError,               "java/lang/NoSuchMethodError")              \
238   template(java_lang_OutOfMemoryError,                "java/lang/OutOfMemoryError")               \
239   template(java_lang_UnsatisfiedLinkError,            "java/lang/UnsatisfiedLinkError")           \
240   template(java_lang_VerifyError,                     "java/lang/VerifyError")                    \
241   template(java_lang_SecurityException,               "java/lang/SecurityException")              \
242   template(java_lang_VirtualMachineError,             "java/lang/VirtualMachineError")            \
243   template(java_lang_StackOverflowError,              "java/lang/StackOverflowError")             \
244   template(java_lang_StackTraceElement,               "java/lang/StackTraceElement")              \
245                                                                                                   \
246   /* Concurrency support */                                                                       \
247   template(java_util_concurrent_locks_AbstractOwnableSynchronizer,           "java/util/concurrent/locks/AbstractOwnableSynchronizer") \
248   template(java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl,       "java/util/concurrent/atomic/AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl") \
249   template(java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater,    "java/util/concurrent/atomic/AtomicLongFieldUpdater$CASUpdater") \
250   template(java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater, "java/util/concurrent/atomic/AtomicLongFieldUpdater$LockedUpdater") \
251   template(java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl,     "java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl") \
252   template(jdk_internal_vm_annotation_Contended_signature,                   "Ljdk/internal/vm/annotation/Contended;")    \
253   template(jdk_internal_vm_annotation_ReservedStackAccess_signature,         "Ljdk/internal/vm/annotation/ReservedStackAccess;") \
254   template(jdk_internal_ValueBased_signature,                                "Ljdk/internal/ValueBased;") \
255                                                                                                   \
256   /* class symbols needed by intrinsics */                                                        \
257   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
258                                                                                                   \
259   /* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */           \
260                                                                                                   \
261   template(jdk_internal_reflect,                      "jdk/internal/reflect")                     \
262   template(reflect_MagicAccessorImpl,                 "jdk/internal/reflect/MagicAccessorImpl")       \
263   template(reflect_MethodAccessorImpl,                "jdk/internal/reflect/MethodAccessorImpl")      \
264   template(reflect_ConstructorAccessorImpl,           "jdk/internal/reflect/ConstructorAccessorImpl") \
265   template(reflect_DelegatingClassLoader,             "jdk/internal/reflect/DelegatingClassLoader")   \
266   template(reflect_Reflection,                        "jdk/internal/reflect/Reflection")              \
267   template(reflect_CallerSensitive,                   "jdk/internal/reflect/CallerSensitive")         \
268   template(reflect_CallerSensitive_signature,         "Ljdk/internal/reflect/CallerSensitive;")       \
269   template(reflect_NativeConstructorAccessorImpl,     "jdk/internal/reflect/NativeConstructorAccessorImpl")\
270   template(checkedExceptions_name,                    "checkedExceptions")                        \
271   template(clazz_name,                                "clazz")                                    \
272   template(exceptionTypes_name,                       "exceptionTypes")                           \
273   template(modifiers_name,                            "modifiers")                                \
274   template(invokeBasic_name,                          "invokeBasic")                              \
275   template(linkToVirtual_name,                        "linkToVirtual")                            \
276   template(linkToStatic_name,                         "linkToStatic")                             \
277   template(linkToSpecial_name,                        "linkToSpecial")                            \
278   template(linkToInterface_name,                      "linkToInterface")                          \
279   template(linkToNative_name,                         "linkToNative")                             \
280   template(compiledLambdaForm_name,                   "<compiledLambdaForm>")  /*fake name*/      \
281   template(star_name,                                 "*") /*not really a name*/                  \
282   template(invoke_name,                               "invoke")                                   \
283   template(parameterTypes_name,                       "parameterTypes")                           \
284   template(returnType_name,                           "returnType")                               \
285   template(signature_name,                            "signature")                                \
286   template(slot_name,                                 "slot")                                     \
287   template(trusted_final_name,                        "trustedFinal")                             \
288   template(blackhole_name,                            "<blackhole>")  /*fake name*/               \
289                                                                                                   \
290   /* Support for annotations (JDK 1.5 and above) */                                               \
291                                                                                                   \
292   template(annotations_name,                          "annotations")                              \
293   template(index_name,                                "index")                                    \
294   template(executable_name,                           "executable")                               \
295   template(parameter_annotations_name,                "parameterAnnotations")                     \
296   template(annotation_default_name,                   "annotationDefault")                        \
297   template(reflect_ConstantPool,                      "jdk/internal/reflect/ConstantPool")        \
298   template(reflect_UnsafeStaticFieldAccessorImpl,     "jdk/internal/reflect/UnsafeStaticFieldAccessorImpl")\
299   template(base_name,                                 "base")                                     \
300   /* Type Annotations (JDK 8 and above) */                                                        \
301   template(type_annotations_name,                     "typeAnnotations")                          \
302                                                                                                   \
303   /* Intrinsic Annotation (JDK 9 and above) */                                                    \
304   template(jdk_internal_vm_annotation_DontInline_signature,  "Ljdk/internal/vm/annotation/DontInline;")  \
305   template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \
306   template(jdk_internal_vm_annotation_Hidden_signature,      "Ljdk/internal/vm/annotation/Hidden;") \
307   template(jdk_internal_misc_Scoped_signature,               "Ljdk/internal/misc/ScopedMemoryAccess$Scoped;") \
308   template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \
309   template(jdk_internal_vm_annotation_Stable_signature,      "Ljdk/internal/vm/annotation/Stable;") \




310   /* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */                                   \
311   template(java_lang_invoke_CallSite,                 "java/lang/invoke/CallSite")                \
312   template(java_lang_invoke_ConstantCallSite,         "java/lang/invoke/ConstantCallSite")        \
313   template(java_lang_invoke_DirectMethodHandle,       "java/lang/invoke/DirectMethodHandle")      \
314   template(java_lang_invoke_MutableCallSite,          "java/lang/invoke/MutableCallSite")         \
315   template(java_lang_invoke_VolatileCallSite,         "java/lang/invoke/VolatileCallSite")        \
316   template(java_lang_invoke_MethodHandle,             "java/lang/invoke/MethodHandle")            \
317   template(java_lang_invoke_VarHandle,                "java/lang/invoke/VarHandle")               \
318   template(java_lang_invoke_MethodType,               "java/lang/invoke/MethodType")              \
319   template(java_lang_invoke_MethodType_signature,     "Ljava/lang/invoke/MethodType;")            \
320   template(java_lang_invoke_ResolvedMethodName_signature, "Ljava/lang/invoke/ResolvedMethodName;")\
321   template(java_lang_invoke_MemberName_signature,     "Ljava/lang/invoke/MemberName;")            \
322   template(java_lang_invoke_LambdaForm_signature,     "Ljava/lang/invoke/LambdaForm;")            \
323   template(java_lang_invoke_MethodHandle_signature,   "Ljava/lang/invoke/MethodHandle;")          \
324   /* internal classes known only to the JVM: */                                                   \
325   template(java_lang_invoke_MemberName,               "java/lang/invoke/MemberName")              \
326   template(java_lang_invoke_ResolvedMethodName,       "java/lang/invoke/ResolvedMethodName")      \
327   template(java_lang_invoke_MethodHandleNatives,      "java/lang/invoke/MethodHandleNatives")     \
328   template(java_lang_invoke_MethodHandleNatives_CallSiteContext, "java/lang/invoke/MethodHandleNatives$CallSiteContext") \
329   template(java_lang_invoke_LambdaForm,               "java/lang/invoke/LambdaForm")              \
330   template(java_lang_invoke_InjectedProfile_signature, "Ljava/lang/invoke/InjectedProfile;")      \
331   template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
332   template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
333   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
334   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
335   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
336   template(invokeExact_name,                          "invokeExact")                              \
337   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
338   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
339   template(linkMethod_name,                           "linkMethod")                               \
340   template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
341   template(linkDynamicConstant_name,                  "linkDynamicConstant")                      \
342   template(linkDynamicConstant_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
343   template(linkCallSite_name,                         "linkCallSite")                             \
344   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;") \
345   template(setTargetNormal_name,                      "setTargetNormal")                          \
346   template(setTargetVolatile_name,                    "setTargetVolatile")                        \
347   template(setTarget_signature,                       "(Ljava/lang/invoke/MethodHandle;)V")       \
348   template(DEFAULT_CONTEXT_name,                      "DEFAULT_CONTEXT")                          \
349   NOT_LP64(  do_alias(intptr_signature,               int_signature)  )                           \
350   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
351   /* Foreign API Support */                                                                                          \
352   template(jdk_internal_invoke_NativeEntryPoint,                 "jdk/internal/invoke/NativeEntryPoint")           \
353   template(jdk_internal_invoke_NativeEntryPoint_signature,       "Ljdk/internal/invoke/NativeEntryPoint;")         \
354   template(jdk_incubator_foreign_MemoryAccess,       "jdk/incubator/foreign/MemoryAccess")        \
355                                                                                                   \
356   /* Support for JVMCI */                                                                         \
357   JVMCI_VM_SYMBOLS_DO(template, do_alias)                                                         \
358                                                                                                   \
359   template(java_lang_StackWalker,                     "java/lang/StackWalker")                    \
360   template(java_lang_StackFrameInfo,                  "java/lang/StackFrameInfo")                 \
361   template(java_lang_LiveStackFrameInfo,              "java/lang/LiveStackFrameInfo")             \
362   template(java_lang_StackStreamFactory_AbstractStackWalker, "java/lang/StackStreamFactory$AbstractStackWalker") \
363   template(doStackWalk_signature,                     "(JIIII)Ljava/lang/Object;")                \
364   template(asPrimitive_name,                          "asPrimitive")                              \
365   template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
366   template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
367                                                                                                   \
368   /* common method and field names */                                                             \
369   template(object_initializer_name,                   "<init>")                                   \
370   template(class_initializer_name,                    "<clinit>")                                 \
371   template(println_name,                              "println")                                  \
372   template(printStackTrace_name,                      "printStackTrace")                          \
373   template(getStackTrace_name,                        "getStackTrace")                            \
374   template(main_name,                                 "main")                                     \
375   template(name_name,                                 "name")                                     \
376   template(priority_name,                             "priority")                                 \
377   template(stillborn_name,                            "stillborn")                                \
378   template(group_name,                                "group")                                    \
379   template(daemon_name,                               "daemon")                                   \
380   template(run_method_name,                           "run")                                      \

381   template(exit_method_name,                          "exit")                                     \
382   template(add_method_name,                           "add")                                      \
383   template(remove_method_name,                        "remove")                                   \
384   template(parent_name,                               "parent")                                   \
385   template(threads_name,                              "threads")                                  \
386   template(groups_name,                               "groups")                                   \


387   template(maxPriority_name,                          "maxPriority")                              \
388   template(destroyed_name,                            "destroyed")                                \
389   template(nthreads_name,                             "nthreads")                                 \
390   template(ngroups_name,                              "ngroups")                                  \
391   template(shutdown_name,                             "shutdown")                                 \
392   template(finalize_method_name,                      "finalize")                                 \
393   template(reference_lock_name,                       "lock")                                     \
394   template(reference_discovered_name,                 "discovered")                               \
395   template(run_finalization_name,                     "runFinalization")                          \
396   template(dispatchUncaughtException_name,            "dispatchUncaughtException")                \
397   template(loadClass_name,                            "loadClass")                                \



























398   template(get_name,                                  "get")                                      \
399   template(refersTo0_name,                            "refersTo0")                                \
400   template(put_name,                                  "put")                                      \
401   template(type_name,                                 "type")                                     \
402   template(findNative_name,                           "findNative")                               \
403   template(deadChild_name,                            "deadChild")                                \
404   template(getFromClass_name,                         "getFromClass")                             \
405   template(dispatch_name,                             "dispatch")                                 \
406   template(getPlatformClassLoader_name,               "getPlatformClassLoader")                   \
407   template(getSystemClassLoader_name,                 "getSystemClassLoader")                     \
408   template(fillInStackTrace_name,                     "fillInStackTrace")                         \
409   template(getCause_name,                             "getCause")                                 \
410   template(initCause_name,                            "initCause")                                \
411   template(getProperty_name,                          "getProperty")                              \
412   template(context_name,                              "context")                                  \
413   template(contextClassLoader_name,                   "contextClassLoader")                       \
414   template(inheritedAccessControlContext_name,        "inheritedAccessControlContext")            \
415   template(getClassContext_name,                      "getClassContext")                          \
416   template(wait_name,                                 "wait")                                     \
417   template(checkPackageAccess_name,                   "checkPackageAccess")                       \
418   template(newInstance0_name,                         "newInstance0")                             \
419   template(forName_name,                              "forName")                                  \
420   template(forName0_name,                             "forName0")                                 \
421   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
422   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
423   template(cache_field_name,                          "cache")                                    \
424   template(value_name,                                "value")                                    \
425   template(compact_strings_name,                      "COMPACT_STRINGS")                          \
426   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
427   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
428   template(bitCount_name,                             "bitCount")                                 \
429   template(profile_name,                              "profile")                                  \
430   template(equals_name,                               "equals")                                   \
431   template(length_name,                               "length")                                   \
432   template(target_name,                               "target")                                   \
433   template(toString_name,                             "toString")                                 \
434   template(values_name,                               "values")                                   \
435   template(receiver_name,                             "receiver")                                 \
436   template(vmtarget_name,                             "vmtarget")                                 \
437   template(vmholder_name,                             "vmholder")                                 \
438   template(method_name,                               "method")                                   \
439   template(vmindex_name,                              "vmindex")                                  \
440   template(vmcount_name,                              "vmcount")                                  \
441   template(flags_name,                                "flags")                                    \
442   template(basicType_name,                            "basicType")                                \
443   template(append_name,                               "append")                                   \
444   template(klass_name,                                "klass")                                    \
445   template(array_klass_name,                          "array_klass")                              \
446   template(mid_name,                                  "mid")                                      \
447   template(cpref_name,                                "cpref")                                    \
448   template(version_name,                              "version")                                  \
449   template(methodName_name,                           "methodName")                               \
450   template(fileName_name,                             "fileName")                                 \
451   template(lineNumber_name,                           "lineNumber")                               \
452   template(oop_size_name,                             "oop_size")                                 \
453   template(static_oop_field_count_name,               "static_oop_field_count")                   \
454   template(protection_domain_name,                    "protection_domain")                        \
455   template(signers_name,                              "signers_name")                             \
456   template(source_file_name,                          "source_file")                              \
457   template(loader_data_name,                          "loader_data")                              \
458   template(vmdependencies_name,                       "vmdependencies")                           \
459   template(last_cleanup_name,                         "last_cleanup")                             \
460   template(loader_name,                               "loader")                                   \
461   template(getModule_name,                            "getModule")                                \
462   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
463   template(input_stream_signature,                    "Ljava/io/InputStream;")                    \
464   template(print_stream_signature,                    "Ljava/io/PrintStream;")                    \
465   template(security_manager_signature,                "Ljava/lang/SecurityManager;")              \
466   template(defineOrCheckPackage_name,                 "defineOrCheckPackage")                     \
467   template(defineOrCheckPackage_signature,            "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
468   template(fileToEncodedURL_name,                     "fileToEncodedURL")                         \
469   template(fileToEncodedURL_signature,                "(Ljava/io/File;)Ljava/net/URL;")           \
470   template(getProtectionDomain_name,                  "getProtectionDomain")                      \
471   template(getProtectionDomain_signature,             "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
472   template(java_lang_Integer_array_signature,         "[Ljava/lang/Integer;")                     \
473   template(java_lang_Long_array_signature,            "[Ljava/lang/Long;")                        \
474   template(java_lang_Character_array_signature,       "[Ljava/lang/Character;")                   \
475   template(java_lang_Short_array_signature,           "[Ljava/lang/Short;")                       \
476   template(java_lang_Byte_array_signature,            "[Ljava/lang/Byte;")                        \
477   template(java_lang_Boolean_signature,               "Ljava/lang/Boolean;")                      \
478   template(url_code_signer_array_void_signature,      "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \

479   template(module_entry_name,                         "module_entry")                             \
480   template(resolved_references_name,                  "<resolved_references>")                    \
481   template(init_lock_name,                            "<init_lock>")                              \
482   template(address_size_name,                         "ADDRESS_SIZE0")                            \
483   template(page_size_name,                            "PAGE_SIZE")                                \
484   template(big_endian_name,                           "BIG_ENDIAN")                               \
485   template(use_unaligned_access_name,                 "UNALIGNED_ACCESS")                         \
486   template(data_cache_line_flush_size_name,           "DATA_CACHE_LINE_FLUSH_SIZE")               \
487   template(during_unsafe_access_name,                 "during_unsafe_access")                     \
488   template(checkIndex_name,                           "checkIndex")                               \


489                                                                                                   \
490   /* name symbols needed by intrinsics */                                                         \
491   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
492                                                                                                   \
493   /* common signatures names */                                                                   \
494   template(void_method_signature,                     "()V")                                      \
495   template(void_boolean_signature,                    "()Z")                                      \
496   template(void_byte_signature,                       "()B")                                      \
497   template(void_char_signature,                       "()C")                                      \
498   template(void_short_signature,                      "()S")                                      \
499   template(void_int_signature,                        "()I")                                      \
500   template(void_long_signature,                       "()J")                                      \
501   template(void_float_signature,                      "()F")                                      \
502   template(void_double_signature,                     "()D")                                      \
503   template(bool_void_signature,                       "(Z)V")                                     \
504   template(int_void_signature,                        "(I)V")                                     \
505   template(int_int_signature,                         "(I)I")                                     \
506   template(char_char_signature,                       "(C)C")                                     \
507   template(short_short_signature,                     "(S)S")                                     \
508   template(int_bool_signature,                        "(I)Z")                                     \
509   template(float_int_signature,                       "(F)I")                                     \
510   template(double_long_signature,                     "(D)J")                                     \
511   template(double_double_signature,                   "(D)D")                                     \
512   template(float_float_signature,                     "(F)F")                                     \
513   template(int_float_signature,                       "(I)F")                                     \
514   template(long_int_signature,                        "(J)I")                                     \
515   template(long_long_signature,                       "(J)J")                                     \
516   template(long_double_signature,                     "(J)D")                                     \
517   template(long_void_signature,                       "(J)V")                                     \
518   template(byte_signature,                            "B")                                        \
519   template(char_signature,                            "C")                                        \
520   template(double_signature,                          "D")                                        \
521   template(float_signature,                           "F")                                        \
522   template(int_signature,                             "I")                                        \
523   template(long_signature,                            "J")                                        \
524   template(short_signature,                           "S")                                        \
525   template(bool_signature,                            "Z")                                        \
526   template(void_signature,                            "V")                                        \
527   template(bool_array_signature,                      "[Z")                                       \
528   template(byte_array_signature,                      "[B")                                       \
529   template(char_array_signature,                      "[C")                                       \
530   template(int_array_signature,                       "[I")                                       \
531   template(long_array_signature,                      "[J")                                       \





532   template(object_void_signature,                     "(Ljava/lang/Object;)V")                    \
533   template(object_int_signature,                      "(Ljava/lang/Object;)I")                    \
534   template(long_object_long_signature,                "(JLjava/lang/Object;)J")                   \
535   template(object_boolean_signature,                  "(Ljava/lang/Object;)Z")                    \
536   template(object_object_signature,                   "(Ljava/lang/Object;)Ljava/lang/Object;")   \
537   template(string_void_signature,                     "(Ljava/lang/String;)V")                    \
538   template(string_int_signature,                      "(Ljava/lang/String;)I")                    \


539   template(throwable_signature,                       "Ljava/lang/Throwable;")                    \
540   template(throwable_void_signature,                  "(Ljava/lang/Throwable;)V")                 \
541   template(void_throwable_signature,                  "()Ljava/lang/Throwable;")                  \
542   template(class_void_signature,                      "(Ljava/lang/Class;)V")                     \
543   template(class_int_signature,                       "(Ljava/lang/Class;)I")                     \
544   template(class_long_signature,                      "(Ljava/lang/Class;)J")                     \
545   template(class_boolean_signature,                   "(Ljava/lang/Class;)Z")                     \
546   template(throwable_throwable_signature,             "(Ljava/lang/Throwable;)Ljava/lang/Throwable;")             \
547   template(throwable_string_void_signature,           "(Ljava/lang/Throwable;Ljava/lang/String;)V")               \
548   template(string_array_void_signature,               "([Ljava/lang/String;)V")                                   \
549   template(string_array_string_array_void_signature,  "([Ljava/lang/String;[Ljava/lang/String;)V")                \
550   template(thread_throwable_void_signature,           "(Ljava/lang/Thread;Ljava/lang/Throwable;)V")               \
551   template(thread_void_signature,                     "(Ljava/lang/Thread;)V")                                    \
552   template(threadgroup_runnable_void_signature,       "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V")           \
553   template(threadgroup_string_void_signature,         "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V")             \
554   template(string_class_signature,                    "(Ljava/lang/String;)Ljava/lang/Class;")                    \
555   template(string_boolean_class_signature,            "(Ljava/lang/String;Z)Ljava/lang/Class;")                   \
556   template(object_object_object_signature,            "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
557   template(string_string_string_signature,            "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;") \
558   template(string_string_signature,                   "(Ljava/lang/String;)Ljava/lang/String;")                   \
559   template(classloader_string_long_signature,         "(Ljava/lang/ClassLoader;Ljava/lang/String;)J")             \
560   template(byte_array_void_signature,                 "([B)V")                                                    \
561   template(char_array_void_signature,                 "([C)V")                                                    \
562   template(int_int_void_signature,                    "(II)V")                                                    \
563   template(long_long_void_signature,                  "(JJ)V")                                                    \

564   template(void_classloader_signature,                "()Ljava/lang/ClassLoader;")                                \
565   template(void_object_signature,                     "()Ljava/lang/Object;")                                     \
566   template(void_class_signature,                      "()Ljava/lang/Class;")                                      \
567   template(void_class_array_signature,                "()[Ljava/lang/Class;")                                     \
568   template(void_string_signature,                     "()Ljava/lang/String;")                                     \
569   template(void_module_signature,                     "()Ljava/lang/Module;")                                     \
570   template(object_array_object_signature,             "([Ljava/lang/Object;)Ljava/lang/Object;")                  \
571   template(object_object_array_object_signature,      "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
572   template(exception_void_signature,                  "(Ljava/lang/Exception;)V")                                 \
573   template(protectiondomain_signature,                "[Ljava/security/ProtectionDomain;")                        \
574   template(accesscontrolcontext_signature,            "Ljava/security/AccessControlContext;")                     \
575   template(class_protectiondomain_signature,          "(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V")     \
576   template(thread_signature,                          "Ljava/lang/Thread;")                                       \

577   template(thread_array_signature,                    "[Ljava/lang/Thread;")                                      \
578   template(threadgroup_signature,                     "Ljava/lang/ThreadGroup;")                                  \
579   template(threadgroup_array_signature,               "[Ljava/lang/ThreadGroup;")                                 \
580   template(class_array_signature,                     "[Ljava/lang/Class;")                                       \
581   template(classloader_signature,                     "Ljava/lang/ClassLoader;")                                  \
582   template(object_signature,                          "Ljava/lang/Object;")                                       \
583   template(object_array_signature,                    "[Ljava/lang/Object;")                                      \
584   template(class_signature,                           "Ljava/lang/Class;")                                        \
585   template(string_signature,                          "Ljava/lang/String;")                                       \
586   template(string_array_signature,                    "[Ljava/lang/String;")                                      \
587   template(reference_signature,                       "Ljava/lang/ref/Reference;")                                \
588   template(referencequeue_signature,                  "Ljava/lang/ref/ReferenceQueue;")                           \

589   template(executable_signature,                      "Ljava/lang/reflect/Executable;")                           \
590   template(module_signature,                          "Ljava/lang/Module;")                                       \
591   template(concurrenthashmap_signature,               "Ljava/util/concurrent/ConcurrentHashMap;")                 \
592   template(String_StringBuilder_signature,            "(Ljava/lang/String;)Ljava/lang/StringBuilder;")            \
593   template(int_StringBuilder_signature,               "(I)Ljava/lang/StringBuilder;")                             \
594   template(char_StringBuilder_signature,              "(C)Ljava/lang/StringBuilder;")                             \
595   template(String_StringBuffer_signature,             "(Ljava/lang/String;)Ljava/lang/StringBuffer;")             \
596   template(int_StringBuffer_signature,                "(I)Ljava/lang/StringBuffer;")                              \
597   template(char_StringBuffer_signature,               "(C)Ljava/lang/StringBuffer;")                              \
598   template(int_String_signature,                      "(I)Ljava/lang/String;")                                    \
599   template(boolean_boolean_int_signature,             "(ZZ)I")                                                    \
600   template(big_integer_shift_worker_signature,        "([I[IIII)V")                                               \
601   template(reflect_method_signature,                  "Ljava/lang/reflect/Method;")                               \
602   template(getStackTrace_signature,                    "()[Ljava/lang/StackTraceElement;")                        \
603                                                                                                                   \
604   /* signature symbols needed by intrinsics */                                                                    \
605   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE)            \
606                                                                                                                   \
607   /* symbol aliases needed by intrinsics */                                                                       \
608   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, do_alias)           \
609                                                                                                                   \
610   /* returned by the C1 compiler in case there's not enough memory to allocate a new symbol*/                     \
611   template(dummy_symbol,                              "illegal symbol")                                           \
612                                                                                                                   \
613   /* used by ClassFormatError when class name is not known yet */                                                 \
614   template(unknown_class_name,                        "<Unknown>")                                                \
615                                                                                                                   \
616   /* JVM monitoring and management support */                                                                     \
617   template(java_lang_StackTraceElement_array,          "[Ljava/lang/StackTraceElement;")                          \
618   template(java_lang_management_ThreadState,           "java/lang/management/ThreadState")                        \
619   template(java_lang_management_MemoryUsage,           "java/lang/management/MemoryUsage")                        \
620   template(java_lang_management_ThreadInfo,            "java/lang/management/ThreadInfo")                         \
621   template(jdk_internal_agent_Agent,                   "jdk/internal/agent/Agent")                                \
622   template(sun_management_Sensor,                      "sun/management/Sensor")                                   \
623   template(sun_management_ManagementFactoryHelper,     "sun/management/ManagementFactoryHelper")                  \
624   template(com_sun_management_internal_DiagnosticCommandImpl,  "com/sun/management/internal/DiagnosticCommandImpl")     \
625   template(com_sun_management_internal_GarbageCollectorExtImpl,"com/sun/management/internal/GarbageCollectorExtImpl")   \
626   template(getDiagnosticCommandMBean_name,             "getDiagnosticCommandMBean")                               \
627   template(getDiagnosticCommandMBean_signature,        "()Lcom/sun/management/DiagnosticCommandMBean;")           \
628   template(getGcInfoBuilder_name,                      "getGcInfoBuilder")                                        \
629   template(getGcInfoBuilder_signature,                 "()Lcom/sun/management/internal/GcInfoBuilder;")           \
630   template(com_sun_management_GcInfo,                  "com/sun/management/GcInfo")                               \
631   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") \
632   template(createGCNotification_name,                  "createGCNotification")                                    \
633   template(createGCNotification_signature,             "(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/sun/management/GcInfo;)V") \
634   template(createDiagnosticFrameworkNotification_name, "createDiagnosticFrameworkNotification")                   \
635   template(trigger_name,                               "trigger")                                                 \
636   template(clear_name,                                 "clear")                                                   \
637   template(trigger_method_signature,                   "(ILjava/lang/management/MemoryUsage;)V")                  \
638   template(startAgent_name,                            "startAgent")                                              \
639   template(startRemoteAgent_name,                      "startRemoteManagementAgent")                              \
640   template(startLocalAgent_name,                       "startLocalManagementAgent")                               \
641   template(stopRemoteAgent_name,                       "stopRemoteManagementAgent")                               \
642   template(getAgentStatus_name,                        "getManagementAgentStatus")                                \
643   template(java_lang_management_ThreadInfo_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V") \
644   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") \
645   template(long_long_long_long_void_signature,         "(JJJJ)V")                                                 \
646   template(finalizer_histogram_klass,                  "java/lang/ref/FinalizerHistogram")                        \
647   template(void_finalizer_histogram_entry_array_signature,  "()[Ljava/lang/ref/FinalizerHistogram$Entry;")                        \
648   template(get_finalizer_histogram_name,               "getFinalizerHistogram")                                   \
649   template(finalizer_histogram_entry_name_field,       "className")                                               \
650   template(finalizer_histogram_entry_count_field,      "instanceCount")                                           \
651                                                                                                                   \
652   template(java_lang_management_MemoryPoolMXBean,      "java/lang/management/MemoryPoolMXBean")                   \
653   template(java_lang_management_MemoryManagerMXBean,   "java/lang/management/MemoryManagerMXBean")                \
654   template(java_lang_management_GarbageCollectorMXBean,"java/lang/management/GarbageCollectorMXBean")             \
655   template(gcInfoBuilder_name,                         "gcInfoBuilder")                                           \
656   template(createMemoryPool_name,                      "createMemoryPool")                                        \
657   template(createMemoryManager_name,                   "createMemoryManager")                                     \
658   template(createGarbageCollector_name,                "createGarbageCollector")                                  \
659   template(createMemoryPool_signature,                 "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMXBean;") \
660   template(createMemoryManager_signature,              "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMXBean;") \
661   template(createGarbageCollector_signature,           "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMXBean;") \
662   template(addThreadDumpForMonitors_name,              "addThreadDumpForMonitors")                                \
663   template(addThreadDumpForSynchronizers_name,         "addThreadDumpForSynchronizers")                           \
664   template(addThreadDumpForMonitors_signature,         "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;[I)V") \
665   template(addThreadDumpForSynchronizers_signature,    "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;)V")   \
666                                                                                                                   \
667   /* JVMTI/java.lang.instrument support and VM Attach mechanism */                                                \
668   template(jdk_internal_module_Modules,                "jdk/internal/module/Modules")                             \
669   template(jdk_internal_vm_VMSupport,                  "jdk/internal/vm/VMSupport")                               \
670   template(addReads_name,                              "addReads")                                                \
671   template(addReads_signature,                         "(Ljava/lang/Module;Ljava/lang/Module;)V")                 \
672   template(addExports_name,                            "addExports")                                              \
673   template(addOpens_name,                              "addOpens")                                                \
674   template(addExports_signature,                       "(Ljava/lang/Module;Ljava/lang/String;Ljava/lang/Module;)V") \
675   template(addUses_name,                               "addUses")                                                 \
676   template(addUses_signature,                          "(Ljava/lang/Module;Ljava/lang/Class;)V")                  \
677   template(addProvides_name,                           "addProvides")                                             \
678   template(addProvides_signature,                      "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
679   template(loadModule_name,                            "loadModule")                                              \
680   template(loadModule_signature,                       "(Ljava/lang/String;)Ljava/lang/Module;")                  \
681   template(transformedByAgent_name,                    "transformedByAgent")                                      \
682   template(transformedByAgent_signature,               "(Ljava/lang/Module;)V")                                   \
683   template(appendToClassPathForInstrumentation_name,   "appendToClassPathForInstrumentation")                     \
684   do_alias(appendToClassPathForInstrumentation_signature, string_void_signature)                                  \
685   template(serializePropertiesToByteArray_name,        "serializePropertiesToByteArray")                          \
686   template(serializePropertiesToByteArray_signature,   "()[B")                                                    \
687   template(serializeAgentPropertiesToByteArray_name,   "serializeAgentPropertiesToByteArray")                     \
688   template(classRedefinedCount_name,                   "classRedefinedCount")                                     \
689   template(classLoader_name,                           "classLoader")                                             \
690   template(componentType_name,                         "componentType")                                           \
691                                                                                                                   \
692   /* forEachRemaining support */                                                                                  \
693   template(java_util_stream_StreamsRangeIntSpliterator,          "java/util/stream/Streams$RangeIntSpliterator")  \
694                                                                                                                   \
695   /* jfr signatures */                                                                                            \
696   JFR_TEMPLATES(template)                                                                                         \
697                                                                                                                   \
698   /* CDS */                                                                                                       \
699   template(dumpSharedArchive,                               "dumpSharedArchive")                                  \
700   template(dumpSharedArchive_signature,                     "(ZLjava/lang/String;)Ljava/lang/String;")            \
701   template(generateLambdaFormHolderClasses,                 "generateLambdaFormHolderClasses")                    \
702   template(generateLambdaFormHolderClasses_signature,       "([Ljava/lang/String;)[Ljava/lang/Object;")           \
703   template(java_lang_invoke_Invokers_Holder,                "java/lang/invoke/Invokers$Holder")                   \
704   template(java_lang_invoke_DirectMethodHandle_Holder,      "java/lang/invoke/DirectMethodHandle$Holder")         \
705   template(java_lang_invoke_LambdaForm_Holder,              "java/lang/invoke/LambdaForm$Holder")                 \
706   template(java_lang_invoke_DelegatingMethodHandle_Holder,  "java/lang/invoke/DelegatingMethodHandle$Holder")     \
707   template(jdk_internal_loader_ClassLoaders,                "jdk/internal/loader/ClassLoaders")                   \
708   template(jdk_internal_misc_CDS,                           "jdk/internal/misc/CDS")                              \
709   template(java_util_concurrent_ConcurrentHashMap,          "java/util/concurrent/ConcurrentHashMap")             \
710   template(java_util_ArrayList,                             "java/util/ArrayList")                                \
711   template(toFileURL_name,                                  "toFileURL")                                          \
712   template(toFileURL_signature,                             "(Ljava/lang/String;)Ljava/net/URL;")                 \
713   template(url_void_signature,                              "(Ljava/net/URL;)V")                                  \
714   template(url_array_classloader_void_signature,            "([Ljava/net/URL;Ljava/lang/ClassLoader;)V")          \
715                                                                                                                   \





716   /*end*/
717 
718 // enum for figuring positions and size of Symbol::_vm_symbols[]
719 enum class vmSymbolID : int {
720   // [FIRST_SID ... LAST_SID] is the iteration range for the *valid* symbols.
721   // NO_SID is used to indicate an invalid symbol. Some implementation code
722   // *may* read _vm_symbols[NO_SID], so it must be a valid array index.
723   NO_SID = 0,                // exclusive lower limit
724 
725   #define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME_(name),
726   VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE)
727   #undef VM_SYMBOL_ENUM
728 
729   SID_LIMIT,                 // exclusive upper limit
730 
731   #define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME_(name) = VM_SYMBOL_ENUM_NAME_(def),
732   VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM)
733   #undef VM_ALIAS_ENUM
734 
735   FIRST_SID = NO_SID + 1,    // inclusive lower limit
736   LAST_SID = SID_LIMIT - 1,  // inclusive upper limit
737 };
738 
739 ENUMERATOR_RANGE(vmSymbolID, vmSymbolID::FIRST_SID, vmSymbolID::LAST_SID)
740 
741 class vmSymbols: AllStatic {
742   friend class vmIntrinsics;
743   friend class VMStructs;
744   friend class JVMCIVMStructs;
745 
746   static const int NO_SID    = static_cast<int>(vmSymbolID::NO_SID);    // exclusive lower limit
747   static const int FIRST_SID = static_cast<int>(vmSymbolID::FIRST_SID); // inclusive lower limit
748   static const int LAST_SID  = static_cast<int>(vmSymbolID::FIRST_SID); // inclusive upper limit
749   static const int SID_LIMIT = static_cast<int>(vmSymbolID::SID_LIMIT); // exclusive upper limit
750 
751  public:
752   static constexpr bool is_valid_id(int id) {
753     return (id >= FIRST_SID && id < SID_LIMIT);
754   }
755   static constexpr bool is_valid_id(vmSymbolID sid) {
756     return is_valid_id(static_cast<int>(sid));
757   }
758 
759   static constexpr vmSymbolID as_SID(int id) {
760     assert(is_valid_id(id), "must be");
761     return static_cast<vmSymbolID>(id);
762   }
763 
764   static constexpr int as_int(vmSymbolID sid) {
765     assert(is_valid_id(sid), "must be");
766     return static_cast<int>(sid);
767   }
768 
769   static constexpr int number_of_symbols() {
770     static_assert(NO_SID == 0, "must be a valid array index");
771     static_assert(FIRST_SID == 1, "must not be the same as NO_SID");
772     return SID_LIMIT;
773   }
774 
775   enum {
776     log2_SID_LIMIT = 11         // checked by an assert at start-up
777   };
778 
779  private:
780 
781   // Field signatures indexed by BasicType.
782   static Symbol* _type_signatures[T_VOID+1];
783 
784  public:
785   // Initialization
786   static void initialize();
787   // Accessing
788   #define VM_SYMBOL_DECLARE(name, ignore)                 \
789     static Symbol* name() {                               \
790       return Symbol::_vm_symbols[static_cast<int>(VM_SYMBOL_ENUM_NAME(name))]; \
791     }
792   VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
793   #undef VM_SYMBOL_DECLARE
794 
795   // Sharing support
796   static void symbols_do(SymbolClosure* f);
797   static void metaspace_pointers_do(MetaspaceClosure *it);
798   static void serialize(SerializeClosure* soc);
799 
800   static Symbol* type_signature(BasicType t) {
801     assert((uint)t < T_VOID+1, "range check");
802     assert(_type_signatures[t] != NULL, "domain check");
803     return _type_signatures[t];
804   }
805 
806   static Symbol* symbol_at(vmSymbolID id) {
807     return Symbol::vm_symbol_at(id);
808   }
809 
810   // Returns symbol's vmSymbolID if one is assigned, else vmSymbolID::NO_SID.
811   static vmSymbolID find_sid(const Symbol* symbol);
812   static vmSymbolID find_sid(const char* symbol_name);
813 
814 #ifndef PRODUCT
815   // No need for this in the product:
816   static const char* name_for(vmSymbolID sid);
817 #endif //PRODUCT
818 };
819 
820 #endif // SHARE_CLASSFILE_VMSYMBOLS_HPP
--- EOF ---