annotate src/share/vm/prims/jvmtiEnv.xsl @ 614:3db67f76d308

Merge
author acorn
date Thu, 05 Mar 2009 22:07:29 -0500
parents a61af66fc99e
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 <?xml version="1.0"?>
a61af66fc99e Initial load
duke
parents:
diff changeset
2 <!--
a61af66fc99e Initial load
duke
parents:
diff changeset
3 Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
5
a61af66fc99e Initial load
duke
parents:
diff changeset
6 This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
7 under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
8 published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
9
a61af66fc99e Initial load
duke
parents:
diff changeset
10 This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
13 version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
14 accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
15
a61af66fc99e Initial load
duke
parents:
diff changeset
16 You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
17 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
19
a61af66fc99e Initial load
duke
parents:
diff changeset
20 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
21 CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
22 have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
23
a61af66fc99e Initial load
duke
parents:
diff changeset
24 -->
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 <xsl:import href="jvmtiLib.xsl"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 <xsl:template match="/">
a61af66fc99e Initial load
duke
parents:
diff changeset
33 <xsl:apply-templates select="specification"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
34 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 <xsl:template match="specification">
a61af66fc99e Initial load
duke
parents:
diff changeset
37 <xsl:call-template name="sourceHeader"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
38 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # include "incls/_precompiled.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
40 # include "incls/_jvmtiEnv.cpp.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // end file prefix - do not modify or remove this line
a61af66fc99e Initial load
duke
parents:
diff changeset
43 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
44 <xsl:apply-templates select="functionsection"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
45 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
46
a61af66fc99e Initial load
duke
parents:
diff changeset
47 <xsl:template match="functionsection">
a61af66fc99e Initial load
duke
parents:
diff changeset
48 <xsl:apply-templates select="category"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
49 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 <xsl:template match="category">
a61af66fc99e Initial load
duke
parents:
diff changeset
52 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
53 //
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions
a61af66fc99e Initial load
duke
parents:
diff changeset
55 //
a61af66fc99e Initial load
duke
parents:
diff changeset
56 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
57 <xsl:apply-templates select="function[not(contains(@impl,'unimpl'))]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
58 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 <xsl:template match="function">
a61af66fc99e Initial load
duke
parents:
diff changeset
61 <xsl:apply-templates select="parameters" mode="advice"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
62 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
63 jvmtiError
a61af66fc99e Initial load
duke
parents:
diff changeset
64 JvmtiEnv::</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
65 <xsl:if test="count(@hide)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
66 <xsl:value-of select="@hide"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
67 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
68 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
69 <xsl:text>(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
70 <xsl:apply-templates select="parameters" mode="HotSpotSig"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
71 <xsl:text>) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
72 <xsl:for-each select="parameters/param/jclass">
a61af66fc99e Initial load
duke
parents:
diff changeset
73 <xsl:if test="count(@method|@field)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
74 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
75 if (java_lang_Class::is_primitive(k_mirror)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 // DO PRIMITIVE CLASS PROCESSING
a61af66fc99e Initial load
duke
parents:
diff changeset
77 return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 }
a61af66fc99e Initial load
duke
parents:
diff changeset
79 klassOop k_oop = java_lang_Class::as_klassOop(k_mirror);
a61af66fc99e Initial load
duke
parents:
diff changeset
80 if (k_oop == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
81 return JVMTI_ERROR_INVALID_CLASS;
a61af66fc99e Initial load
duke
parents:
diff changeset
82 }</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
83 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
84 </xsl:for-each>
a61af66fc99e Initial load
duke
parents:
diff changeset
85 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
86 return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
a61af66fc99e Initial load
duke
parents:
diff changeset
87 } /* end </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
88 <xsl:if test="count(@hide)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
89 <xsl:value-of select="@hide"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
90 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
91 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
92 <xsl:text> */
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
95 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 <!-- ======== ADVICE ======== -->
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 <xsl:template match="parameters" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
101 <xsl:apply-templates select="param" mode="advice"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
102 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 <xsl:template match="param" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
105 <xsl:apply-templates select="child::*[position()=1]" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
106 <xsl:with-param name="name" select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
107 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
108 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 <xsl:template match="jthread" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
111 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
112 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
113 <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
114 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
115 // Threads_lock NOT held, java_thread not protected by lock
a61af66fc99e Initial load
duke
parents:
diff changeset
116 // java_thread - pre-checked</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
117 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
118 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
119 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
120 // Threads_lock NOT held
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
122 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
123 <xsl:text> - NOT pre-checked</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
124 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
125 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
126 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
127
a61af66fc99e Initial load
duke
parents:
diff changeset
128 <xsl:template match="jrawMonitorID" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
129 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
130 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // rmonitor - pre-checked for validity</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
132 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 <xsl:template match="jframeID" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
135 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
136 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
137 // java_thread - unchecked
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // depth - pre-checked as non-negative</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
139 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
140
a61af66fc99e Initial load
duke
parents:
diff changeset
141 <xsl:template match="jmethodID" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
142 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
143 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
144 // method_oop - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
145 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 <xsl:template match="jfieldID" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
148 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
149 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 <xsl:template match="jclass" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
152 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
153 <!--
a61af66fc99e Initial load
duke
parents:
diff changeset
154 classes passed as part of a class/method or class/field pair are used
a61af66fc99e Initial load
duke
parents:
diff changeset
155 by the wrapper to get the internal type but are not needed by nor
a61af66fc99e Initial load
duke
parents:
diff changeset
156 passed to the implementation layer.
a61af66fc99e Initial load
duke
parents:
diff changeset
157 -->
a61af66fc99e Initial load
duke
parents:
diff changeset
158 <xsl:if test="count(@method|@field)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
159 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // k_mirror - may be primitive, this must be checked</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
161 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
162 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 <xsl:template match="nullok" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
165 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 <xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
168 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
169 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
170 <xsl:when test="count(nullok)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
171 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
172 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
173 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
174 <xsl:text> - pre-checked for NULL</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
175 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
176 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
177 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
178 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
179 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
180 <xsl:text> - NULL is a valid value, must be checked</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
181 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
182 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
183 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 <xsl:template match="jint" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
186 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
187 <xsl:if test="count(@min)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
188 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
190 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
191 <xsl:text> - pre-checked to be greater than or equal to </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
192 <xsl:value-of select="@min"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
193 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
194 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 <xsl:template match="jobject|jvalue|jthreadGroup|enum|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct" mode="advice">
a61af66fc99e Initial load
duke
parents:
diff changeset
197 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
198 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 </xsl:stylesheet>