annotate src/share/vm/prims/jvmtiEnter.xsl @ 20543:e7d0505c8a30

8059758: Footprint regressions with JDK-8038423 Summary: Changes in JDK-8038423 always initialize (zero out) virtual memory used for auxiliary data structures. This causes a footprint regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything. Reviewed-by: jwilhelm, brutisso
author tschatzl
date Fri, 10 Oct 2014 15:51:58 +0200
parents 78bbf4d43a14
children 52b4284cb496
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 <!--
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
3 Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
0
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
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1142
diff changeset
20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1142
diff changeset
21 or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1142
diff changeset
22 questions.
0
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:param name="trace"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
33 <xsl:param name="interface"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
34
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>
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
39 # include "precompiled.hpp"
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 6725
diff changeset
40 # include "utilities/macros.hpp"
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 6725
diff changeset
41 #if INCLUDE_JVMTI
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
42 # include "prims/jvmtiEnter.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
43 # include "prims/jvmtiRawMonitor.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
44 # include "prims/jvmtiUtil.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
45
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
46 // There are known-bad format/arg pairings in the code generated by this file.
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
47 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 17467
diff changeset
48
0
a61af66fc99e Initial load
duke
parents:
diff changeset
49 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 <xsl:if test="$trace = 'Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
52 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
53 #ifdef JVMTI_TRACE
a61af66fc99e Initial load
duke
parents:
diff changeset
54 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
55 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 <xsl:if test="$trace != 'Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
58 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 // Error names
a61af66fc99e Initial load
duke
parents:
diff changeset
61 const char* JvmtiUtil::_error_names[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
62 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
63 <xsl:call-template name="fillEntityName">
a61af66fc99e Initial load
duke
parents:
diff changeset
64 <xsl:with-param name="entities" select="errorsection/errorcategory/errorid"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
65 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
66 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
67 };
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // Event threaded
a61af66fc99e Initial load
duke
parents:
diff changeset
71 const bool JvmtiUtil::_event_threaded[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
72 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
73 <xsl:call-template name="fillEventThreaded">
a61af66fc99e Initial load
duke
parents:
diff changeset
74 <xsl:with-param name="entities" select="eventsection/event"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
75 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
76 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
77 };
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
80 <xsl:call-template name="eventCapabilitiesTest"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
81 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 <xsl:if test="$trace = 'Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 <!-- all this just to return the highest event number -->
a61af66fc99e Initial load
duke
parents:
diff changeset
86 <xsl:variable name="maxEvent">
a61af66fc99e Initial load
duke
parents:
diff changeset
87 <xsl:for-each select="eventsection/event">
a61af66fc99e Initial load
duke
parents:
diff changeset
88 <xsl:variable name="mynum" select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
89 <xsl:if test="count(../../eventsection/event[@num &gt; $mynum]) = 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
90 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
91 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
92 </xsl:for-each>
a61af66fc99e Initial load
duke
parents:
diff changeset
93 </xsl:variable>
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 <xsl:text>jbyte JvmtiTrace::_event_trace_flags[</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
96 <xsl:value-of select="1+$maxEvent"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
97 <xsl:text>];
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 jint JvmtiTrace::_max_event_index = </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
100 <xsl:value-of select="$maxEvent"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
101 <xsl:text>;
a61af66fc99e Initial load
duke
parents:
diff changeset
102
a61af66fc99e Initial load
duke
parents:
diff changeset
103 // Event names
a61af66fc99e Initial load
duke
parents:
diff changeset
104 const char* JvmtiTrace::_event_names[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
105 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
106 <xsl:call-template name="fillEntityName">
a61af66fc99e Initial load
duke
parents:
diff changeset
107 <xsl:with-param name="entities" select="eventsection/event"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
108 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
109 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
110 };
a61af66fc99e Initial load
duke
parents:
diff changeset
111 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
112 <xsl:apply-templates select="//constants[@kind='enum']"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
113 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
114 <xsl:apply-templates select="functionsection"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
117 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
118 #endif /*JVMTI_TRACE */
a61af66fc99e Initial load
duke
parents:
diff changeset
119 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
120 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 <xsl:template match="constants">
a61af66fc99e Initial load
duke
parents:
diff changeset
125 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
128 <xsl:value-of select="@label"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
129 <xsl:text> names
a61af66fc99e Initial load
duke
parents:
diff changeset
130 const char* </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
131 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
132 <xsl:text>ConstantNames[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
133 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
134 <xsl:apply-templates select="constant" mode="constname"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
135 <xsl:text> NULL
a61af66fc99e Initial load
duke
parents:
diff changeset
136 };
a61af66fc99e Initial load
duke
parents:
diff changeset
137
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
139 <xsl:value-of select="@label"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
140 <xsl:text> value
a61af66fc99e Initial load
duke
parents:
diff changeset
141 jint </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
142 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
143 <xsl:text>ConstantValues[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
144 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
145 <xsl:apply-templates select="constant" mode="constvalue"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
146 <xsl:text> 0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 };
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
150 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 <xsl:template match="constant" mode="constname">
a61af66fc99e Initial load
duke
parents:
diff changeset
153 <xsl:text> "</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
154 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
155 <xsl:text>",
a61af66fc99e Initial load
duke
parents:
diff changeset
156 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
157 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 <xsl:template match="constant" mode="constvalue">
a61af66fc99e Initial load
duke
parents:
diff changeset
160 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
161 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
162 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
163 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
164 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 <xsl:template name="eventCapabilitiesTest">
a61af66fc99e Initial load
duke
parents:
diff changeset
167 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
168
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // Check Event Capabilities
a61af66fc99e Initial load
duke
parents:
diff changeset
170 const bool JvmtiUtil::has_event_capability(jvmtiEvent event_type, const jvmtiCapabilities* capabilities_ptr) {
a61af66fc99e Initial load
duke
parents:
diff changeset
171 switch (event_type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
172 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
173 <xsl:for-each select="//eventsection/event">
a61af66fc99e Initial load
duke
parents:
diff changeset
174 <xsl:variable name="capa" select="capabilities/required"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
175 <xsl:if test="count($capa)">
a61af66fc99e Initial load
duke
parents:
diff changeset
176 <xsl:text> case </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
177 <xsl:value-of select="@const"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
178 <xsl:text>:
a61af66fc99e Initial load
duke
parents:
diff changeset
179 return capabilities_ptr-&gt;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
180 <xsl:value-of select="$capa/@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
181 <xsl:text> != 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
182 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
183 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
184 </xsl:for-each>
a61af66fc99e Initial load
duke
parents:
diff changeset
185 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // if it does not have a capability it is required
a61af66fc99e Initial load
duke
parents:
diff changeset
187 return JNI_TRUE;
a61af66fc99e Initial load
duke
parents:
diff changeset
188 }
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
191 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
192
a61af66fc99e Initial load
duke
parents:
diff changeset
193 <xsl:template match="functionsection">
a61af66fc99e Initial load
duke
parents:
diff changeset
194 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 <!-- all this just to return the highest function number -->
a61af66fc99e Initial load
duke
parents:
diff changeset
197 <xsl:variable name="maxFunction">
a61af66fc99e Initial load
duke
parents:
diff changeset
198 <xsl:for-each select="category/function">
a61af66fc99e Initial load
duke
parents:
diff changeset
199 <xsl:variable name="mynum" select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
200 <xsl:if test="count(../../category/function[@num &gt; $mynum]) = 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
201 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
202 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
203 </xsl:for-each>
a61af66fc99e Initial load
duke
parents:
diff changeset
204 </xsl:variable>
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 <xsl:text>jbyte JvmtiTrace::_trace_flags[</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
207 <xsl:value-of select="1+$maxFunction"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
208 <xsl:text>];
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 jint JvmtiTrace::_max_function_index = </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
211 <xsl:value-of select="$maxFunction"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
212 <xsl:text>;
a61af66fc99e Initial load
duke
parents:
diff changeset
213
a61af66fc99e Initial load
duke
parents:
diff changeset
214 // Function names
a61af66fc99e Initial load
duke
parents:
diff changeset
215 const char* JvmtiTrace::_function_names[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
216 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
217 <xsl:call-template name="fillEntityName">
a61af66fc99e Initial load
duke
parents:
diff changeset
218 <xsl:with-param name="entities" select="category/function"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
219 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
220 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
221 };
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // Exclude list
a61af66fc99e Initial load
duke
parents:
diff changeset
224 short JvmtiTrace::_exclude_functions[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
225 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
226 <xsl:apply-templates select="category/function" mode="notrace">
a61af66fc99e Initial load
duke
parents:
diff changeset
227 <xsl:sort select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
228 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
229 <xsl:text>0
a61af66fc99e Initial load
duke
parents:
diff changeset
230 };
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
233 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
234
a61af66fc99e Initial load
duke
parents:
diff changeset
235 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
236 extern "C" {
a61af66fc99e Initial load
duke
parents:
diff changeset
237
a61af66fc99e Initial load
duke
parents:
diff changeset
238 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
239 <xsl:apply-templates select="category" mode="wrapper"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
240 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
241 } /* end extern "C" */
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 // JVMTI API functions
a61af66fc99e Initial load
duke
parents:
diff changeset
244 struct jvmtiInterface_1_ jvmti</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
245 <xsl:value-of select="$trace"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
246 <xsl:text>_Interface = {
a61af66fc99e Initial load
duke
parents:
diff changeset
247 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
248
a61af66fc99e Initial load
duke
parents:
diff changeset
249 <xsl:call-template name="fillFuncStruct">
a61af66fc99e Initial load
duke
parents:
diff changeset
250 <xsl:with-param name="funcs" select="category/function[count(@hide)=0]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
251 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
254 };
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 6725
diff changeset
255 #endif // INCLUDE_JVMTI
0
a61af66fc99e Initial load
duke
parents:
diff changeset
256 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
257 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
258
a61af66fc99e Initial load
duke
parents:
diff changeset
259 <xsl:template match="function" mode="functionid">
a61af66fc99e Initial load
duke
parents:
diff changeset
260 <xsl:text>jvmti</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
261 <xsl:value-of select="$trace"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
262 <xsl:text>_</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
263 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
264 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
265
a61af66fc99e Initial load
duke
parents:
diff changeset
266 <xsl:template name="fillFuncStructDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
267 <xsl:param name="func"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
268 <xsl:param name="index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
269 <xsl:text> /* </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
270 <xsl:number value="$index" format=" 1"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
271 <xsl:text> : </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
272 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
273 <xsl:when test="count($func)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
274 <xsl:value-of select="$func/synopsis"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
275 <xsl:text> */
a61af66fc99e Initial load
duke
parents:
diff changeset
276 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
277 <xsl:apply-templates select="$func" mode="functionid"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
278 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
279 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
280 <xsl:text> RESERVED */
a61af66fc99e Initial load
duke
parents:
diff changeset
281 NULL</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
282 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
283 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
284 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
285
a61af66fc99e Initial load
duke
parents:
diff changeset
286 <!-- generic function iterator applied to the function structure -->
a61af66fc99e Initial load
duke
parents:
diff changeset
287 <xsl:template name="fillFuncStruct">
a61af66fc99e Initial load
duke
parents:
diff changeset
288 <xsl:param name="funcs"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
289 <xsl:param name="index" select="1"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
290 <xsl:call-template name="fillFuncStructDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
291 <xsl:with-param name="func" select="$funcs[@num=$index]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
292 <xsl:with-param name="index" select="$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
293 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
294 <xsl:if test="count($funcs[@num &gt; $index]) &gt; 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
295 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
296 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
297 <xsl:call-template name="fillFuncStruct">
a61af66fc99e Initial load
duke
parents:
diff changeset
298 <xsl:with-param name="funcs" select="$funcs"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
299 <xsl:with-param name="index" select="1+$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
300 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
301 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
302 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
303
a61af66fc99e Initial load
duke
parents:
diff changeset
304 <xsl:template name="fillEntityNameDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
305 <xsl:param name="entity"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
306 <xsl:param name="index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
307 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
308 <xsl:when test="count($entity) &gt; 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
309 <xsl:text> "</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
310 <xsl:value-of select="$entity[position()=1]/@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
311 <xsl:text>"</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
312 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
313 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
314 <xsl:text> NULL</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
315 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
316 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
317 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
318
a61af66fc99e Initial load
duke
parents:
diff changeset
319 <!-- generic entity (with id and num) iterator applied to entity names -->
a61af66fc99e Initial load
duke
parents:
diff changeset
320 <xsl:template name="fillEntityName">
a61af66fc99e Initial load
duke
parents:
diff changeset
321 <xsl:param name="entities"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
322 <xsl:param name="index" select="0"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
323 <xsl:call-template name="fillEntityNameDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
324 <xsl:with-param name="entity" select="$entities[@num=$index]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
325 <xsl:with-param name="index" select="$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
326 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
327 <xsl:if test="count($entities[@num &gt; $index]) &gt; 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
328 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
329 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
330 <xsl:call-template name="fillEntityName">
a61af66fc99e Initial load
duke
parents:
diff changeset
331 <xsl:with-param name="entities" select="$entities"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
332 <xsl:with-param name="index" select="1+$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
333 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
334 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
335 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
336
a61af66fc99e Initial load
duke
parents:
diff changeset
337 <xsl:template name="fillEventThreadedDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
338 <xsl:param name="entity"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
339 <xsl:param name="index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
340 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
341 <xsl:when test="count($entity) &gt; 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
342 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
343 <xsl:when test="count($entity[position()=1]/@filtered)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
344 <xsl:text> false</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
345 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
346 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
347 <xsl:text> true</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
348 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
349 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
350 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
351 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
352 <xsl:text> false</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
353 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
354 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
355 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
356
a61af66fc99e Initial load
duke
parents:
diff changeset
357
a61af66fc99e Initial load
duke
parents:
diff changeset
358 <xsl:template name="fillEventThreaded">
a61af66fc99e Initial load
duke
parents:
diff changeset
359 <xsl:param name="entities"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
360 <xsl:param name="index" select="0"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
361 <xsl:call-template name="fillEventThreadedDoit">
a61af66fc99e Initial load
duke
parents:
diff changeset
362 <xsl:with-param name="entity" select="$entities[@num=$index]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
363 <xsl:with-param name="index" select="$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
364 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
365 <xsl:if test="count($entities[@num &gt; $index]) &gt; 0">
a61af66fc99e Initial load
duke
parents:
diff changeset
366 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
367 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
368 <xsl:call-template name="fillEventThreaded">
a61af66fc99e Initial load
duke
parents:
diff changeset
369 <xsl:with-param name="entities" select="$entities"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
370 <xsl:with-param name="index" select="1+$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
371 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
372 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
373 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
374
a61af66fc99e Initial load
duke
parents:
diff changeset
375 <xsl:template match="function" mode="notrace">
a61af66fc99e Initial load
duke
parents:
diff changeset
376 <xsl:if test="count(@impl)=1 and contains(@impl,'notrace')">
a61af66fc99e Initial load
duke
parents:
diff changeset
377 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
378 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
379 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
380 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
381 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
382
a61af66fc99e Initial load
duke
parents:
diff changeset
383 <xsl:template match="category" mode="wrapper">
a61af66fc99e Initial load
duke
parents:
diff changeset
384 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
385 //
a61af66fc99e Initial load
duke
parents:
diff changeset
386 // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions
a61af66fc99e Initial load
duke
parents:
diff changeset
387 //
a61af66fc99e Initial load
duke
parents:
diff changeset
388 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
389 <xsl:apply-templates select="function[count(@hide)=0]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
390 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
391
a61af66fc99e Initial load
duke
parents:
diff changeset
392 <xsl:template match="function" mode="transition">
a61af66fc99e Initial load
duke
parents:
diff changeset
393 <xsl:param name="space">
a61af66fc99e Initial load
duke
parents:
diff changeset
394 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
395 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
396 </xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
397 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
398
a61af66fc99e Initial load
duke
parents:
diff changeset
399 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
400 <xsl:when test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
401 <xsl:text>if (this_thread == NULL || !this_thread->is_Java_thread()) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
402 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
403 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
404 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
405 <xsl:when test="count(@phase)=0 or contains(@phase,'live') or contains(@phase,'start')">
a61af66fc99e Initial load
duke
parents:
diff changeset
406 <xsl:text>if (this_thread == NULL || (!this_thread->is_Java_thread() &amp;&amp; !this_thread->is_VM_thread())) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
407 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
408 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
409 <xsl:text>if (!this_thread->is_Java_thread()) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
410 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
411 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
412 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
413 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
414
a61af66fc99e Initial load
duke
parents:
diff changeset
415 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
416 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
417 <xsl:text> if (trace_flags) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
418 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
419 <xsl:text> tty->print_cr("JVMTI [non-attached thread] %s %s", func_name,</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
420 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
421 <xsl:text> JvmtiUtil::error_name(JVMTI_ERROR_UNATTACHED_THREAD));</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
422 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
423 <xsl:text> }</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
424 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
425 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
426 <xsl:text> return JVMTI_ERROR_UNATTACHED_THREAD;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
427 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
428 <xsl:text>}</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
429 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
430 <xsl:if test="count(@impl)=0 or not(contains(@impl,'innative'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
431 <xsl:text>JavaThread* current_thread = (JavaThread*)this_thread;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
432 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
433 <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
434 <xsl:value-of select="$space"/>
4045
a6eef545f1a2 7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
never
parents: 1972
diff changeset
435 <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
436 <xsl:apply-templates select="." mode="functionid"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
437 <xsl:text> , current_thread)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
438 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
439 <xsl:text>debug_only(VMNativeEntryWrapper __vew;)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
440 <xsl:if test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
441 <xsl:value-of select="$space"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
442 <xsl:text>CautiouslyPreserveExceptionMark __em(this_thread);</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
443 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
444 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
445 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
446
a61af66fc99e Initial load
duke
parents:
diff changeset
447
a61af66fc99e Initial load
duke
parents:
diff changeset
448 <xsl:template match="required">
a61af66fc99e Initial load
duke
parents:
diff changeset
449 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
450 if (jvmti_env-&gt;get_capabilities()-&gt;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
451 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
452 <xsl:text> == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
453 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
454 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
455 <xsl:text> if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
456 tty->print_cr("JVMTI [%s] %s %s", curr_thread_name, func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
457 JvmtiUtil::error_name(JVMTI_ERROR_MUST_POSSESS_CAPABILITY));
a61af66fc99e Initial load
duke
parents:
diff changeset
458 }
a61af66fc99e Initial load
duke
parents:
diff changeset
459 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
460 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
461 <xsl:text> return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
a61af66fc99e Initial load
duke
parents:
diff changeset
462 }
a61af66fc99e Initial load
duke
parents:
diff changeset
463 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
464 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
465
a61af66fc99e Initial load
duke
parents:
diff changeset
466
a61af66fc99e Initial load
duke
parents:
diff changeset
467 <xsl:template match="function">
a61af66fc99e Initial load
duke
parents:
diff changeset
468 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
469 static jvmtiError JNICALL
a61af66fc99e Initial load
duke
parents:
diff changeset
470 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
471 <xsl:apply-templates select="." mode="functionid"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
472 <xsl:text>(jvmtiEnv* env</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
473 <xsl:apply-templates select="parameters" mode="signature"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
474 <xsl:text>) {
a61af66fc99e Initial load
duke
parents:
diff changeset
475 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
476
a61af66fc99e Initial load
duke
parents:
diff changeset
477 <xsl:if test="not(contains(@jkernel,'yes'))">
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 6725
diff changeset
478 <xsl:text>&#xA;#if !INCLUDE_JVMTI &#xA;</xsl:text>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
479 <xsl:text> return JVMTI_ERROR_NOT_AVAILABLE; &#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
480 <xsl:text>#else &#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
481 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
482
a61af66fc99e Initial load
duke
parents:
diff changeset
483 <xsl:apply-templates select="." mode="traceSetUp"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
484 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
485 <xsl:when test="count(@phase)=0 or contains(@phase,'live')">
a61af66fc99e Initial load
duke
parents:
diff changeset
486 <xsl:text> if(!JvmtiEnv::is_vm_live()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
487 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
488 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
489 <xsl:text> if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
490 tty->print_cr("JVMTI [-] %s %s", func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
491 JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
a61af66fc99e Initial load
duke
parents:
diff changeset
492 }
a61af66fc99e Initial load
duke
parents:
diff changeset
493 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
494 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
495 <xsl:text> return JVMTI_ERROR_WRONG_PHASE;
a61af66fc99e Initial load
duke
parents:
diff changeset
496 }</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
497
a61af66fc99e Initial load
duke
parents:
diff changeset
498 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
499 Thread* this_thread = (Thread*)ThreadLocalStorage::thread(); </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
500
a61af66fc99e Initial load
duke
parents:
diff changeset
501 <xsl:apply-templates select="." mode="transition"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
502 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
503 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
504 <xsl:if test="contains(@phase,'onload')">
a61af66fc99e Initial load
duke
parents:
diff changeset
505 <xsl:text> if(JvmtiEnv::get_phase()!=JVMTI_PHASE_ONLOAD</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
506 <xsl:if test="not(contains(@phase,'onloadOnly'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
507 <xsl:text> &amp;&amp; JvmtiEnv::get_phase()!=JVMTI_PHASE_LIVE</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
508 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
509 <xsl:text>) {
a61af66fc99e Initial load
duke
parents:
diff changeset
510 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
511 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
512 <xsl:text> if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
513 tty->print_cr("JVMTI [-] %s %s", func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
514 JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
a61af66fc99e Initial load
duke
parents:
diff changeset
515 }
a61af66fc99e Initial load
duke
parents:
diff changeset
516 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
517 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
518 <xsl:text> return JVMTI_ERROR_WRONG_PHASE;
a61af66fc99e Initial load
duke
parents:
diff changeset
519 }</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
520 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
521 <xsl:if test="contains(@phase,'start')">
a61af66fc99e Initial load
duke
parents:
diff changeset
522 <xsl:text> if(JvmtiEnv::get_phase()!=JVMTI_PHASE_START &amp;&amp; JvmtiEnv::get_phase()!=JVMTI_PHASE_LIVE) {
a61af66fc99e Initial load
duke
parents:
diff changeset
523 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
524 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
525 <xsl:text> if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
526 tty->print_cr("JVMTI [-] %s %s", func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
527 JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
a61af66fc99e Initial load
duke
parents:
diff changeset
528 }
a61af66fc99e Initial load
duke
parents:
diff changeset
529 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
530 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
531 <xsl:text> return JVMTI_ERROR_WRONG_PHASE;
a61af66fc99e Initial load
duke
parents:
diff changeset
532 }
a61af66fc99e Initial load
duke
parents:
diff changeset
533 Thread* this_thread = (Thread*)ThreadLocalStorage::thread(); </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
534 <xsl:apply-templates select="." mode="transition"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
535 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
536 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
537 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
538
a61af66fc99e Initial load
duke
parents:
diff changeset
539 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
540 JvmtiEnv* jvmti_env = JvmtiEnv::JvmtiEnv_from_jvmti_env(env);
a61af66fc99e Initial load
duke
parents:
diff changeset
541 if (!jvmti_env->is_valid()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
542 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
543 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
544 <xsl:text> if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
545 tty->print_cr("JVMTI [%s] %s %s env=%d", curr_thread_name, func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
546 JvmtiUtil::error_name(JVMTI_ERROR_INVALID_ENVIRONMENT), env);
a61af66fc99e Initial load
duke
parents:
diff changeset
547 }
a61af66fc99e Initial load
duke
parents:
diff changeset
548 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
549 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
550 <xsl:text> return JVMTI_ERROR_INVALID_ENVIRONMENT;
a61af66fc99e Initial load
duke
parents:
diff changeset
551 }
a61af66fc99e Initial load
duke
parents:
diff changeset
552 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
553
a61af66fc99e Initial load
duke
parents:
diff changeset
554 <xsl:apply-templates select="capabilities/required"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
555
a61af66fc99e Initial load
duke
parents:
diff changeset
556 <xsl:text> jvmtiError err;
a61af66fc99e Initial load
duke
parents:
diff changeset
557 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
558 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
559 <xsl:when test="count(@phase)=1 and not(contains(@phase,'live')) and not(contains(@phase,'start'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
560 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
561 <xsl:when test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
562 <xsl:text> if (Threads::number_of_threads() != 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
563 Thread* this_thread = (Thread*)ThreadLocalStorage::thread();</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
564 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
565 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
566
a61af66fc99e Initial load
duke
parents:
diff changeset
567 <xsl:text> Thread* this_thread = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
568 bool transition;
a61af66fc99e Initial load
duke
parents:
diff changeset
569 if (Threads::number_of_threads() == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
570 transition = false;
a61af66fc99e Initial load
duke
parents:
diff changeset
571 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
572 this_thread = (Thread*)ThreadLocalStorage::thread();
a61af66fc99e Initial load
duke
parents:
diff changeset
573 transition = ((this_thread != NULL) &amp;&amp; !this_thread->is_VM_thread() &amp;&amp; !this_thread->is_ConcurrentGC_thread());
a61af66fc99e Initial load
duke
parents:
diff changeset
574 }
a61af66fc99e Initial load
duke
parents:
diff changeset
575 if (transition) {</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
576 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
577
a61af66fc99e Initial load
duke
parents:
diff changeset
578 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
579 <!-- we allow use in early phases but there are threads now, -->
a61af66fc99e Initial load
duke
parents:
diff changeset
580 <!-- so do thread transition -->
a61af66fc99e Initial load
duke
parents:
diff changeset
581 <xsl:apply-templates select="." mode="transition">
a61af66fc99e Initial load
duke
parents:
diff changeset
582 <xsl:with-param name="space">
a61af66fc99e Initial load
duke
parents:
diff changeset
583 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
584 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
585 </xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
586 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
587 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
588 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
589 <xsl:apply-templates select="." mode="doCall"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
590 <xsl:text> } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
591 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
592 <!-- we are pre-thread - no thread transition code -->
a61af66fc99e Initial load
duke
parents:
diff changeset
593 <xsl:apply-templates select="." mode="doCall"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
594 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
595 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
596 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
597 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
598 <xsl:apply-templates select="." mode="doCall"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
599 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
600 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
601 <xsl:text> return err;
a61af66fc99e Initial load
duke
parents:
diff changeset
602 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
603
a61af66fc99e Initial load
duke
parents:
diff changeset
604 <xsl:if test="not(contains(@jkernel,'yes'))">
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 6725
diff changeset
605 <xsl:text>#endif // INCLUDE_JVMTI&#xA;</xsl:text>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
606 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
607
a61af66fc99e Initial load
duke
parents:
diff changeset
608 <xsl:text>}&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
609 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
610
a61af66fc99e Initial load
duke
parents:
diff changeset
611 <xsl:template match="function" mode="doCall">
a61af66fc99e Initial load
duke
parents:
diff changeset
612 <xsl:apply-templates select="parameters" mode="dochecks"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
613 <xsl:apply-templates select="." mode="traceBefore"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
614 <xsl:apply-templates select="." mode="genCall"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
615 <xsl:apply-templates select="." mode="traceAfter"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
616 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
617
a61af66fc99e Initial load
duke
parents:
diff changeset
618 <xsl:template match="function" mode="genCall">
a61af66fc99e Initial load
duke
parents:
diff changeset
619 <xsl:text> err = jvmti_env-&gt;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
620 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
621 <xsl:text>(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
622 <xsl:apply-templates select="parameters" mode="HotSpotValue"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
623 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
624 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
625 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
626
a61af66fc99e Initial load
duke
parents:
diff changeset
627
a61af66fc99e Initial load
duke
parents:
diff changeset
628 <xsl:template match="function" mode="traceSetUp">
a61af66fc99e Initial load
duke
parents:
diff changeset
629 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
630 <xsl:text> SafeResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
631 jint trace_flags = JvmtiTrace::trace_flags(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
632 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
633 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
634 const char *func_name;
a61af66fc99e Initial load
duke
parents:
diff changeset
635 const char *curr_thread_name;
a61af66fc99e Initial load
duke
parents:
diff changeset
636 if (trace_flags) {
a61af66fc99e Initial load
duke
parents:
diff changeset
637 func_name = JvmtiTrace::function_name(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
638 <xsl:value-of select="@num"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
639 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
640 curr_thread_name = JvmtiTrace::safe_get_current_thread_name();
a61af66fc99e Initial load
duke
parents:
diff changeset
641 }
a61af66fc99e Initial load
duke
parents:
diff changeset
642 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
643 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
644 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
645
a61af66fc99e Initial load
duke
parents:
diff changeset
646
a61af66fc99e Initial load
duke
parents:
diff changeset
647 <xsl:template match="function" mode="traceBefore">
a61af66fc99e Initial load
duke
parents:
diff changeset
648 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
649 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
650 if ((trace_flags &amp; JvmtiTrace::SHOW_IN) != 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
651 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
652 <xsl:apply-templates select="." mode="traceIn"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
653 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
654 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
655 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
656 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
657
a61af66fc99e Initial load
duke
parents:
diff changeset
658
a61af66fc99e Initial load
duke
parents:
diff changeset
659 <xsl:template match="param" mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
660 <xsl:param name="err"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
661 <xsl:param name="comment"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
662 <xsl:param name="extraValue"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
663 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
664 <xsl:text> if ((trace_flags &amp; JvmtiTrace::SHOW_ERROR) != 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
665 if ((trace_flags &amp; JvmtiTrace::SHOW_IN) == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
666 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
667 <xsl:apply-templates select="../.." mode="traceIn">
a61af66fc99e Initial load
duke
parents:
diff changeset
668 <xsl:with-param name="endParam" select="."/>
a61af66fc99e Initial load
duke
parents:
diff changeset
669 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
670 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
671 tty->print_cr("JVMTI [%s] %s } %s - erroneous arg is </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
672 <xsl:value-of select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
673 <xsl:value-of select="$comment"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
674 <xsl:text>", curr_thread_name, func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
675 JvmtiUtil::error_name(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
676 <xsl:value-of select="$err"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
677 <xsl:text>)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
678 <xsl:value-of select="$extraValue"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
679 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
680 }
a61af66fc99e Initial load
duke
parents:
diff changeset
681 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
682 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
683 <xsl:text> return </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
684 <xsl:value-of select="$err"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
685 <xsl:text>;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
686 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
687
a61af66fc99e Initial load
duke
parents:
diff changeset
688
a61af66fc99e Initial load
duke
parents:
diff changeset
689 <xsl:template match="function" mode="traceAfter">
a61af66fc99e Initial load
duke
parents:
diff changeset
690 <xsl:if test="$trace='Trace'">
a61af66fc99e Initial load
duke
parents:
diff changeset
691 <xsl:text> if ( err != JVMTI_ERROR_NONE &amp;&amp; (trace_flags &amp; JvmtiTrace::SHOW_ERROR) != 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
692 if ((trace_flags &amp; JvmtiTrace::SHOW_IN) == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
693 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
694 <xsl:apply-templates select="." mode="traceIn"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
695 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
696 tty->print_cr("JVMTI [%s] %s } %s", curr_thread_name, func_name,
a61af66fc99e Initial load
duke
parents:
diff changeset
697 JvmtiUtil::error_name(err));
a61af66fc99e Initial load
duke
parents:
diff changeset
698 } else if ((trace_flags &amp; JvmtiTrace::SHOW_OUT) != 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
699 tty->print_cr("JVMTI [%s] %s }", curr_thread_name, func_name);
a61af66fc99e Initial load
duke
parents:
diff changeset
700 }
a61af66fc99e Initial load
duke
parents:
diff changeset
701 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
702 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
703 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
704
a61af66fc99e Initial load
duke
parents:
diff changeset
705 <xsl:template match="function" mode="traceIn">
a61af66fc99e Initial load
duke
parents:
diff changeset
706 <xsl:param name="endParam"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
707 <xsl:text> tty->print_cr("JVMTI [%s] %s { </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
708 <xsl:apply-templates select="parameters" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
709 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
710 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
711 <xsl:text>", curr_thread_name, func_name</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
712 <xsl:apply-templates select="parameters" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
713 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
714 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
715 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
716 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
717 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
718
a61af66fc99e Initial load
duke
parents:
diff changeset
719 <xsl:template match="parameters" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
720 <xsl:apply-templates select="param" mode="dochecks"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
721 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
722
a61af66fc99e Initial load
duke
parents:
diff changeset
723 <xsl:template match="param" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
724 <xsl:apply-templates select="child::*[position()=1]" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
725 <xsl:with-param name="name" select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
726 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
727 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
728
a61af66fc99e Initial load
duke
parents:
diff changeset
729 <xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
730 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
731 <xsl:if test="count(nullok)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
732 <xsl:text> if (</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
733 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
734 <xsl:text> == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
735 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
736 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
737 <xsl:with-param name="err">JVMTI_ERROR_NULL_POINTER</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
738 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
739 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
740 }
a61af66fc99e Initial load
duke
parents:
diff changeset
741 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
742 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
743 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
744
a61af66fc99e Initial load
duke
parents:
diff changeset
745 <xsl:template match="jrawMonitorID" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
746 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
747 <xsl:text> JvmtiRawMonitor *rmonitor = (JvmtiRawMonitor *)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
748 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
749 <xsl:text>;
a61af66fc99e Initial load
duke
parents:
diff changeset
750 if (rmonitor == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
751 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
752 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
753 <xsl:with-param name="err">JVMTI_ERROR_INVALID_MONITOR</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
754 <xsl:with-param name="comment"> - raw monitor is NULL</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
755 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
756 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
757 }
a61af66fc99e Initial load
duke
parents:
diff changeset
758 if (!rmonitor->is_valid()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
759 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
760 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
761 <xsl:with-param name="err">JVMTI_ERROR_INVALID_MONITOR</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
762 <xsl:with-param name="comment"> - not a raw monitor 0x%x</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
763 <xsl:with-param name="extraValue">, rmonitor</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
764 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
765 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
766 }
a61af66fc99e Initial load
duke
parents:
diff changeset
767 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
768 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
769
a61af66fc99e Initial load
duke
parents:
diff changeset
770 <xsl:template match="jthread" mode="dochecksbody">
a61af66fc99e Initial load
duke
parents:
diff changeset
771 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
772 <xsl:text> oop thread_oop = JNIHandles::resolve_external_guard(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
773 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
774 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
775 if (thread_oop == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
776 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
777 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
778 <xsl:with-param name="err">JVMTI_ERROR_INVALID_THREAD</xsl:with-param>
8668
3c9db54c2660 8008081: Print outs do not have matching arguments
mikael
parents: 6854
diff changeset
779 <xsl:with-param name="comment"> - jthread resolved to NULL - jthread = 0x%x</xsl:with-param>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
780 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
781 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
782 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
783 }
1142
4ce7240d622c 6914300: ciEnv should export all well known classes
never
parents: 0
diff changeset
784 if (!thread_oop-&gt;is_a(SystemDictionary::Thread_klass())) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
785 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
786 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
787 <xsl:with-param name="err">JVMTI_ERROR_INVALID_THREAD</xsl:with-param>
8668
3c9db54c2660 8008081: Print outs do not have matching arguments
mikael
parents: 6854
diff changeset
788 <xsl:with-param name="comment"> - oop is not a thread - jthread = 0x%x</xsl:with-param>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
789 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
790 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
791 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
792 }
a61af66fc99e Initial load
duke
parents:
diff changeset
793 java_thread = java_lang_Thread::thread(thread_oop);
a61af66fc99e Initial load
duke
parents:
diff changeset
794 if (java_thread == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
795 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
796 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
797 <xsl:with-param name="err">
a61af66fc99e Initial load
duke
parents:
diff changeset
798 <xsl:text>JVMTI_ERROR_THREAD_NOT_ALIVE</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
799 </xsl:with-param>
8668
3c9db54c2660 8008081: Print outs do not have matching arguments
mikael
parents: 6854
diff changeset
800 <xsl:with-param name="comment"> - not a Java thread - jthread = 0x%x</xsl:with-param>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
801 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
802 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
803 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
804 }
a61af66fc99e Initial load
duke
parents:
diff changeset
805 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
806 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
807
a61af66fc99e Initial load
duke
parents:
diff changeset
808 <xsl:template match="jthread" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
809 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
810 <!-- If we convert and test threads -->
a61af66fc99e Initial load
duke
parents:
diff changeset
811 <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
812 <xsl:text> JavaThread* java_thread;
a61af66fc99e Initial load
duke
parents:
diff changeset
813 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
814 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
815 <xsl:when test="count(@null)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
816 <xsl:apply-templates select="." mode="dochecksbody">
a61af66fc99e Initial load
duke
parents:
diff changeset
817 <xsl:with-param name="name" select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
818 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
819 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
820 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
821 <xsl:text> if (</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
822 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
823 <xsl:text> == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
824 java_thread = current_thread;
a61af66fc99e Initial load
duke
parents:
diff changeset
825 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
826 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
827 <xsl:apply-templates select="." mode="dochecksbody">
a61af66fc99e Initial load
duke
parents:
diff changeset
828 <xsl:with-param name="name" select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
829 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
830 <xsl:text> }
a61af66fc99e Initial load
duke
parents:
diff changeset
831 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
832 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
833 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
834 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
835 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
836
a61af66fc99e Initial load
duke
parents:
diff changeset
837 <xsl:template match="jframeID" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
838 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
839 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
840 if (depth &lt; 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
841 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
842 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
843 <xsl:with-param name="err">JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:with-param>
8668
3c9db54c2660 8008081: Print outs do not have matching arguments
mikael
parents: 6854
diff changeset
844 <xsl:with-param name="comment"> - negative depth - jthread = 0x%x</xsl:with-param>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
845 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
846 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
847 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
848 }
a61af66fc99e Initial load
duke
parents:
diff changeset
849 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
850 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
851
a61af66fc99e Initial load
duke
parents:
diff changeset
852 <xsl:template match="jclass" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
853 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
854 <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
a61af66fc99e Initial load
duke
parents:
diff changeset
855 <xsl:if test="count(@method)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
856 <xsl:text> oop k_mirror = JNIHandles::resolve_external_guard(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
857 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
858 <xsl:text>);
a61af66fc99e Initial load
duke
parents:
diff changeset
859 if (k_mirror == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
860 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
861 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
862 <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
863 <xsl:with-param name="comment"> - resolved to NULL - jclass = 0x%x</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
864 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
865 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
866 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
867 }
1142
4ce7240d622c 6914300: ciEnv should export all well known classes
never
parents: 0
diff changeset
868 if (!k_mirror->is_a(SystemDictionary::Class_klass())) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
869 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
870 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
871 <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
872 <xsl:with-param name="comment"> - not a class - jclass = 0x%x</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
873 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
874 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
875 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
876 }
a61af66fc99e Initial load
duke
parents:
diff changeset
877 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
878 <xsl:if test="count(@method|@field)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
879 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
880 if (java_lang_Class::is_primitive(k_mirror)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
881 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
882 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
883 <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
884 <xsl:with-param name="comment"> - is a primitive class - jclass = 0x%x</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
885 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
886 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
887 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
888 }
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 4045
diff changeset
889 Klass* k_oop = java_lang_Class::as_Klass(k_mirror);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
890 if (k_oop == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
891 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
892 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
893 <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 4045
diff changeset
894 <xsl:with-param name="comment"> - no Klass* - jclass = 0x%x</xsl:with-param>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
895 <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
896 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
897 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
898 }
a61af66fc99e Initial load
duke
parents:
diff changeset
899 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
900 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
901 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
902 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
903
a61af66fc99e Initial load
duke
parents:
diff changeset
904
a61af66fc99e Initial load
duke
parents:
diff changeset
905 <xsl:template match="jmethodID" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
906 <xsl:param name="name"/>
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 4045
diff changeset
907 <xsl:text> Method* method_oop = Method::checked_resolve_jmethod_id(</xsl:text>
0
a61af66fc99e Initial load
duke
parents:
diff changeset
908 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
909 <xsl:text>);&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
910 <xsl:text> if (method_oop == NULL) {&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
911 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
912 <xsl:with-param name="err">JVMTI_ERROR_INVALID_METHODID</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
913 <xsl:with-param name="comment"></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
914 <xsl:with-param name="extraValue"></xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
915 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
916 <xsl:text>&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
917 <xsl:text> }&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
918 <xsl:if test="count(@native)=1 and contains(@native,'error')">
a61af66fc99e Initial load
duke
parents:
diff changeset
919 <xsl:text> if (method_oop->is_native()) {&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
920 <xsl:text> return JVMTI_ERROR_NATIVE_METHOD;&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
921 <xsl:text> }&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
922 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
923 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
924
a61af66fc99e Initial load
duke
parents:
diff changeset
925
a61af66fc99e Initial load
duke
parents:
diff changeset
926 <xsl:template match="jfieldID" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
927 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
928 <xsl:text> ResourceMark rm_fdesc(current_thread);&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
929 <xsl:text> fieldDescriptor fdesc;&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
930 <xsl:text> if (!JvmtiEnv::get_field_descriptor(k_oop, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
931 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
932 <xsl:text>, &amp;fdesc)) {&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
933 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
934 <xsl:with-param name="err">JVMTI_ERROR_INVALID_FIELDID</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
935 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
936 <xsl:text>&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
937 <xsl:text> }&#xA;</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
938 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
939
a61af66fc99e Initial load
duke
parents:
diff changeset
940
a61af66fc99e Initial load
duke
parents:
diff changeset
941 <xsl:template match="jint" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
942 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
943 <xsl:if test="count(@min)=1">
a61af66fc99e Initial load
duke
parents:
diff changeset
944 <xsl:text> if (</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
945 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
946 <xsl:text> &lt; </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
947 <xsl:value-of select="@min"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
948 <xsl:text>) {
a61af66fc99e Initial load
duke
parents:
diff changeset
949 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
950 <xsl:apply-templates select=".." mode="traceError">
a61af66fc99e Initial load
duke
parents:
diff changeset
951 <xsl:with-param name="err">JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:with-param>
a61af66fc99e Initial load
duke
parents:
diff changeset
952 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
953 <xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
954 }
a61af66fc99e Initial load
duke
parents:
diff changeset
955 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
956 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
957 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
958
a61af66fc99e Initial load
duke
parents:
diff changeset
959 <xsl:template match="jobject|jvalue|jthreadGroup|enum|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="dochecks">
a61af66fc99e Initial load
duke
parents:
diff changeset
960 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
961
a61af66fc99e Initial load
duke
parents:
diff changeset
962 <!-- iterate over parameters, stopping if specified is encountered -->
a61af66fc99e Initial load
duke
parents:
diff changeset
963 <xsl:template name="traceInValueParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
964 <xsl:param name="params"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
965 <xsl:param name="endParam"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
966 <xsl:param name="index" select="1"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
967 <xsl:variable name="cParam" select="$params[position()=$index]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
968 <xsl:if test="$cParam!=$endParam">
a61af66fc99e Initial load
duke
parents:
diff changeset
969 <xsl:apply-templates select="$cParam" mode="traceInValue"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
970 <xsl:if test="count($params) &gt; $index">
a61af66fc99e Initial load
duke
parents:
diff changeset
971 <xsl:call-template name="traceInValueParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
972 <xsl:with-param name="params" select="$params"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
973 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
974 <xsl:with-param name="index" select="1+$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
975 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
976 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
977 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
978 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
979
a61af66fc99e Initial load
duke
parents:
diff changeset
980 <xsl:template name="traceInFormatParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
981 <xsl:param name="params"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
982 <xsl:param name="endParam"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
983 <xsl:param name="index" select="1"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
984 <xsl:variable name="cParam" select="$params[position()=$index]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
985 <xsl:if test="$cParam!=$endParam">
a61af66fc99e Initial load
duke
parents:
diff changeset
986 <xsl:apply-templates select="$cParam" mode="traceInFormat"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
987 <xsl:if test="count($params) &gt; $index">
a61af66fc99e Initial load
duke
parents:
diff changeset
988 <xsl:call-template name="traceInFormatParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
989 <xsl:with-param name="params" select="$params"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
990 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
991 <xsl:with-param name="index" select="1+$index"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
992 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
993 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
994 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
995 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
996
a61af66fc99e Initial load
duke
parents:
diff changeset
997 <xsl:template match="parameters" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
998 <xsl:param name="endParam"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
999 <xsl:call-template name="traceInFormatParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
1000 <xsl:with-param name="params" select="param"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1001 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1002 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1003 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1004
a61af66fc99e Initial load
duke
parents:
diff changeset
1005 <xsl:template match="parameters" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1006 <xsl:param name="endParam"></xsl:param>
a61af66fc99e Initial load
duke
parents:
diff changeset
1007 <xsl:call-template name="traceInValueParamsUpTo">
a61af66fc99e Initial load
duke
parents:
diff changeset
1008 <xsl:with-param name="params" select="param"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1009 <xsl:with-param name="endParam" select="$endParam"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1010 </xsl:call-template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1011 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1012
a61af66fc99e Initial load
duke
parents:
diff changeset
1013 <xsl:template match="param" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1014 <xsl:apply-templates select="child::*[position()=1]" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1015 <xsl:with-param name="name" select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1016 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
1017 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1018
a61af66fc99e Initial load
duke
parents:
diff changeset
1019 <xsl:template match="param" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1020 <xsl:apply-templates select="child::*[position()=1]" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1021 <xsl:with-param name="name" select="@id"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1022 </xsl:apply-templates>
a61af66fc99e Initial load
duke
parents:
diff changeset
1023 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1024
a61af66fc99e Initial load
duke
parents:
diff changeset
1025 <xsl:template match="outptr|outbuf|allocfieldbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1026 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1027
a61af66fc99e Initial load
duke
parents:
diff changeset
1028 <xsl:template match="outptr|outbuf|allocfieldbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1029 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1030
a61af66fc99e Initial load
duke
parents:
diff changeset
1031 <xsl:template match="inbuf" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1032 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1033 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1034 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1035 <xsl:variable name="child" select="child::*[position()=1]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1036 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1037 <xsl:when test="name($child)='char'">
a61af66fc99e Initial load
duke
parents:
diff changeset
1038 <xsl:text>='%s'</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1039 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
1040 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1041 <xsl:text>=0x%x</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1042 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1043 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1044 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1045
a61af66fc99e Initial load
duke
parents:
diff changeset
1046 <xsl:template match="inbuf" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1047 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1048 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1049 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1050 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1051
a61af66fc99e Initial load
duke
parents:
diff changeset
1052 <xsl:template match="ptrtype" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1053 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1054 <xsl:variable name="child" select="child::*[position()=1]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1055 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1056 <xsl:when test="name($child)='jclass'">
a61af66fc99e Initial load
duke
parents:
diff changeset
1057 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1058 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1059 <xsl:text>=0x%x</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1060 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
1061 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1062 <xsl:apply-templates select="$child" mode="traceInFormat"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1063 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1064 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1065 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1066
a61af66fc99e Initial load
duke
parents:
diff changeset
1067 <xsl:template match="ptrtype" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1068 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1069 <xsl:variable name="child" select="child::*[position()=1]"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1070 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1071 <xsl:when test="name($child)='jclass'">
a61af66fc99e Initial load
duke
parents:
diff changeset
1072 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1073 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1074 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
1075 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1076 <xsl:apply-templates select="$child" mode="traceInValue"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1077 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1078 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1079 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1080
a61af66fc99e Initial load
duke
parents:
diff changeset
1081 <xsl:template match="inptr" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1082 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1083 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1084 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1085 <xsl:text>=0x%x</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1086 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1087
a61af66fc99e Initial load
duke
parents:
diff changeset
1088 <xsl:template match="inptr" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1089 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1090 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1091 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1092 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1093
a61af66fc99e Initial load
duke
parents:
diff changeset
1094 <xsl:template match="jrawMonitorID|jfieldID" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1095 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1096 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1097 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1098 <xsl:text>=%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1099 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1100
a61af66fc99e Initial load
duke
parents:
diff changeset
1101 <xsl:template match="jclass" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1102 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1103 <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
a61af66fc99e Initial load
duke
parents:
diff changeset
1104 <xsl:if test="count(@method)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
1105 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1106 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1107 <xsl:text>=%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1108 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
1109 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1110
a61af66fc99e Initial load
duke
parents:
diff changeset
1111 <xsl:template match="jrawMonitorID" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1112 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1113 <xsl:text>, rmonitor->get_name()</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1114 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1115
a61af66fc99e Initial load
duke
parents:
diff changeset
1116 <xsl:template match="jthread" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1117 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1118 <!-- If we convert and test threads -->
a61af66fc99e Initial load
duke
parents:
diff changeset
1119 <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
1120 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1121 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1122 <xsl:text>=%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1123 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
1124 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1125
a61af66fc99e Initial load
duke
parents:
diff changeset
1126 <xsl:template match="jthread" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1127 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1128 <!-- If we convert and test threads -->
a61af66fc99e Initial load
duke
parents:
diff changeset
1129 <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
a61af66fc99e Initial load
duke
parents:
diff changeset
1130 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
1131 JvmtiTrace::safe_get_thread_name(java_thread)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1132 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
1133 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1134
a61af66fc99e Initial load
duke
parents:
diff changeset
1135 <xsl:template match="jframeID" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1136 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1137 <xsl:text>depth=%d</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1138 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1139
a61af66fc99e Initial load
duke
parents:
diff changeset
1140 <xsl:template match="jframeID" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1141 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1142 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1143 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1144 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1145
a61af66fc99e Initial load
duke
parents:
diff changeset
1146 <xsl:template match="jclass" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1147 <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
a61af66fc99e Initial load
duke
parents:
diff changeset
1148 <xsl:if test="count(@method)=0">
a61af66fc99e Initial load
duke
parents:
diff changeset
1149 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
1150 JvmtiTrace::get_class_name(k_mirror)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1151 </xsl:if>
a61af66fc99e Initial load
duke
parents:
diff changeset
1152 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1153
a61af66fc99e Initial load
duke
parents:
diff changeset
1154 <xsl:template match="jmethodID" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1155 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1156 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1157 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1158 <xsl:text>=%s.%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1159 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1160
a61af66fc99e Initial load
duke
parents:
diff changeset
1161 <xsl:template match="jmethodID" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1162 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1163 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
1164 method_oop == NULL? "NULL" : method_oop->klass_name()->as_C_string(),
a61af66fc99e Initial load
duke
parents:
diff changeset
1165 method_oop == NULL? "NULL" : method_oop->name()->as_C_string()
a61af66fc99e Initial load
duke
parents:
diff changeset
1166 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1167 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1168
a61af66fc99e Initial load
duke
parents:
diff changeset
1169 <xsl:template match="jfieldID" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1170 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1171 <xsl:text>, fdesc.name()->as_C_string()</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1172 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1173
a61af66fc99e Initial load
duke
parents:
diff changeset
1174 <xsl:template match="enum" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1175 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1176 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1177 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1178 <xsl:text>=%d:%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1179 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1180
a61af66fc99e Initial load
duke
parents:
diff changeset
1181 <xsl:template match="enum" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1182 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1183 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1184 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1185 <xsl:text>,
a61af66fc99e Initial load
duke
parents:
diff changeset
1186 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1187 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1188 <xsl:when test=".='jvmtiError'">
a61af66fc99e Initial load
duke
parents:
diff changeset
1189 <xsl:text>JvmtiUtil::error_name(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1190 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1191 <xsl:text>)
a61af66fc99e Initial load
duke
parents:
diff changeset
1192 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1193 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
1194 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1195 <xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1196 <xsl:when test=".='jvmtiEvent'">
a61af66fc99e Initial load
duke
parents:
diff changeset
1197 <xsl:text>JvmtiTrace::event_name(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1198 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1199 <xsl:text>)
a61af66fc99e Initial load
duke
parents:
diff changeset
1200 </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1201 </xsl:when>
a61af66fc99e Initial load
duke
parents:
diff changeset
1202 <xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1203 <xsl:text>JvmtiTrace::enum_name(</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1204 <xsl:value-of select="."/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1205 <xsl:text>ConstantNames, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1206 <xsl:value-of select="."/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1207 <xsl:text>ConstantValues, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1208 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1209 <xsl:text>)</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1210 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1211 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1212 </xsl:otherwise>
a61af66fc99e Initial load
duke
parents:
diff changeset
1213 </xsl:choose>
a61af66fc99e Initial load
duke
parents:
diff changeset
1214 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1215
a61af66fc99e Initial load
duke
parents:
diff changeset
1216 <xsl:template match="jint|jlocation" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1217 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1218 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1219 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1220 <xsl:text>=%d</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1221 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1222
a61af66fc99e Initial load
duke
parents:
diff changeset
1223 <xsl:template match="jlong" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1224 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1225 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1226 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1227 <xsl:text>=%ld</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1228 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1229
a61af66fc99e Initial load
duke
parents:
diff changeset
1230 <xsl:template match="size_t" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1231 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1232 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1233 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1234 <xsl:text>=0x%zx</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1235 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1236
a61af66fc99e Initial load
duke
parents:
diff changeset
1237 <xsl:template match="jfloat|jdouble" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1238 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1239 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1240 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1241 <xsl:text>=%f</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1242 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1243
a61af66fc99e Initial load
duke
parents:
diff changeset
1244 <xsl:template match="char" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1245 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1246 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1247 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1248 <xsl:text>=%c</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1249 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1250
a61af66fc99e Initial load
duke
parents:
diff changeset
1251 <xsl:template match="uchar|jchar" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1252 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1253 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1254 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1255 <xsl:text>=0x%x</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1256 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1257
a61af66fc99e Initial load
duke
parents:
diff changeset
1258 <xsl:template match="jint|jlocation|jchar|jlong|jfloat|jdouble|char|uchar|size_t" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1259 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1260 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1261 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1262 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1263
a61af66fc99e Initial load
duke
parents:
diff changeset
1264
a61af66fc99e Initial load
duke
parents:
diff changeset
1265 <xsl:template match="jboolean" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1266 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1267 <xsl:text> </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1268 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1269 <xsl:text>=%s</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1270 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1271
a61af66fc99e Initial load
duke
parents:
diff changeset
1272 <xsl:template match="jboolean" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1273 <xsl:param name="name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1274 <xsl:text>, </xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1275 <xsl:value-of select="$name"/>
a61af66fc99e Initial load
duke
parents:
diff changeset
1276 <xsl:text>? "true" : "false"</xsl:text>
a61af66fc99e Initial load
duke
parents:
diff changeset
1277 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1278
a61af66fc99e Initial load
duke
parents:
diff changeset
1279 <xsl:template match="jobject|jvalue|jthreadGroup|void|struct" mode="traceInFormat">
a61af66fc99e Initial load
duke
parents:
diff changeset
1280 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1281
a61af66fc99e Initial load
duke
parents:
diff changeset
1282 <xsl:template match="jobject|jvalue|jthreadGroup|void|struct" mode="traceInValue">
a61af66fc99e Initial load
duke
parents:
diff changeset
1283 </xsl:template>
a61af66fc99e Initial load
duke
parents:
diff changeset
1284
a61af66fc99e Initial load
duke
parents:
diff changeset
1285
a61af66fc99e Initial load
duke
parents:
diff changeset
1286
a61af66fc99e Initial load
duke
parents:
diff changeset
1287 </xsl:stylesheet>