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