src/share/vm/prims/jvmtiEnv.xsl

Wed, 27 Apr 2016 01:25:04 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:25:04 +0800
changeset 0
f90c822e73f8
child 6876
710a3c8b516e
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/
changeset: 6782:28b50d07f6f8
tag: jdk8u25-b17

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

mercurial