0N/A<?xml version="1.0"?>
0N/A<!--
1879N/A Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A
0N/A This code is free software; you can redistribute it and/or modify it
0N/A under the terms of the GNU General Public License version 2 only, as
0N/A published by the Free Software Foundation.
0N/A
0N/A This code is distributed in the hope that it will be useful, but WITHOUT
0N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A version 2 for more details (a copy is included in the LICENSE file that
0N/A accompanied this code).
0N/A
0N/A You should have received a copy of the GNU General Public License version
0N/A 2 along with this work; if not, write to the Free Software Foundation,
0N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A
1472N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A or visit www.oracle.com if you need additional information or have any
1472N/A questions.
0N/A
0N/A-->
0N/A
0N/A<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
0N/A
0N/A<xsl:import href="jvmtiLib.xsl"/>
0N/A
0N/A<xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
0N/A
0N/A<xsl:template match="/">
0N/A <xsl:apply-templates select="specification"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="specification">
0N/A <xsl:call-template name="sourceHeader"/>
0N/A <xsl:text>
0N/A
0N/A// end file prefix - do not modify or remove this line
0N/A</xsl:text>
0N/A <xsl:apply-templates select="functionsection"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="functionsection">
0N/A <xsl:apply-templates select="category"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="category">
0N/A <xsl:text>
0N/A //
0N/A // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions
0N/A //
0N/A</xsl:text>
0N/A <xsl:apply-templates select="function[not(contains(@impl,'unimpl'))]"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="function">
0N/A <xsl:apply-templates select="parameters" mode="advice"/>
0N/A <xsl:text>
0N/AjvmtiError
0N/AJvmtiEnv::</xsl:text>
0N/A <xsl:if test="count(@hide)=1">
0N/A <xsl:value-of select="@hide"/>
0N/A </xsl:if>
0N/A <xsl:value-of select="@id"/>
0N/A <xsl:text>(</xsl:text>
0N/A <xsl:apply-templates select="parameters" mode="HotSpotSig"/>
0N/A <xsl:text>) {</xsl:text>
0N/A <xsl:for-each select="parameters/param/jclass">
0N/A <xsl:if test="count(@method|@field)=0">
0N/A<xsl:text>
0N/A if (java_lang_Class::is_primitive(k_mirror)) {
0N/A // DO PRIMITIVE CLASS PROCESSING
0N/A return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
0N/A }
0N/A klassOop k_oop = java_lang_Class::as_klassOop(k_mirror);
0N/A if (k_oop == NULL) {
0N/A return JVMTI_ERROR_INVALID_CLASS;
0N/A }</xsl:text>
0N/A </xsl:if>
0N/A </xsl:for-each>
0N/A<xsl:text>
0N/A return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
0N/A} /* end </xsl:text>
0N/A <xsl:if test="count(@hide)=1">
0N/A <xsl:value-of select="@hide"/>
0N/A </xsl:if>
0N/A <xsl:value-of select="@id"/>
0N/A <xsl:text> */
0N/A
0N/A</xsl:text>
0N/A</xsl:template>
0N/A
0N/A
0N/A<!-- ======== ADVICE ======== -->
0N/A
0N/A<xsl:template match="parameters" mode="advice">
0N/A <xsl:apply-templates select="param" mode="advice"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="param" mode="advice">
0N/A <xsl:apply-templates select="child::*[position()=1]" mode="advice">
0N/A <xsl:with-param name="name" select="@id"/>
0N/A </xsl:apply-templates>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jthread" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:choose>
0N/A <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
0N/A <xsl:text>
0N/A// Threads_lock NOT held, java_thread not protected by lock
0N/A// java_thread - pre-checked</xsl:text>
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:text>
0N/A// Threads_lock NOT held
0N/A// </xsl:text>
0N/A <xsl:value-of select="$name"/>
0N/A <xsl:text> - NOT pre-checked</xsl:text>
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jrawMonitorID" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:text>
0N/A// rmonitor - pre-checked for validity</xsl:text>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jframeID" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:text>
0N/A// java_thread - unchecked
0N/A// depth - pre-checked as non-negative</xsl:text>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jmethodID" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:text>
0N/A// method_oop - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jfieldID" mode="advice">
0N/A <xsl:param name="name"/>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jclass" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <!--
0N/A classes passed as part of a class/method or class/field pair are used
0N/A by the wrapper to get the internal type but are not needed by nor
0N/A passed to the implementation layer.
0N/A -->
0N/A <xsl:if test="count(@method|@field)=0">
0N/A <xsl:text>
0N/A// k_mirror - may be primitive, this must be checked</xsl:text>
0N/A </xsl:if>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="nullok" mode="advice">
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:choose>
0N/A <xsl:when test="count(nullok)=0">
0N/A <xsl:text>
0N/A// </xsl:text>
0N/A <xsl:value-of select="$name"/>
0N/A <xsl:text> - pre-checked for NULL</xsl:text>
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:text>
0N/A// </xsl:text>
0N/A <xsl:value-of select="$name"/>
0N/A <xsl:text> - NULL is a valid value, must be checked</xsl:text>
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jint" mode="advice">
0N/A <xsl:param name="name"/>
0N/A <xsl:if test="count(@min)=1">
0N/A <xsl:text>
0N/A// </xsl:text>
0N/A <xsl:value-of select="$name"/>
0N/A <xsl:text> - pre-checked to be greater than or equal to </xsl:text>
0N/A <xsl:value-of select="@min"/>
0N/A </xsl:if>
0N/A</xsl:template>
0N/A
0N/A<xsl:template match="jobject|jvalue|jthreadGroup|enum|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct" mode="advice">
0N/A <xsl:param name="name"/>
0N/A</xsl:template>
0N/A
0N/A</xsl:stylesheet>