Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/prims/jvmtiLib.xsl
32285 views
<?xml version="1.0" encoding="utf-8"?>1<!--23Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.4DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.56This code is free software; you can redistribute it and/or modify it7under the terms of the GNU General Public License version 2 only, as8published by the Free Software Foundation.910This code is distributed in the hope that it will be useful, but WITHOUT11ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13version 2 for more details (a copy is included in the LICENSE file that14accompanied this code).1516You should have received a copy of the GNU General Public License version172 along with this work; if not, write to the Free Software Foundation,18Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.1920Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21or visit www.oracle.com if you need additional information or have any22questions.2324-->2526<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"27version="1.0">2829<xsl:template name="microversion">30<xsl:value-of select="//specification/@microversion"/>31</xsl:template>3233<xsl:template name="showbasicversion">34<xsl:value-of select="//specification/@majorversion"/>35<xsl:text>.</xsl:text>36<xsl:value-of select="//specification/@minorversion"/>37</xsl:template>3839<xsl:template name="showversion">40<xsl:call-template name="showbasicversion"/>41<xsl:text>.</xsl:text>42<xsl:call-template name="microversion"/>43</xsl:template>4445<xsl:template name="copyrightComment">46<xsl:text>/* </xsl:text>47<!-- Copy the Copyright comment from jvmti.xml -->48<xsl:value-of select="/comment()[position()=1]"/>49<xsl:text> */ 

