hotspot/src/share/vm/prims/jvmtiEnv.xsl
author hseigel
Mon, 12 Nov 2012 16:15:05 -0500
changeset 14488 ab48109f7d1b
parent 13728 882756847a04
permissions -rw-r--r--
8001471: Klass::cast() does nothing Summary: Remove function Klass::cast() and calls to it. Reviewed-by: dholmes, coleenp
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
<!--
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
     3
 Copyright (c) 2002, 2012, 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
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
// end file prefix - do not modify or remove this line
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  <xsl:apply-templates select="functionsection"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
<xsl:template match="functionsection">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  <xsl:apply-templates select="category"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
<xsl:template match="category">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  // 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  <xsl:apply-templates select="function[not(contains(@impl,'unimpl'))]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
<xsl:template match="function">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  <xsl:apply-templates select="parameters" mode="advice"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
jvmtiError
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
JvmtiEnv::</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  <xsl:if test="count(@hide)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    <xsl:value-of select="@hide"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  <xsl:text>(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  <xsl:apply-templates select="parameters" mode="HotSpotSig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  <xsl:text>) {</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  <xsl:for-each select="parameters/param/jclass">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
    <xsl:if test="count(@method|@field)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
<xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  if (java_lang_Class::is_primitive(k_mirror)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    // DO PRIMITIVE CLASS PROCESSING
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  }
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    77
  Klass* k_oop = java_lang_Class::as_Klass(k_mirror);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  if (k_oop == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    return JVMTI_ERROR_INVALID_CLASS;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  }</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
<xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
} /* end </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  <xsl:if test="count(@hide)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    <xsl:value-of select="@hide"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
<!-- ======== ADVICE ======== -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
<xsl:template match="parameters" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  <xsl:apply-templates select="param" mode="advice"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
<xsl:template match="param" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  <xsl:apply-templates select="child::*[position()=1]" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
<xsl:template match="jthread" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
// Threads_lock NOT held, java_thread not protected by lock
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
// java_thread - pre-checked</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
// Threads_lock NOT held
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
      <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
      <xsl:text> - NOT pre-checked</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
<xsl:template match="jrawMonitorID" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
// rmonitor - pre-checked for validity</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
<xsl:template match="jframeID" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
// java_thread - unchecked 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
// depth - pre-checked as non-negative</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
<xsl:template match="jmethodID" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
<xsl:template match="jfieldID" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
<xsl:template match="jclass" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  <!--
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    classes passed as part of a class/method or class/field pair are used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
    by the wrapper to get the internal type but are not needed by nor 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
    passed to the implementation layer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  <xsl:if test="count(@method|@field)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
// k_mirror - may be primitive, this must be checked</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
<xsl:template match="nullok" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
<xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    <xsl:when test="count(nullok)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
      <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
      <xsl:text> - pre-checked for NULL</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
      <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
      <xsl:text> - NULL is a valid value, must be checked</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
<xsl:template match="jint" mode="advice">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  <xsl:if test="count(@min)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
    <xsl:text> - pre-checked to be greater than or equal to </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
    <xsl:value-of select="@min"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
<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
   195
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
</xsl:stylesheet>