1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
3 <!--
4 Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
5 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
7 This code is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License version 2 only, as
9 published by the Free Software Foundation.
10
11 This code is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 version 2 for more details (a copy is included in the LICENSE file that
15 accompanied this code).
16
17 You should have received a copy of the GNU General Public License version
18 2 along with this work; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 or visit www.oracle.com if you need additional information or have any
23 questions.
24 -->
6829 The module to query.
6830 </description>
6831 </param>
6832 <param id="is_modifiable_module_ptr">
6833 <outptr><jboolean/></outptr>
6834 <description>
6835 On return, points to the boolean result of this function.
6836 </description>
6837 </param>
6838 </parameters>
6839 <errors>
6840 <error id="JVMTI_ERROR_INVALID_MODULE">
6841 If <paramlink id="module"></paramlink> is not a module object.
6842 </error>
6843 </errors>
6844 </function>
6845
6846 </category>
6847
6848 <category id="class" label="Class">
6849
6850 <intro>
6851 </intro>
6852
6853 <function id="GetLoadedClasses" jkernel="yes" num="78">
6854 <synopsis>Get Loaded Classes</synopsis>
6855 <description>
6856 Return an array of all classes loaded in the virtual machine.
6857 The number of classes in the array is returned via
6858 <code>class_count_ptr</code>, and the array itself via
6859 <code>classes_ptr</code>.
6860 <p/>
6861 Array classes of all types (including arrays of primitive types) are
6862 included in the returned list. Primitive classes (for example,
6863 <code>java.lang.Integer.TYPE</code>) are <i>not</i> included in this list.
6864 </description>
6865 <origin>jvmdi</origin>
6866 <capabilities>
6867 </capabilities>
6868 <parameters>
6869 <param id="class_count_ptr">
6870 <outptr><jint/></outptr>
6871 <description>
6872 On return, points to the number of classes.
6873 </description>
6874 </param>
6875 <param id="classes_ptr">
6876 <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
6877 <description>
6878 On return, points to an array of references, one
6879 for each class.
6880 </description>
6881 </param>
6882 </parameters>
6883 <errors>
6884 </errors>
6885 </function>
6886
6887 <function id="GetClassLoaderClasses" jkernel="yes" num="79">
6888 <synopsis>Get Classloader Classes</synopsis>
6889 <description>
6890 Returns an array of those classes for which this class loader has
6891 been recorded as an initiating loader. Each
6892 class in the returned array was created by this class loader,
6893 either by defining it directly or by delegation to another class loader.
6894 See <vmspec chapter="5.3"/>.
6895 <p/>
6896 The number of classes in the array is returned via
6897 <code>class_count_ptr</code>, and the array itself via
6898 <code>classes_ptr</code>.
6899 </description>
6900 <origin>jvmdi</origin>
6901 <capabilities>
6902 </capabilities>
6903 <parameters>
6904 <param id="initiating_loader">
6905 <ptrtype>
6906 <jobject/>
6907 <nullok>the classes initiated by the bootstrap loader will be returned</nullok>
6908 </ptrtype>
6909 <description>
6910 An initiating class loader.
6911 </description>
6912 </param>
6913 <param id="class_count_ptr">
6914 <outptr><jint/></outptr>
6915 <description>
6916 On return, points to the number of classes.
6917 </description>
6918 </param>
6919 <param id="classes_ptr">
6920 <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
6921 <description>
6922 On return, points to an array of references, one
6923 for each class.
6924 </description>
6925 </param>
6926 </parameters>
6927 <errors>
6928 </errors>
6929 </function>
6930
6931 <function id="GetClassSignature" phase="start" num="48">
6932 <synopsis>Get Class Signature</synopsis>
6933 <description>
6934 For the class indicated by <code>klass</code>, return the
6935 <externallink id="jni/types.html#type-signatures">JNI
6936 type signature</externallink>
6937 and the generic signature of the class.
6938 For example, <code>java.util.List</code> is <code>"Ljava/util/List;"</code>
6939 and <code>int[]</code> is <code>"[I"</code>
6940 The returned name for primitive classes
6941 is the type signature character of the corresponding primitive type.
6942 For example, <code>java.lang.Integer.TYPE</code> is <code>"I"</code>.
6943 </description>
6944 <origin>jvmdiClone</origin>
6945 <capabilities>
6946 </capabilities>
6947 <parameters>
6948 <param id="klass">
6949 <jclass/>
6950 <description>
6951 The class to query.
6952 </description>
6953 </param>
6954 <param id="signature_ptr">
6955 <allocbuf>
6956 <char/>
6957 <nullok>the signature is not returned</nullok>
6958 </allocbuf>
6959 <description>
6960 On return, points to the JNI type signature of the class, encoded as a
6961 <internallink id="mUTF">modified UTF-8</internallink> string.
6962 </description>
12695 <param id="jni_env">
12696 <outptr>
12697 <struct>JNIEnv</struct>
12698 </outptr>
12699 <description>
12700 The JNI environment of the event (current) thread.
12701 </description>
12702 </param>
12703 <param id="thread">
12704 <jthread/>
12705 <description>
12706 Thread ending
12707 </description>
12708 </param>
12709 </parameters>
12710 </event>
12711
12712 <event label="Class Load"
12713 id="ClassLoad" const="JVMTI_EVENT_CLASS_LOAD" filtered="thread" phase="start" num="55">
12714 <description>
12715 A class load event is generated when a class is first loaded. The order
12716 of class load events generated by a particular thread are guaranteed
12717 to match the order of class loading within that thread.
12718 Array class creation does not generate a class load event.
12719 The creation of a primitive class (for example, java.lang.Integer.TYPE)
12720 does not generate a class load event.
12721 <p/>
12722 This event is sent at an early stage in loading the class. As
12723 a result the class should be used carefully. Note, for example,
12724 that methods and fields are not yet loaded, so queries for methods,
12725 fields, subclasses, and so on will not give correct results.
12726 See "Loading of Classes and Interfaces" in the <i>Java Language
12727 Specification</i>. For most
12728 purposes the <eventlink id="ClassPrepare"></eventlink> event will
12729 be more useful.
12730 </description>
12731 <origin>jvmdi</origin>
12732 <capabilities>
12733 </capabilities>
12734 <parameters>
12735 <param id="jni_env">
12736 <outptr>
12737 <struct>JNIEnv</struct>
12738 </outptr>
12739 <description>
12740 The JNI environment of the event (current) thread
12741 </description>
12742 </param>
12743 <param id="thread">
12744 <jthread/>
12745 <description>
12746 Thread loading the class
12747 </description>
12748 </param>
12749 <param id="klass">
|
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
3 <!--
4 Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
5 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
7 This code is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License version 2 only, as
9 published by the Free Software Foundation.
10
11 This code is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 version 2 for more details (a copy is included in the LICENSE file that
15 accompanied this code).
16
17 You should have received a copy of the GNU General Public License version
18 2 along with this work; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 or visit www.oracle.com if you need additional information or have any
23 questions.
24 -->
6829 The module to query.
6830 </description>
6831 </param>
6832 <param id="is_modifiable_module_ptr">
6833 <outptr><jboolean/></outptr>
6834 <description>
6835 On return, points to the boolean result of this function.
6836 </description>
6837 </param>
6838 </parameters>
6839 <errors>
6840 <error id="JVMTI_ERROR_INVALID_MODULE">
6841 If <paramlink id="module"></paramlink> is not a module object.
6842 </error>
6843 </errors>
6844 </function>
6845
6846 </category>
6847
6848 <category id="class" label="Class">
6849 <function id="GetLoadedClasses" jkernel="yes" num="78">
6850 <synopsis>Get Loaded Classes</synopsis>
6851 <description>
6852 Return an array of all classes loaded in the virtual machine.
6853 The number of classes in the array is returned via
6854 <code>class_count_ptr</code>, and the array itself via
6855 <code>classes_ptr</code>.
6856 <p/>
6857 A class or interface creation can be triggered by one of the following:
6858 <ul>
6859 <li>By loading and deriving a class from a <code>class</code> file representation
6860 using class loader (see <vmspec chapter="5.3"/>).</li>
6861 <li>By invoking <externallink id="../api/java.base/java/lang/invoke/MethodHandles.Lookup.html#defineHiddenClass(byte[],boolean,java.lang.invoke.MethodHandles.Lookup.ClassOption...)">Lookup::defineHiddenClass</externallink>
6862 that creates a hidden class or interface from a <code>class</code> file representation.</li>
6863 <li>By invoking methods in certain Java SE Platform API such as reflection.</li>
6864 </ul>
6865 <p/>
6866 An array class is created directly by Java virtual machine. An array class
6867 creation can be triggered by using class loaders or by invoking methods in certain
6868 Java SE Platform API such as reflection.
6869 <p/>
6870 The returned list includes all classes and interfaces, including
6871 <externallink id="../api/java.base/java/lang/Class.html#isHidden()">
6872 hidden classes or interfaces</externallink>,
6873 and also array classes of all types
6874 (including arrays of primitive types).
6875 Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) are
6876 <i>not</i> included in the returned list.
6877 </description>
6878 <origin>jvmdi</origin>
6879 <capabilities>
6880 </capabilities>
6881 <parameters>
6882 <param id="class_count_ptr">
6883 <outptr><jint/></outptr>
6884 <description>
6885 On return, points to the number of classes.
6886 </description>
6887 </param>
6888 <param id="classes_ptr">
6889 <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
6890 <description>
6891 On return, points to an array of references, one
6892 for each class.
6893 </description>
6894 </param>
6895 </parameters>
6896 <errors>
6897 </errors>
6898 </function>
6899
6900 <function id="GetClassLoaderClasses" jkernel="yes" num="79">
6901 <synopsis>Get Classloader Classes</synopsis>
6902 <description>
6903 Returns an array of all classes which this class loader
6904 can find by name via
6905 <externallink id="../api/java.base/java/lang/ClassLoader.html#loadClass(java.lang.String,boolean)">ClassLoader::loadClass</externallink>,
6906 <externallink id="../api/java.base/java/lang/Class.html#forName(java.lang.String,boolean,java.lang.ClassLoader)">Class::forName</externallink> and bytecode linkage.
6907 That is, <code>initiating_loader</code>
6908 has been recorded as an initiating loader of the returned classes.
6909 Each class in the returned array was created by this class loader,
6910 either by defining it directly or by delegation to another class loader.
6911 See <vmspec chapter="5.3"/>.
6912 <p/>
6913 The returned list does not include
6914 <externallink id="../api/java.base/java/lang/Class.html#isHidden()">hidden
6915 classes or interfaces</externallink> created by
6916 the invocation of <externallink id="../api/java.base/java/lang/invoke/MethodHandles.Lookup.html#defineHiddenClass(byte[],boolean,java.lang.invoke.MethodHandles.Lookup.ClassOption...)">Lookup::defineHiddenClass</externallink> because:
6917 <ul>
6918 <li>A hidden class or interface cannot be referenced by the constant pools
6919 of other classes and interfaces.</li>
6920 <li>A hidden class or interface cannot be discovered by any class loader
6921 including its defining loader.</li>
6922 </ul>
6923 In addition, the returned list does not include array classes whose
6924 element type is a hidden class or interface as they cannot not be discovered
6925 by any class loader.
6926 <p/>
6927 The number of classes in the array is returned via
6928 <code>class_count_ptr</code>, and the array itself via
6929 <code>classes_ptr</code>.
6930 </description>
6931 <origin>jvmdi</origin>
6932 <capabilities>
6933 </capabilities>
6934 <parameters>
6935 <param id="initiating_loader">
6936 <ptrtype>
6937 <jobject/>
6938 <nullok>the classes initiated by the bootstrap loader will be returned</nullok>
6939 </ptrtype>
6940 <description>
6941 An initiating class loader.
6942 </description>
6943 </param>
6944 <param id="class_count_ptr">
6945 <outptr><jint/></outptr>
6946 <description>
6947 On return, points to the number of classes.
6948 </description>
6949 </param>
6950 <param id="classes_ptr">
6951 <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
6952 <description>
6953 On return, points to an array of references, one
6954 for each class.
6955 </description>
6956 </param>
6957 </parameters>
6958 <errors>
6959 </errors>
6960 </function>
6961
6962 <function id="GetClassSignature" phase="start" num="48">
6963 <synopsis>Get Class Signature</synopsis>
6964 <description>
6965 Return the name and the generic signature of the class indicated by <code>klass</code>.
6966 <p/>
6967 If the class indicated by <code>klass</code> is a class or interface, then:
6968 <ul>
6969 <li>If the class or interface is not <externallink id="../api/java.base/java/lang/Class.html#isHidden()">hidden</externallink>,
6970 then the returned name is <externallink id="jni/types.html#type-signatures">
6971 JNI type signature</externallink>.
6972 For example, java.util.List is "Ljava/util/List;"
6973 </li>
6974 <li>If the class or interface is <externallink id="../api/java.base/java/lang/Class.html#isHidden()">hidden</externallink>,
6975 then the returned name is a string of the form:
6976 <code>"L" + N + ";" + "/" + S</code>
6977 where <code>N</code> is the binary name encoded in internal form
6978 indicated by the <code>class</code> file passed to
6979 <externallink id="../api/java.base/java/lang/invoke/MethodHandles.Lookup.html#defineHiddenClass(byte[],boolean,java.lang.invoke.MethodHandles.Lookup.ClassOption...)">Lookup::defineHiddenClass</externallink>,
6980 and <code>S</code> is an unqualified name.
6981 The returned name is not a valid type descriptor.
6982 </li>
6983 </ul>
6984 <p/>
6985 If the class indicated by <code>klass</code> represents an array class, then
6986 the returned name is a string consisting of one or more "<code>[</code>" characters
6987 representing the depth of the array nesting, followed by the class signature
6988 of the element type. For example the class signature of java.lang.String[] is
6989 "[Ljava/lang/String;" and that of int[] is "[I".
6990 <p/>
6991 If the class indicated by <code>klass</code> represents primitive type or <code>void</code>,
6992 then the returned name is the <externallink id="jni/types.html#type-signatures">
6993 type signature character of the corresponding primitive type</externallink>.
6994 For example, java.lang.Integer.TYPE is "I".
6995 </description>
6996 <origin>jvmdiClone</origin>
6997 <capabilities>
6998 </capabilities>
6999 <parameters>
7000 <param id="klass">
7001 <jclass/>
7002 <description>
7003 The class to query.
7004 </description>
7005 </param>
7006 <param id="signature_ptr">
7007 <allocbuf>
7008 <char/>
7009 <nullok>the signature is not returned</nullok>
7010 </allocbuf>
7011 <description>
7012 On return, points to the JNI type signature of the class, encoded as a
7013 <internallink id="mUTF">modified UTF-8</internallink> string.
7014 </description>
12747 <param id="jni_env">
12748 <outptr>
12749 <struct>JNIEnv</struct>
12750 </outptr>
12751 <description>
12752 The JNI environment of the event (current) thread.
12753 </description>
12754 </param>
12755 <param id="thread">
12756 <jthread/>
12757 <description>
12758 Thread ending
12759 </description>
12760 </param>
12761 </parameters>
12762 </event>
12763
12764 <event label="Class Load"
12765 id="ClassLoad" const="JVMTI_EVENT_CLASS_LOAD" filtered="thread" phase="start" num="55">
12766 <description>
12767 A class load event is generated when a class or interface is created.
12768 A class or interface is created by one of the following:
12769 <ul>
12770 <li>By loading and deriving a class from a <code>class</code> file representation
12771 using class loader.</li>
12772 <li>By invoking <externallink id="../api/java.base/java/lang/invoke/MethodHandles.Lookup.html#defineHiddenClass(byte[],boolean,java.lang.invoke.MethodHandles.Lookup.ClassOption...)">Lookup::defineHiddenClass</externallink>,
12773 that creates a hidden class or interface from a <code>class</code> file representation.</li>
12774 <li>By invoking methods in certain Java SE Platform API such as reflection.</li>
12775 </ul>
12776 <p/>
12777 Array class creation does not generate a class load event.
12778 The creation of a primitive class (for example, java.lang.Integer.TYPE)
12779 does not generate a class load event.
12780 <p/>
12781 The order of class load events generated by a particular thread is guaranteed
12782 to match the order of class loading within that thread.
12783 <p/>
12784 This event is sent at an early stage in loading the class. As
12785 a result the class should be used carefully. Note, for example,
12786 that methods and fields are not yet loaded, so queries for methods,
12787 fields, subclasses, and so on will not give correct results.
12788 See "Loading of Classes and Interfaces" in the <i>Java Language
12789 Specification</i>. For most
12790 purposes the <eventlink id="ClassPrepare"></eventlink> event will
12791 be more useful.
12792 <p/>
12793 See <functionlink id="GetLoadedClasses">GetLoadedClasses</functionlink>.
12794 </description>
12795 <origin>jvmdi</origin>
12796 <capabilities>
12797 </capabilities>
12798 <parameters>
12799 <param id="jni_env">
12800 <outptr>
12801 <struct>JNIEnv</struct>
12802 </outptr>
12803 <description>
12804 The JNI environment of the event (current) thread
12805 </description>
12806 </param>
12807 <param id="thread">
12808 <jthread/>
12809 <description>
12810 Thread loading the class
12811 </description>
12812 </param>
12813 <param id="klass">
|