</xsl:text>50</xsl:template>5152<xsl:template name="includeHeader">53<xsl:call-template name="copyrightComment"/>54<xsl:text> /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ 
</xsl:text>55</xsl:template>5657<xsl:template name="sourceHeader">58<xsl:call-template name="copyrightComment"/>59<xsl:text> // AUTOMATICALLY GENERATED FILE - DO NOT EDIT 
</xsl:text>60</xsl:template>616263<xsl:template match="parameters" mode="signature">64<xsl:param name="comma">65<xsl:text>,66</xsl:text>67</xsl:param>68<xsl:if test="count(param) != 0">69<xsl:value-of select="$comma"/>70</xsl:if>71<xsl:apply-templates select="." mode="signaturenoleadcomma">72<xsl:with-param name="comma" select="$comma"/>73</xsl:apply-templates>74</xsl:template>757677<xsl:template match="parameters" mode="signaturenoleadcomma">78<xsl:param name="comma">79<xsl:text>,80</xsl:text>81</xsl:param>82<xsl:variable name="length" select="count(param)"/>83<xsl:for-each select="param">84<xsl:variable name="separator">85<xsl:choose>86<xsl:when test="position()=$length">87<xsl:text></xsl:text>88</xsl:when>89<xsl:otherwise>90<xsl:value-of select="$comma"/>91</xsl:otherwise>92</xsl:choose>93</xsl:variable>94<xsl:apply-templates select="." mode="signature">95<xsl:with-param name="comma" select="$separator"/>96</xsl:apply-templates>97</xsl:for-each>98</xsl:template>99100101<!-- remove jclass parameters that are jclass/jmethodID pairs.102since the jclass was removed in JVMTI.103-->104<xsl:template match="param" mode="signature">105<xsl:param name="comma"/>106<xsl:variable name="id" select="@id"/>107<xsl:for-each select="child::*[position()=1]">108<xsl:if test="count(@method)=0">109<xsl:apply-templates select="." mode="signature"/>110<xsl:text> </xsl:text>111<xsl:value-of select="$id"/>112<xsl:value-of select="$comma"/>113</xsl:if>114</xsl:for-each>115</xsl:template>116117118<xsl:template match="field" mode="signature">119<xsl:text> </xsl:text>120<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>121<xsl:text> </xsl:text>122<xsl:value-of select="@id"/>123<xsl:text>;124</xsl:text>125</xsl:template>126127<xsl:template match="nullok" mode="funcdescription">128If129<code>130<xsl:value-of select="../../@id"/>131</code>132is133<code>NULL</code>, <xsl:apply-templates/>.134</xsl:template>135136<xsl:template match="vmbuf|allocfieldbuf|struct" mode="funcdescription">137<xsl:message terminate="yes">138vmbuf|allocfieldbuf|struct as type of function parameter139</xsl:message>140</xsl:template>141142<xsl:template match="ptrtype" mode="funcdescription">143<p/>144<xsl:apply-templates select="nullok" mode="funcdescription"/>145</xsl:template>146147<xsl:template match="inptr" mode="funcdescription">148<p/>149<xsl:variable name="child" select="child::*[position()=1]"/>150<xsl:text>Agent passes in a pointer</xsl:text>151<xsl:if test="name($child)!='void'">152<xsl:text> to </xsl:text>153<code>154<xsl:apply-templates select="$child" mode="signature"/>155</code>156</xsl:if>157<xsl:text>. </xsl:text>158<xsl:apply-templates select="nullok" mode="funcdescription"/>159</xsl:template>160161<xsl:template match="inbuf" mode="funcdescription">162<p/>163<xsl:variable name="child" select="child::*[position()=1]"/>164<xsl:text>Agent passes in </xsl:text>165<xsl:choose>166<xsl:when test="name($child)='void'">167<xsl:text> a pointer</xsl:text>168</xsl:when>169<xsl:otherwise>170<xsl:text> an array of </xsl:text>171<xsl:if test="count(@incount)=1 and @incount!=''">172<code>173<xsl:value-of select="@incount"/>174</code>175<xsl:text> elements of </xsl:text>176</xsl:if>177<code>178<xsl:apply-templates select="$child" mode="signature"/>179</code>180</xsl:otherwise>181</xsl:choose>182<xsl:text>. </xsl:text>183<xsl:apply-templates select="nullok" mode="funcdescription"/>184</xsl:template>185186<xsl:template match="outptr" mode="funcdescription">187<p/>188<xsl:text>Agent passes a pointer to a </xsl:text>189<code>190<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>191</code>192<xsl:text>. </xsl:text>193<xsl:text>On return, the </xsl:text>194<code>195<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>196</code>197<xsl:text> has been set. </xsl:text>198<xsl:apply-templates select="nullok" mode="funcdescription"/>199<xsl:apply-templates select="child::*[position()=1]" mode="returndescription"/>200</xsl:template>201202<xsl:template match="allocbuf" mode="funcdescription">203<p/>204<xsl:text>Agent passes a pointer to a </xsl:text>205<code>206<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>207<xsl:text>*</xsl:text>208</code>209<xsl:text>. </xsl:text>210<xsl:text>On return, the </xsl:text>211<code>212<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>213<xsl:text>*</xsl:text>214</code>215<xsl:text> points to a newly allocated array</xsl:text>216<xsl:choose>217<xsl:when test="count(@outcount)=1 and @outcount!=''">218<xsl:text> of size </xsl:text>219<code>220<xsl:text>*</xsl:text>221<xsl:value-of select="@outcount"/>222</code>223</xsl:when>224<xsl:otherwise>225<xsl:if test="count(@incount)=1 and @incount!=''">226<xsl:text> of size </xsl:text>227<code>228<xsl:value-of select="@incount"/>229</code>230</xsl:if>231</xsl:otherwise>232</xsl:choose>233<xsl:text>. The array should be freed with </xsl:text>234<a href="#Deallocate"><code>Deallocate</code></a>235<xsl:text>. </xsl:text>236<xsl:apply-templates select="nullok" mode="funcdescription"/>237<xsl:apply-templates select="child::*[position()=1]" mode="returndescription">238<xsl:with-param name="plural" select="'plural'"/>239</xsl:apply-templates>240</xsl:template>241242<xsl:template match="allocallocbuf" mode="funcdescription">243<p/>244<xsl:text>Agent passes a pointer to a </xsl:text>245<code>246<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>247<xsl:text>**</xsl:text>248</code>249<xsl:text>. </xsl:text>250<xsl:text>On return, the </xsl:text>251<code>252<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>253<xsl:text>**</xsl:text>254</code>255<xsl:text> points to a newly allocated array</xsl:text>256<xsl:choose>257<xsl:when test="count(@outcount)=1 and @outcount!=''">258<xsl:text> of size </xsl:text>259<code>260<xsl:text>*</xsl:text>261<xsl:value-of select="@outcount"/>262</code>263</xsl:when>264<xsl:otherwise>265<xsl:if test="count(@incount)=1 and @incount!=''">266<xsl:text> of size </xsl:text>267<code>268<xsl:value-of select="@incount"/>269</code>270</xsl:if>271</xsl:otherwise>272</xsl:choose>273<xsl:text>, each element of which is also newly allocated.274The array should be freed with </xsl:text>275<a href="#Deallocate"><code>Deallocate</code></a>276<xsl:text>.277Each of the elements should be freed with </xsl:text>278<a href="#Deallocate"><code>Deallocate</code></a>279<xsl:text>. </xsl:text>280<xsl:apply-templates select="nullok" mode="funcdescription"/>281<xsl:apply-templates select="child::*[position()=1]" mode="returndescription">282<xsl:with-param name="plural" select="'plural'"/>283</xsl:apply-templates>284</xsl:template>285286<xsl:template match="outbuf" mode="funcdescription">287<p/>288<xsl:text>Agent passes an array </xsl:text>289<xsl:if test="count(@incount)=1 and @incount!=''">290<xsl:text>large enough to hold </xsl:text>291<code>292<xsl:value-of select="@incount"/>293</code>294<xsl:text> elements </xsl:text>295</xsl:if>296<xsl:text>of </xsl:text>297<code>298<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>299</code>300<xsl:text>. The incoming values of the elements of the array are ignored. </xsl:text>301<xsl:text>On return, </xsl:text>302<xsl:if test="count(@outcount)=1 and @outcount!=''">303<code>304<xsl:text>*</xsl:text>305<xsl:value-of select="@outcount"/>306</code>307<xsl:text> of </xsl:text>308</xsl:if>309<xsl:text>the elements are set. </xsl:text>310<xsl:apply-templates select="nullok" mode="funcdescription"/>311<xsl:apply-templates select="child::*[position()=1]" mode="returndescription">312<xsl:with-param name="plural" select="'plural'"/>313</xsl:apply-templates>314</xsl:template>315316<xsl:template match="agentbuf" mode="funcdescription">317<p/>318<xsl:apply-templates select="nullok" mode="funcdescription"/>319<xsl:apply-templates select="child::*[position()=1]" mode="returndescription">320<xsl:with-param name="plural" select="'plural'"/>321</xsl:apply-templates>322</xsl:template>323324<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct" mode="funcdescription">325</xsl:template>326327<xsl:template match="jthread" mode="funcdescription">328<xsl:if test="count(@null)!=0">329If330<code>331<xsl:value-of select="../@id"/>332</code>333is334<code>NULL</code>, the current thread is used.335</xsl:if>336</xsl:template>337338<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs" mode="returndescription">339</xsl:template>340341<xsl:template match="struct" mode="returndescription">342<xsl:param name="plural"/>343<xsl:variable name="structname" select="."/>344<xsl:for-each select="//typedef[@id=$structname]|//uniontypedef[@id=$structname]">345<xsl:for-each select="field">346<xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">347<xsl:with-param name="plural" select="$plural"/>348</xsl:apply-templates>349</xsl:for-each>350</xsl:for-each>351</xsl:template>352353<xsl:template match="jclass|jthread|jobject|jvalue|jthreadGroup" mode="returndescription">354<xsl:param name="plural"/>355<xsl:text>The object</xsl:text>356<xsl:if test="$plural='plural'">357<xsl:text>s</xsl:text>358</xsl:if>359<xsl:text> returned by </xsl:text>360<code>361<xsl:value-of select="../../@id"/>362</code>363<xsl:choose>364<xsl:when test="$plural='plural'">365<xsl:text> are JNI local references and must be </xsl:text>366</xsl:when>367<xsl:otherwise>368<xsl:text> is a JNI local reference and must be </xsl:text>369</xsl:otherwise>370</xsl:choose>371<a href="#refs">managed</a>.372</xsl:template>373374<xsl:template match="outptr|inptr|inbuf|agentbuf|allocbuf|allocallocbuf" mode="fieldreturndescription">375<xsl:variable name="field" select="ancestor::field"/>376<xsl:message terminate="yes">377outptr, allocallocbuf, outbuf, vmbuf, allocbuf, inptr, inbuf or agentbuf as type of returned field:378<xsl:value-of select="$field/@id"/> of <xsl:value-of select="$field/../@id"/>379</xsl:message>380</xsl:template>381382<xsl:template match="outbuf" mode="fieldreturndescription">383<!-- hand document this special case.384-->385</xsl:template>386387<xsl:template match="struct" mode="fieldreturndescription">388<xsl:param name="plural"/>389<xsl:variable name="structname" select="."/>390<xsl:for-each select="//typedef[@id=$structname]|//uniontypedef[@id=$structname]">391<xsl:for-each select="field">392<xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">393<xsl:with-param name="plural" select="$plural"/>394</xsl:apply-templates>395</xsl:for-each>396</xsl:for-each>397</xsl:template>398399<xsl:template match="allocfieldbuf" mode="fieldreturndescription">400<xsl:param name="plural"/>401<xsl:variable name="field" select="ancestor::field"/>402<xsl:text>The pointer</xsl:text>403<xsl:if test="$plural='plural'">404<xsl:text>s</xsl:text>405</xsl:if>406<xsl:text> returned in the field </xsl:text>407<code>408<xsl:value-of select="$field/@id"/>409</code>410<xsl:text> of </xsl:text>411<code>412<xsl:value-of select="$field/../@id"/>413</code>414<xsl:choose>415<xsl:when test="$plural='plural'">416<xsl:text> are newly allocated arrays. The arrays</xsl:text>417</xsl:when>418<xsl:otherwise>419<xsl:text> is a newly allocated array. The array</xsl:text>420</xsl:otherwise>421</xsl:choose>422<xsl:text> should be freed with </xsl:text>423<a href="#Deallocate"><code>Deallocate</code></a>424<xsl:text>. </xsl:text>425426<xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">427<xsl:with-param name="plural" select="'plural'"/>428</xsl:apply-templates>429</xsl:template>430431<xsl:template match="ptrtype|vmbuf|jmethodID|jfieldID|jframeID|jrawMonitorID|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void" mode="fieldreturndescription">432</xsl:template>433434<xsl:template match="jclass|jthread|jobject|jvalue|jthreadGroup" mode="fieldreturndescription">435<xsl:param name="plural"/>436<xsl:variable name="field" select="ancestor::field"/>437<xsl:text>The object</xsl:text>438<xsl:if test="$plural='plural'">439<xsl:text>s</xsl:text>440</xsl:if>441<xsl:text> returned in the field </xsl:text>442<code>443<xsl:value-of select="$field/@id"/>444</code>445<xsl:text> of </xsl:text>446<code>447<xsl:value-of select="$field/../@id"/>448</code>449<xsl:choose>450<xsl:when test="$plural='plural'">451<xsl:text> are JNI local references and must be </xsl:text>452</xsl:when>453<xsl:otherwise>454<xsl:text> is a JNI local reference and must be </xsl:text>455</xsl:otherwise>456</xsl:choose>457<a href="#refs">managed</a>.458</xsl:template>459460<xsl:template match="nullok" mode="signature">461</xsl:template>462463<xsl:template match="jmethodID|jfieldID|jrawMonitorID|jclass|jthread|jobject|jvalue|jthreadGroup|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|size_t|void" mode="signature">464<xsl:value-of select="name()"/>465</xsl:template>466467<xsl:template match="jframeID" mode="signature">468<xsl:text>jint</xsl:text>469</xsl:template>470471<xsl:template match="uchar" mode="signature">472<xsl:text>unsigned char</xsl:text>473</xsl:template>474475<xsl:template match="enum|struct" mode="signature">476<xsl:value-of select="."/>477</xsl:template>478479<xsl:template match="varargs" mode="signature">480</xsl:template>481482<xsl:template match="outptr|outbuf|allocfieldbuf" mode="signature">483<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>484<xsl:text>*</xsl:text>485</xsl:template>486487<xsl:template match="ptrtype" mode="signature">488<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>489</xsl:template>490491<xsl:template match="inptr|inbuf|vmbuf" mode="signature">492<xsl:text>const </xsl:text>493<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>494<xsl:text>*</xsl:text>495</xsl:template>496497<xsl:template match="allocbuf|agentbuf" mode="signature">498<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>499<xsl:text>**</xsl:text>500</xsl:template>501502<xsl:template match="allocallocbuf" mode="signature">503<xsl:apply-templates select="child::*[position()=1]" mode="signature"/>504<xsl:text>***</xsl:text>505</xsl:template>506507<xsl:template match="nullok" mode="link">508</xsl:template>509510<xsl:template match="jmethodID|jfieldID|jrawMonitorID|jclass|jthread|jobject|jvalue|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|jthreadGroup" mode="link">511<a>512<xsl:attribute name="href">513<xsl:text>#</xsl:text><xsl:value-of select="name()"/>514</xsl:attribute>515<xsl:value-of select="name()"/>516</a>517</xsl:template>518519<xsl:template match="jframeID" mode="link">520<a>521<xsl:attribute name="href">522<xsl:text>#jint</xsl:text>523</xsl:attribute>524<xsl:text>jint</xsl:text>525</a>526</xsl:template>527528<xsl:template match="enum|struct" mode="link">529<a>530<xsl:attribute name="href">531<xsl:text>#</xsl:text>532<xsl:value-of select="."/>533</xsl:attribute>534<xsl:value-of select="."/>535</a>536</xsl:template>537538<xsl:template match="char|size_t|void" mode="link">539<xsl:value-of select="name()"/>540</xsl:template>541542<xsl:template match="uchar" mode="link">543<xsl:text>unsigned char</xsl:text>544</xsl:template>545546<xsl:template match="varargs" mode="link">547<xsl:text>...</xsl:text>548</xsl:template>549550<xsl:template match="ptrtype" mode="link">551<xsl:apply-templates mode="link"/>552</xsl:template>553554<xsl:template match="outptr|outbuf|allocfieldbuf" mode="link">555<xsl:apply-templates mode="link"/>556<xsl:text>*</xsl:text>557</xsl:template>558559<xsl:template match="inptr|inbuf|vmbuf" mode="link">560<xsl:text>const </xsl:text>561<xsl:apply-templates mode="link"/>562<xsl:text>*</xsl:text>563</xsl:template>564565<xsl:template match="allocbuf|agentbuf" mode="link">566<xsl:apply-templates mode="link"/>567<xsl:text>**</xsl:text>568</xsl:template>569570<xsl:template match="allocallocbuf" mode="link">571<xsl:apply-templates mode="link"/>572<xsl:text>***</xsl:text>573</xsl:template>574575<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jobject|jvalue|jthreadGroup|jthread|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|size_t|void" mode="btsig">576<xsl:value-of select="name()"/>577</xsl:template>578579<xsl:template match="uchar" mode="btsig">580<xsl:text>unsigned char</xsl:text>581</xsl:template>582583<xsl:template match="enum|struct" mode="btsig">584<xsl:value-of select="."/>585</xsl:template>586587<xsl:template match="outbuf" mode="btsig">588<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>589<xsl:text>*</xsl:text>590</xsl:template>591592<xsl:template name="gentypedef">593<xsl:param name="tdef"/>594<xsl:text>typedef struct {595</xsl:text>596<xsl:apply-templates select="$tdef/field" mode="signature"/>597<xsl:text>} </xsl:text>598<xsl:value-of select="$tdef/@id"/>599<xsl:text>;</xsl:text>600</xsl:template>601602<xsl:template name="genuniontypedef">603<xsl:param name="tdef"/>604<xsl:text>typedef union {605</xsl:text>606<xsl:apply-templates select="$tdef/field" mode="signature"/>607<xsl:text>} </xsl:text>608<xsl:value-of select="$tdef/@id"/>609<xsl:text>;</xsl:text>610</xsl:template>611612613<xsl:template match="capabilitiestypedef" mode="genstruct">614<xsl:variable name="caps" select="count(capabilityfield)"/>615<xsl:text>typedef struct {616</xsl:text>617<xsl:apply-templates select="capabilityfield" mode="signature"/>618<xsl:variable name="rem" select="$caps mod 16"/>619<xsl:if test="$rem != 0">620<xsl:text> unsigned int : </xsl:text>621<xsl:value-of select="16 - $rem"/>622<xsl:text>;623</xsl:text>624</xsl:if>625<xsl:if test="$caps <= 32">626<xsl:text> unsigned int : 16;627</xsl:text>628</xsl:if>629<xsl:if test="$caps <= 48">630<xsl:text> unsigned int : 16;631</xsl:text>632</xsl:if>633<xsl:if test="$caps <= 64">634<xsl:text> unsigned int : 16;635</xsl:text>636</xsl:if>637<xsl:if test="$caps <= 80">638<xsl:text> unsigned int : 16;639</xsl:text>640</xsl:if>641<xsl:if test="$caps <= 96">642<xsl:text> unsigned int : 16;643</xsl:text>644</xsl:if>645<xsl:if test="$caps <= 112">646<xsl:text> unsigned int : 16;647</xsl:text>648</xsl:if>649<xsl:text>} </xsl:text>650<xsl:value-of select="@id"/>651<xsl:text>;</xsl:text>652</xsl:template>653654<xsl:template match="capabilityfield" mode="signature">655<xsl:text> unsigned int </xsl:text>656<xsl:value-of select="@id"/>657<xsl:text> : 1;658</xsl:text>659</xsl:template>660661<xsl:template match="constants" mode="enum">662<xsl:text>663typedef </xsl:text>664<xsl:apply-templates select="." mode="enumcore"/>665<xsl:text> </xsl:text>666<xsl:value-of select="@id"/>667<xsl:text>;</xsl:text>668</xsl:template>669670<xsl:template match="constants" mode="constants">671<xsl:text>672</xsl:text>673<xsl:apply-templates select="." mode="enumcore"/>674<xsl:text>;</xsl:text>675</xsl:template>676677<xsl:template match="constants" mode="enumcore">678<xsl:text>enum {679</xsl:text>680<xsl:for-each select="constant">681<xsl:if test="position() > 1">682<xsl:text>,683</xsl:text>684</xsl:if>685<xsl:apply-templates select="." mode="enum"/>686</xsl:for-each>687<xsl:text>688}</xsl:text>689</xsl:template>690691<xsl:template match="event" mode="enum">692<xsl:text> </xsl:text>693<xsl:value-of select="@const"/>694<xsl:text> = </xsl:text>695<xsl:value-of select="@num"/>696</xsl:template>697698<xsl:template match="constant|errorid" mode="enum">699<xsl:text> </xsl:text>700<xsl:value-of select="@id"/>701<xsl:text> = </xsl:text>702<xsl:value-of select="@num"/>703</xsl:template>704705706<xsl:template name="eventStruct">707<xsl:param name="events"/>708<xsl:param name="index"/>709<xsl:param name="started"/>710<xsl:param name="comment"/>711<xsl:variable name="thisEvent" select="$events[@num=$index]"/>712<xsl:choose>713<xsl:when test="count($thisEvent)=1">714<xsl:if test="$comment='Yes'">715<xsl:text> /* </xsl:text>716<xsl:number value="$index" format=" 1"/>717<xsl:text> : </xsl:text>718<xsl:value-of select="$thisEvent/@label"/>719<xsl:text> */720</xsl:text>721</xsl:if>722<xsl:text> jvmtiEvent</xsl:text>723<xsl:value-of select="$thisEvent/@id"/>724<xsl:text> </xsl:text>725<xsl:value-of select="$thisEvent/@id"/>726<xsl:text>;727</xsl:text>728</xsl:when>729<xsl:otherwise>730<xsl:if test="$started">731<xsl:if test="$comment='Yes'">732<xsl:text> /* </xsl:text>733<xsl:number value="$index" format=" 1"/>734<xsl:text> */735</xsl:text>736</xsl:if>737<xsl:text> jvmtiEventReserved reserved</xsl:text>738<xsl:value-of select="$index"/>739<xsl:text>;740</xsl:text>741</xsl:if>742</xsl:otherwise>743</xsl:choose>744<xsl:if test="count($events[@num > $index]) > 0">745<xsl:call-template name="eventStruct">746<xsl:with-param name="events" select="$events"/>747<xsl:with-param name="index" select="1+$index"/>748<xsl:with-param name="started" select="$started or count($thisEvent)=1"/>749<xsl:with-param name="comment" select="$comment"/>750</xsl:call-template>751</xsl:if>752</xsl:template>753754755<!-- ======== HotSpotType ======== -->756757<xsl:template match="parameters" mode="HotSpotSig">758<xsl:variable name="length" select="count(param)"/>759<xsl:for-each select="param">760<xsl:variable name="separator">761<xsl:choose>762<xsl:when test="position()=$length">763<xsl:text></xsl:text>764</xsl:when>765<xsl:otherwise>766<xsl:text>, </xsl:text>767</xsl:otherwise>768</xsl:choose>769</xsl:variable>770<xsl:apply-templates select="." mode="HotSpotSig">771<xsl:with-param name="comma" select="$separator"/>772</xsl:apply-templates>773</xsl:for-each>774</xsl:template>775776<xsl:template match="param" mode="HotSpotSig">777<xsl:param name="comma"/>778<xsl:variable name="result">779<xsl:apply-templates select="child::*[position()=1]" mode="HotSpotType"/>780</xsl:variable>781<xsl:if test="string-length($result)!=0">782<xsl:value-of select="$result"/>783<xsl:text> </xsl:text>784<xsl:apply-templates select="child::*[position()=1]" mode="HotSpotName">785<xsl:with-param name="name" select="@id"/>786</xsl:apply-templates>787<xsl:value-of select="$comma"/>788</xsl:if>789</xsl:template>790791<xsl:template match="jthread" mode="HotSpotType">792<xsl:choose>793<xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">794<xsl:text>JavaThread*</xsl:text>795</xsl:when>796<xsl:otherwise>797<xsl:value-of select="name()"/>798</xsl:otherwise>799</xsl:choose>800</xsl:template>801802<xsl:template match="jrawMonitorID" mode="HotSpotType">803<xsl:text>JvmtiRawMonitor *</xsl:text>804</xsl:template>805806<xsl:template match="jframeID" mode="HotSpotType">807<xsl:text>jint</xsl:text>808</xsl:template>809810<xsl:template match="jmethodID" mode="HotSpotType">811<xsl:text>Method*</xsl:text>812</xsl:template>813814<xsl:template match="jfieldID" mode="HotSpotType">815<xsl:text>fieldDescriptor*</xsl:text>816</xsl:template>817818<xsl:template match="jclass" mode="HotSpotType">819<!--820classes passed as part of a class/method or class/field pair are used821by the wrapper to get the internal type but are not needed by nor822passed to the implementation layer.823-->824<xsl:if test="count(@method|@field)=0">825<xsl:text>oop</xsl:text>826</xsl:if>827</xsl:template>828829<xsl:template match="nullok" mode="HotSpotType">830</xsl:template>831832<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="HotSpotType">833<xsl:apply-templates select="." mode="btsig"/>834</xsl:template>835836<xsl:template match="varargs" mode="HotSpotType">837<xsl:text> </xsl:text>838</xsl:template>839840<xsl:template match="outptr|outbuf|allocfieldbuf" mode="HotSpotType">841<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>842<xsl:text>*</xsl:text>843</xsl:template>844845<xsl:template match="ptrtype" mode="HotSpotType">846<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>847</xsl:template>848849<xsl:template match="inptr|inbuf|vmbuf" mode="HotSpotType">850<xsl:text>const </xsl:text>851<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>852<xsl:text>*</xsl:text>853</xsl:template>854855<xsl:template match="allocbuf|agentbuf" mode="HotSpotType">856<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>857<xsl:text>**</xsl:text>858</xsl:template>859860<xsl:template match="allocallocbuf" mode="HotSpotType">861<xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>862<xsl:text>***</xsl:text>863</xsl:template>864865<!-- ======== HotSpotName ======== -->866867<xsl:template match="jthread" mode="HotSpotName">868<xsl:param name="name"/>869<xsl:choose>870<xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">871<xsl:text>java_thread</xsl:text>872</xsl:when>873<xsl:otherwise>874<xsl:value-of select="$name"/>875</xsl:otherwise>876</xsl:choose>877</xsl:template>878879<xsl:template match="jrawMonitorID" mode="HotSpotName">880<xsl:text>rmonitor</xsl:text>881</xsl:template>882883<xsl:template match="jframeID" mode="HotSpotName">884<xsl:text>depth</xsl:text>885</xsl:template>886887<xsl:template match="jmethodID" mode="HotSpotName">888<xsl:text>method_oop</xsl:text>889</xsl:template>890891<xsl:template match="jfieldID" mode="HotSpotName">892<xsl:text>fdesc_ptr</xsl:text>893</xsl:template>894895<xsl:template match="jclass" mode="HotSpotName">896<!--897classes passed as part of a class/method or class/field pair are used898by the wrapper to get the internal type but are not needed by nor899passed to the implementation layer. This value is checked for empty.900-->901<xsl:if test="count(@method|@field)=0">902<xsl:text>k_mirror</xsl:text>903</xsl:if>904</xsl:template>905906<xsl:template match="nullok" mode="HotSpotName">907</xsl:template>908909<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct|outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="HotSpotName">910<xsl:param name="name"/>911<xsl:value-of select="$name"/>912</xsl:template>913914<!-- ======== HotSpotValue ======== -->915916917<xsl:template match="parameters" mode="HotSpotValue">918<xsl:variable name="length" select="count(param)"/>919<xsl:for-each select="param">920<xsl:variable name="separator">921<xsl:choose>922<xsl:when test="position()=$length">923<xsl:text></xsl:text>924</xsl:when>925<xsl:otherwise>926<xsl:text>, </xsl:text>927</xsl:otherwise>928</xsl:choose>929</xsl:variable>930<xsl:apply-templates select="." mode="HotSpotValue">931<xsl:with-param name="comma" select="$separator"/>932</xsl:apply-templates>933</xsl:for-each>934</xsl:template>935936<xsl:template match="param" mode="HotSpotValue">937<xsl:param name="comma"/>938<xsl:variable name="result">939<xsl:apply-templates select="child::*[position()=1]" mode="HotSpotValue">940<xsl:with-param name="name" select="@id"/>941</xsl:apply-templates>942</xsl:variable>943<xsl:if test="string-length($result)!=0">944<xsl:value-of select="$result"/>945<xsl:value-of select="$comma"/>946</xsl:if>947</xsl:template>948949<xsl:template match="jframeID|jmethodID|jrawMonitorID|jthread|jclass|nullok" mode="HotSpotValue">950<xsl:param name="name"/>951<xsl:apply-templates select="." mode="HotSpotName">952<xsl:with-param name="name" select="$name"/>953</xsl:apply-templates>954</xsl:template>955956<xsl:template match="jfieldID" mode="HotSpotValue">957<xsl:text>&fdesc</xsl:text>958</xsl:template>959960<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct|outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="HotSpotValue">961<xsl:param name="name"/>962<xsl:value-of select="$name"/>963</xsl:template>964965<xsl:template match="varargs" mode="HotSpotValue">966<xsl:text>NULL</xsl:text>967</xsl:template>968969</xsl:stylesheet>970971972973