annotate src/share/vm/prims/jvmtiEnv.xsl @ 0:a61af66fc99e

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