hotspot/src/share/vm/prims/jvmtiEnter.xsl
author jprovino
Mon, 04 Apr 2016 12:57:48 -0400
changeset 37248 11a660dbbb8e
parent 36508 5f9eee6b383b
child 37992 c7ec6a3275f7
permissions -rw-r--r--
8132524: Missing includes to resourceArea.hpp Summary: Files that use ResourceMark are missing the include of resourceArea.hpp Reviewed-by: tschatzl, jwilhelm
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
<!--
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 34633
diff changeset
     3
 Copyright (c) 2002, 2016, 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: 4571
diff changeset
    20
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4571
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: 4571
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:param name="trace"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
<xsl:param name="interface"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
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>
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
# include "precompiled.hpp"
37248
11a660dbbb8e 8132524: Missing includes to resourceArea.hpp
jprovino
parents: 36508
diff changeset
    40
# include "memory/resourceArea.hpp"
13975
2f7431485cfa 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 13728
diff changeset
    41
# include "utilities/macros.hpp"
2f7431485cfa 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 13728
diff changeset
    42
#if INCLUDE_JVMTI
29081
c61eb4914428 8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents: 24424
diff changeset
    43
# include "oops/oop.inline.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    44
# include "prims/jvmtiEnter.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    45
# include "prims/jvmtiRawMonitor.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    46
# include "prims/jvmtiUtil.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  <xsl:if test="$trace = 'Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
   <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
#ifdef JVMTI_TRACE
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
 <xsl:if test="$trace != 'Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
// Error names
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
const char* JvmtiUtil::_error_names[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    <xsl:call-template name="fillEntityName"> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
      <xsl:with-param name="entities" select="errorsection/errorcategory/errorid"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
// Event threaded
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
const bool JvmtiUtil::_event_threaded[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    <xsl:call-template name="fillEventThreaded"> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
      <xsl:with-param name="entities" select="eventsection/event"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    <xsl:call-template name="eventCapabilitiesTest"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
 </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
 <xsl:if test="$trace = 'Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
<!--  all this just to return the highest event number -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  <xsl:variable name="maxEvent">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    <xsl:for-each select="eventsection/event">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
      <xsl:variable name="mynum" select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
      <xsl:if test="count(../../eventsection/event[@num &gt; $mynum]) = 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
        <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    </xsl:for-each>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  <xsl:text>jbyte JvmtiTrace::_event_trace_flags[</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  <xsl:value-of select="1+$maxEvent"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  <xsl:text>];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
jint JvmtiTrace::_max_event_index = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  <xsl:value-of select="$maxEvent"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
// Event names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
const char* JvmtiTrace::_event_names[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    <xsl:call-template name="fillEntityName"> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
      <xsl:with-param name="entities" select="eventsection/event"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    <xsl:apply-templates select="//constants[@kind='enum']"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  <xsl:apply-templates select="functionsection"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
   <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
#endif /*JVMTI_TRACE */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
<xsl:template match="constants">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  <xsl:value-of select="@label"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  <xsl:text> names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
const char* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  <xsl:text>ConstantNames[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  <xsl:apply-templates select="constant" mode="constname"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  <xsl:text>  NULL
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
// </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  <xsl:value-of select="@label"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  <xsl:text> value
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
jint </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  <xsl:text>ConstantValues[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  <xsl:apply-templates select="constant" mode="constvalue"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  <xsl:text>  0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
</xsl:text>
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="constant" mode="constname">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  <xsl:text>  "</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  <xsl:text>",
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
<xsl:template match="constant" mode="constvalue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  <xsl:text>  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
</xsl:text>
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 name="eventCapabilitiesTest">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
// Check Event Capabilities
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
const bool JvmtiUtil::has_event_capability(jvmtiEvent event_type, const jvmtiCapabilities* capabilities_ptr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  switch (event_type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  <xsl:for-each select="//eventsection/event">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    <xsl:variable name="capa" select="capabilities/required"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    <xsl:if test="count($capa)">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
        <xsl:text>    case </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
        <xsl:value-of select="@const"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
        <xsl:text>:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
      return capabilities_ptr-&gt;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
        <xsl:value-of select="$capa/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
        <xsl:text> != 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  <xsl:text>  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  // if it does not have a capability it is required
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  return JNI_TRUE;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
<xsl:template match="functionsection">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
<!--  all this just to return the highest function number -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  <xsl:variable name="maxFunction">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    <xsl:for-each select="category/function">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
      <xsl:variable name="mynum" select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
      <xsl:if test="count(../../category/function[@num &gt; $mynum]) = 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
        <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
    </xsl:for-each>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  <xsl:text>jbyte JvmtiTrace::_trace_flags[</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  <xsl:value-of select="1+$maxFunction"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  <xsl:text>];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
jint JvmtiTrace::_max_function_index = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  <xsl:value-of select="$maxFunction"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
// Function names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
const char* JvmtiTrace::_function_names[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  <xsl:call-template name="fillEntityName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    <xsl:with-param name="entities" select="category/function"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
// Exclude list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
short JvmtiTrace::_exclude_functions[] = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  <xsl:apply-templates select="category/function" mode="notrace">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
    <xsl:sort select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  <xsl:text>0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
extern "C" {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  <xsl:apply-templates select="category" mode="wrapper"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
} /* end extern "C" */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
// JVMTI API functions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
struct jvmtiInterface_1_ jvmti</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  <xsl:value-of select="$trace"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  <xsl:text>_Interface = {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  <xsl:call-template name="fillFuncStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
    <xsl:with-param name="funcs" select="category/function[count(@hide)=0]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
};
13975
2f7431485cfa 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 13728
diff changeset
   254
#endif // INCLUDE_JVMTI
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
<xsl:template match="function" mode="functionid">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  <xsl:text>jvmti</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  <xsl:value-of select="$trace"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  <xsl:text>_</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
<xsl:template name="fillFuncStructDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  <xsl:param name="func"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
  <xsl:param name="index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  <xsl:text>                              /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  <xsl:number value="$index" format="  1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  <xsl:text> : </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
    <xsl:when test="count($func)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
      <xsl:value-of select="$func/synopsis"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
      <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
      </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
      <xsl:apply-templates select="$func" mode="functionid"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
      <xsl:text> RESERVED */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
      NULL</xsl:text>        
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
<!-- generic function iterator applied to the function structure -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
<xsl:template name="fillFuncStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
  <xsl:param name="funcs"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
  <xsl:param name="index" select="1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
  <xsl:call-template name="fillFuncStructDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
    <xsl:with-param name="func" select="$funcs[@num=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
    <xsl:with-param name="index" select="$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  <xsl:if test="count($funcs[@num &gt; $index]) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
    <xsl:call-template name="fillFuncStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
      <xsl:with-param name="funcs" select="$funcs"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
      <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
<xsl:template name="fillEntityNameDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
  <xsl:param name="entity"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  <xsl:param name="index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
    <xsl:when test="count($entity) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
      <xsl:text>  "</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
      <xsl:value-of select="$entity[position()=1]/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
      <xsl:text>"</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
      <xsl:text>  NULL</xsl:text>        
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
<!-- generic entity (with id and num) iterator applied to entity names -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
<xsl:template name="fillEntityName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  <xsl:param name="entities"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
  <xsl:param name="index" select="0"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
  <xsl:call-template name="fillEntityNameDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
    <xsl:with-param name="entity" select="$entities[@num=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
    <xsl:with-param name="index" select="$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
  <xsl:if test="count($entities[@num &gt; $index]) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
    <xsl:call-template name="fillEntityName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
      <xsl:with-param name="entities" select="$entities"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
      <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
<xsl:template name="fillEventThreadedDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  <xsl:param name="entity"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
  <xsl:param name="index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
    <xsl:when test="count($entity) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
      <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
        <xsl:when test="count($entity[position()=1]/@filtered)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
          <xsl:text>  false</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
        </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
        <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
          <xsl:text>  true</xsl:text>        
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
        </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
      </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
      <xsl:text>  false</xsl:text>        
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
<xsl:template name="fillEventThreaded">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
  <xsl:param name="entities"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
  <xsl:param name="index" select="0"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
  <xsl:call-template name="fillEventThreadedDoit">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
    <xsl:with-param name="entity" select="$entities[@num=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
    <xsl:with-param name="index" select="$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
  <xsl:if test="count($entities[@num &gt; $index]) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
    <xsl:call-template name="fillEventThreaded">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
      <xsl:with-param name="entities" select="$entities"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
      <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
<xsl:template match="function" mode="notrace">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
  <xsl:if test="count(@impl)=1 and contains(@impl,'notrace')">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
    <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
<xsl:template match="category" mode="wrapper">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
  // 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  <xsl:apply-templates select="function[count(@hide)=0]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
<xsl:template match="function" mode="transition">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
  <xsl:param name="space">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
  </xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
  <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
  <xsl:choose> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
    <xsl:when test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
      <xsl:text>if (this_thread == NULL || !this_thread->is_Java_thread()) {</xsl:text> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
    </xsl:when> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
    <xsl:otherwise> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
      <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
        <xsl:when test="count(@phase)=0 or contains(@phase,'live') or contains(@phase,'start')">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
	  <xsl:text>if (this_thread == NULL || (!this_thread->is_Java_thread() &amp;&amp; !this_thread->is_VM_thread())) {</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
        </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
        <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
          <xsl:text>if (!this_thread->is_Java_thread()) {</xsl:text> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
        </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
      </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
     </xsl:otherwise> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
  </xsl:choose> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
    <xsl:text>  if (trace_flags) {</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
    <xsl:text>    tty->print_cr("JVMTI [non-attached thread] %s %s",  func_name,</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
    <xsl:text>    JvmtiUtil::error_name(JVMTI_ERROR_UNATTACHED_THREAD));</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
    <xsl:text>  }</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
  <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
  <xsl:text>  return JVMTI_ERROR_UNATTACHED_THREAD;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
  <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
  <xsl:text>}</xsl:text>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
  <xsl:value-of select="$space"/>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
  <xsl:if test="count(@impl)=0 or not(contains(@impl,'innative'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
    <xsl:text>JavaThread* current_thread = (JavaThread*)this_thread;</xsl:text>   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
    <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
    <xsl:value-of select="$space"/>
10969
3ecf25293e5a 7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
never
parents: 7397
diff changeset
   434
    <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
    <xsl:apply-templates select="." mode="functionid"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
    <xsl:text> , current_thread)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
    <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
    <xsl:text>debug_only(VMNativeEntryWrapper __vew;)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
    <xsl:if test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
      <xsl:value-of select="$space"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
      <xsl:text>CautiouslyPreserveExceptionMark __em(this_thread);</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
<xsl:template match="required">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
  if (jvmti_env-&gt;get_capabilities()-&gt;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
    <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
    <xsl:text> == 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
    <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
      <xsl:text>    if (trace_flags) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
          tty->print_cr("JVMTI [%s] %s %s",  curr_thread_name, func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
                    JvmtiUtil::error_name(JVMTI_ERROR_MUST_POSSESS_CAPABILITY));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
    <xsl:text>    return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
<xsl:template match="function">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
static jvmtiError JNICALL
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
  <xsl:apply-templates select="." mode="functionid"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
  <xsl:text>(jvmtiEnv* env</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
  <xsl:apply-templates select="parameters" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
  <xsl:text>) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
  <xsl:if test="not(contains(@jkernel,'yes'))">
13975
2f7431485cfa 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 13728
diff changeset
   477
  <xsl:text>&#xA;#if !INCLUDE_JVMTI &#xA;</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
  <xsl:text>  return JVMTI_ERROR_NOT_AVAILABLE; &#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
  <xsl:text>#else &#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
  <xsl:apply-templates select="." mode="traceSetUp"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
    <xsl:when test="count(@phase)=0 or contains(@phase,'live')">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
      <xsl:text>  if(!JvmtiEnv::is_vm_live()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
    <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
      <xsl:text>    if (trace_flags) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
          tty->print_cr("JVMTI [-] %s %s",  func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
                    JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
    <xsl:text>    return JVMTI_ERROR_WRONG_PHASE;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
  }</xsl:text>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
      <xsl:text>  
34633
2a6c7c7b30a7 8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables
dholmes
parents: 33589
diff changeset
   498
  Thread* this_thread = Thread::current_or_null(); </xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
      <xsl:apply-templates select="." mode="transition"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
      <xsl:if test="contains(@phase,'onload')">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
        <xsl:text>  if(JvmtiEnv::get_phase()!=JVMTI_PHASE_ONLOAD</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
        <xsl:if test="not(contains(@phase,'onloadOnly'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
          <xsl:text> &amp;&amp; JvmtiEnv::get_phase()!=JVMTI_PHASE_LIVE</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
        </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
        <xsl:text>) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
    <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
      <xsl:text>    if (trace_flags) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
          tty->print_cr("JVMTI [-] %s %s",  func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
                    JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
    <xsl:text>    return JVMTI_ERROR_WRONG_PHASE;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
  }</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
      <xsl:if test="contains(@phase,'start')">
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 34633
diff changeset
   521
        <xsl:text>  if(JvmtiEnv::get_phase(env)!=JVMTI_PHASE_START &amp;&amp; JvmtiEnv::get_phase()!=JVMTI_PHASE_LIVE) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
    <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
      <xsl:text>    if (trace_flags) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
          tty->print_cr("JVMTI [-] %s %s",  func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
                    JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
    <xsl:text>    return JVMTI_ERROR_WRONG_PHASE;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
  }
34633
2a6c7c7b30a7 8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables
dholmes
parents: 33589
diff changeset
   532
  Thread* this_thread = Thread::current_or_null(); </xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
      <xsl:apply-templates select="." mode="transition"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
  JvmtiEnv* jvmti_env = JvmtiEnv::JvmtiEnv_from_jvmti_env(env);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
  if (!jvmti_env->is_valid()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
    <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
      <xsl:text>    if (trace_flags) {
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   544
          tty->print_cr("JVMTI [%s] %s %s  env=" PTR_FORMAT,  curr_thread_name, func_name, 
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   545
                    JvmtiUtil::error_name(JVMTI_ERROR_INVALID_ENVIRONMENT), p2i(env));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
    <xsl:text>    return JVMTI_ERROR_INVALID_ENVIRONMENT;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
  <xsl:apply-templates select="capabilities/required"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
  <xsl:text>  jvmtiError err;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
    <xsl:when test="count(@phase)=1 and not(contains(@phase,'live')) and not(contains(@phase,'start'))">    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
      <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
        <xsl:when test="count(@callbacksafe)=0 or not(contains(@callbacksafe,'safe'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
          <xsl:text>  if (Threads::number_of_threads() != 0) {
34633
2a6c7c7b30a7 8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables
dholmes
parents: 33589
diff changeset
   562
    Thread* this_thread = Thread::current_or_null();</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
        </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
        <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
	  <xsl:text>  Thread* this_thread = NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
  bool transition;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
  if (Threads::number_of_threads() == 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
    transition = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
  } else {
34633
2a6c7c7b30a7 8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables
dholmes
parents: 33589
diff changeset
   571
    this_thread = Thread::current_or_null();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
    transition = ((this_thread != NULL) &amp;&amp; !this_thread->is_VM_thread() &amp;&amp; !this_thread->is_ConcurrentGC_thread());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
  if (transition) {</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
	</xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
      </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
      <!-- we allow use in early phases but there are threads now, -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
      <!-- so do thread transition -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
      <xsl:apply-templates select="." mode="transition">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
          <xsl:with-param name="space">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
            <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
          </xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
      </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
      <xsl:apply-templates select="." mode="doCall"/>     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
      <xsl:text>  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
  </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
      <!-- we are pre-thread - no thread transition code -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
      <xsl:apply-templates select="." mode="doCall"/>     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
      <xsl:text>  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
      <xsl:apply-templates select="." mode="doCall"/>      
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
  <xsl:text>  return err;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
  <xsl:if test="not(contains(@jkernel,'yes'))">
13975
2f7431485cfa 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 13728
diff changeset
   604
  <xsl:text>#endif // INCLUDE_JVMTI&#xA;</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
  <xsl:text>}&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
<xsl:template match="function" mode="doCall">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
  <xsl:apply-templates select="parameters" mode="dochecks"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
  <xsl:apply-templates select="." mode="traceBefore"/>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
  <xsl:apply-templates select="." mode="genCall"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
  <xsl:apply-templates select="." mode="traceAfter"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
<xsl:template match="function" mode="genCall">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
  <xsl:text>  err = jvmti_env-&gt;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   619
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   620
  <xsl:text>(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
  <xsl:apply-templates select="parameters" mode="HotSpotValue"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
  <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
<xsl:template match="function" mode="traceSetUp">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   629
    <xsl:text>  SafeResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
  jint trace_flags = JvmtiTrace::trace_flags(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
      <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   632
      <xsl:text>);
33589
7cbd1b2c139b 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
goetz
parents: 33148
diff changeset
   633
  const char *func_name = NULL;
7cbd1b2c139b 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
goetz
parents: 33148
diff changeset
   634
  const char *curr_thread_name = NULL;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
  if (trace_flags) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
    func_name = JvmtiTrace::function_name(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   637
      <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   638
      <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
    curr_thread_name = JvmtiTrace::safe_get_current_thread_name();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   641
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   642
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
489c9b5090e2 Initial load
duke
parents:
diff changeset
   646
<xsl:template match="function" mode="traceBefore">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
  if ((trace_flags &amp; JvmtiTrace::SHOW_IN) != 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   650
    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   651
    <xsl:apply-templates select="." mode="traceIn"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
    <xsl:text>  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   655
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
<xsl:template match="param" mode="traceError">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
  <xsl:param name="err"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   660
  <xsl:param name="comment"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
  <xsl:param name="extraValue"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   663
  <xsl:text>      if ((trace_flags &amp; JvmtiTrace::SHOW_ERROR) != 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   664
        if ((trace_flags &amp; JvmtiTrace::SHOW_IN) == 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   665
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
  <xsl:apply-templates select="../.." mode="traceIn">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   667
    <xsl:with-param name="endParam" select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   668
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
  <xsl:text>      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
        tty->print_cr("JVMTI [%s] %s } %s - erroneous arg is </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
    <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   672
    <xsl:value-of select="$comment"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
    <xsl:text>",  curr_thread_name, func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
                  JvmtiUtil::error_name(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
    <xsl:value-of select="$err"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   676
    <xsl:text>)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   677
    <xsl:value-of select="$extraValue"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
    <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   681
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
    <xsl:text>      return </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
    <xsl:value-of select="$err"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
    <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   685
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   686
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
<xsl:template match="function" mode="traceAfter">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
  <xsl:if test="$trace='Trace'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   690
    <xsl:text>  if ( err != JVMTI_ERROR_NONE &amp;&amp; (trace_flags &amp; JvmtiTrace::SHOW_ERROR) != 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   691
      if ((trace_flags &amp; JvmtiTrace::SHOW_IN) == 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
    <xsl:apply-templates select="." mode="traceIn"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
    <xsl:text>    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
    tty->print_cr("JVMTI [%s] %s } %s",  curr_thread_name, func_name, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
                  JvmtiUtil::error_name(err));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
  } else if ((trace_flags &amp; JvmtiTrace::SHOW_OUT) != 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
    tty->print_cr("JVMTI [%s] %s }",  curr_thread_name, func_name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   699
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   701
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
<xsl:template match="function" mode="traceIn">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
  <xsl:param name="endParam"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
  <xsl:text>          tty->print_cr("JVMTI [%s] %s { </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
  <xsl:apply-templates select="parameters" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
    <xsl:with-param name="endParam" select="$endParam"/>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
  <xsl:text>", curr_thread_name, func_name</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
  <xsl:apply-templates select="parameters" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
    <xsl:with-param name="endParam" select="$endParam"/>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   714
  <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
<xsl:template match="parameters" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
  <xsl:apply-templates select="param" mode="dochecks"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
<xsl:template match="param" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
  <xsl:apply-templates select="child::*[position()=1]" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   724
    <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   725
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   726
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
489c9b5090e2 Initial load
duke
parents:
diff changeset
   728
<xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   729
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
  <xsl:if test="count(nullok)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   731
    <xsl:text>  if (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   732
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
    <xsl:text> == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
      <xsl:with-param name="err">JVMTI_ERROR_NULL_POINTER</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
<xsl:template match="jrawMonitorID" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
  <xsl:text>  JvmtiRawMonitor *rmonitor = (JvmtiRawMonitor *)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
  if (rmonitor == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_MONITOR</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
      <xsl:with-param name="comment"> - raw monitor is NULL</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   754
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
  if (!rmonitor->is_valid()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_MONITOR</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   761
      <xsl:with-param name="comment"> - not a raw monitor " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   762
      <xsl:with-param name="extraValue">, p2i(rmonitor)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   764
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
<xsl:template match="jthread" mode="dochecksbody">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
    <xsl:text>    oop thread_oop = JNIHandles::resolve_external_guard(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
    <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
    if (thread_oop == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_THREAD</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   778
      <xsl:with-param name="comment"> - jthread resolved to NULL - jthread = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   779
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
    }
4571
80b553bddc26 6914300: ciEnv should export all well known classes
never
parents: 1
diff changeset
   783
    if (!thread_oop-&gt;is_a(SystemDictionary::Thread_klass())) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_THREAD</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   787
      <xsl:with-param name="comment"> - oop is not a thread - jthread = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   788
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
    java_thread = java_lang_Thread::thread(thread_oop); 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   793
    if (java_thread == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   796
      <xsl:with-param name="err">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   797
        <xsl:text>JVMTI_ERROR_THREAD_NOT_ALIVE</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
      </xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   799
      <xsl:with-param name="comment"> - not a Java thread - jthread = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   800
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
</xsl:text>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
<xsl:template match="jthread" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
  <!-- If we convert and test threads -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   810
  <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   811
    <xsl:text>  JavaThread* java_thread;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   812
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   813
    <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   814
      <xsl:when test="count(@null)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   815
        <xsl:apply-templates select="." mode="dochecksbody">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
          <xsl:with-param name="name" select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   817
        </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   818
      </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   819
      <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
        <xsl:text>  if (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   821
        <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   822
        <xsl:text> == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   823
    java_thread = current_thread;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   824
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   825
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   826
        <xsl:apply-templates select="." mode="dochecksbody">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   827
          <xsl:with-param name="name" select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   828
        </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
        <xsl:text>  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
      </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   832
    </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
<xsl:template match="jframeID" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   838
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   839
  if (depth &lt; 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   841
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   842
      <xsl:with-param name="err">JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   843
      <xsl:with-param name="comment"> - negative depth - jthread = " INT32_FORMAT "</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   844
      <xsl:with-param name="extraValue">, <xsl:value-of select="$name"/></xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   849
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
<xsl:template match="jclass" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
 <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
 <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   854
 <xsl:if test="count(@method)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   855
  <xsl:text>  oop k_mirror = JNIHandles::resolve_external_guard(</xsl:text>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
  <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
  if (k_mirror == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   862
      <xsl:with-param name="comment"> - resolved to NULL - jclass = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   863
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
  }
4571
80b553bddc26 6914300: ciEnv should export all well known classes
never
parents: 1
diff changeset
   867
  if (!k_mirror->is_a(SystemDictionary::Class_klass())) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   869
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   871
      <xsl:with-param name="comment"> - not a class - jclass = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   872
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
  <xsl:if test="count(@method|@field)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
  if (java_lang_Class::is_primitive(k_mirror)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   883
      <xsl:with-param name="comment"> - is a primitive class - jclass = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   884
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
  }
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10969
diff changeset
   888
  Klass* k_oop = java_lang_Class::as_Klass(k_mirror);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
  if (k_oop == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   891
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
      <xsl:with-param name="err">JVMTI_ERROR_INVALID_CLASS</xsl:with-param>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   893
      <xsl:with-param name="comment"> - no Klass* - jclass = " PTR_FORMAT "</xsl:with-param>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
   894
      <xsl:with-param name="extraValue">, p2i(<xsl:value-of select="$name"/>)</xsl:with-param>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
 </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
489c9b5090e2 Initial load
duke
parents:
diff changeset
   904
<xsl:template match="jmethodID" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   905
  <xsl:param name="name"/>
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10969
diff changeset
   906
  <xsl:text>  Method* method_oop = Method::checked_resolve_jmethod_id(</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
  <xsl:text>);&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   909
  <xsl:text>  if (method_oop == NULL) {&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   910
  <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
    <xsl:with-param name="err">JVMTI_ERROR_INVALID_METHODID</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
    <xsl:with-param name="comment"></xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
    <xsl:with-param name="extraValue"></xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   915
  <xsl:text>&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
  <xsl:text>  }&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
  <xsl:if test="count(@native)=1 and contains(@native,'error')">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
    <xsl:text>  if (method_oop->is_native()) {&#xA;</xsl:text>   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   919
    <xsl:text>    return JVMTI_ERROR_NATIVE_METHOD;&#xA;</xsl:text>   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
    <xsl:text>  }&#xA;</xsl:text>   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   923
489c9b5090e2 Initial load
duke
parents:
diff changeset
   924
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
<xsl:template match="jfieldID" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
  <xsl:text>  ResourceMark rm_fdesc(current_thread);&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
  <xsl:text>  fieldDescriptor fdesc;&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
  <xsl:text>  if (!JvmtiEnv::get_field_descriptor(k_oop, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
  <xsl:text>, &amp;fdesc)) {&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
  <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
    <xsl:with-param name="err">JVMTI_ERROR_INVALID_FIELDID</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
  <xsl:text>&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
  <xsl:text>  }&#xA;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
<xsl:template match="jint" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   941
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
  <xsl:if test="count(@min)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
    <xsl:text>  if (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
    <xsl:text> &lt; </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
    <xsl:value-of select="@min"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
    <xsl:text>) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
    <xsl:apply-templates select=".." mode="traceError">     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
      <xsl:with-param name="err">JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   951
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
489c9b5090e2 Initial load
duke
parents:
diff changeset
   958
<xsl:template match="jobject|jvalue|jthreadGroup|enum|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="dochecks">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
<!-- iterate over parameters, stopping if specified is encountered -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
<xsl:template name="traceInValueParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
  <xsl:param name="params"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
  <xsl:param name="endParam"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
  <xsl:param name="index" select="1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
  <xsl:variable name="cParam" select="$params[position()=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
  <xsl:if test="$cParam!=$endParam">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
    <xsl:apply-templates select="$cParam" mode="traceInValue"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
    <xsl:if test="count($params) &gt; $index">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
      <xsl:call-template name="traceInValueParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   971
        <xsl:with-param name="params" select="$params"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   972
        <xsl:with-param name="endParam" select="$endParam"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
        <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
      </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   976
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   977
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   978
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
<xsl:template name="traceInFormatParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
  <xsl:param name="params"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
  <xsl:param name="endParam"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   982
  <xsl:param name="index" select="1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   983
  <xsl:variable name="cParam" select="$params[position()=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   984
  <xsl:if test="$cParam!=$endParam">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   985
    <xsl:apply-templates select="$cParam" mode="traceInFormat"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   986
    <xsl:if test="count($params) &gt; $index">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   987
      <xsl:call-template name="traceInFormatParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
        <xsl:with-param name="params" select="$params"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   989
        <xsl:with-param name="endParam" select="$endParam"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   990
        <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   991
      </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   992
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
489c9b5090e2 Initial load
duke
parents:
diff changeset
   996
<xsl:template match="parameters" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   997
  <xsl:param name="endParam"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
  <xsl:call-template name="traceInFormatParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   999
    <xsl:with-param name="params" select="param"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
    <xsl:with-param name="endParam" select="$endParam"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1001
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1002
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1003
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1004
<xsl:template match="parameters" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1005
  <xsl:param name="endParam"></xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1006
  <xsl:call-template name="traceInValueParamsUpTo">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1007
    <xsl:with-param name="params" select="param"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1008
    <xsl:with-param name="endParam" select="$endParam"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1009
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1010
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1011
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1012
<xsl:template match="param" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1013
  <xsl:apply-templates select="child::*[position()=1]" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1014
    <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1015
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1016
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1017
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1018
<xsl:template match="param" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1019
  <xsl:apply-templates select="child::*[position()=1]" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1020
    <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1021
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1022
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1023
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1024
<xsl:template match="outptr|outbuf|allocfieldbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1025
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1026
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1027
<xsl:template match="outptr|outbuf|allocfieldbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1028
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1029
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1030
<xsl:template match="inbuf" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1031
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1032
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1033
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1034
  <xsl:variable name="child" select="child::*[position()=1]"/>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1035
  <xsl:choose>g
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1036
    <xsl:when test="name($child)='char'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1037
      <xsl:text>='%s'</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1038
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1039
    <xsl:otherwise>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1040
      <xsl:text>=" PTR_FORMAT "</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1041
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1042
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1043
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1044
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1045
<xsl:template match="inbuf" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1046
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1047
  <xsl:text>, </xsl:text>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1048
  <xsl:variable name="child" select="child::*[position()=1]"/>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1049
  <xsl:choose>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1050
    <xsl:when test="name($child)='char'">
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1051
      <xsl:value-of select="$name"/>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1052
    </xsl:when>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1053
    <xsl:otherwise>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1054
      p2i(<xsl:value-of select="$name"/>)
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1055
    </xsl:otherwise>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1056
  </xsl:choose>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1057
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1058
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1059
<xsl:template match="ptrtype" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1060
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1061
  <xsl:variable name="child" select="child::*[position()=1]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1062
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1063
    <xsl:when test="name($child)='jclass'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1064
      <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1065
      <xsl:value-of select="$name"/>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1066
      <xsl:text>=" PTR_FORMAT "</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1067
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1068
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1069
      <xsl:apply-templates select="$child" mode="traceInFormat"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1070
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1071
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1072
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1073
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1074
<xsl:template match="ptrtype" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1075
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1076
  <xsl:variable name="child" select="child::*[position()=1]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1077
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1078
    <xsl:when test="name($child)='jclass'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1079
      <xsl:text>, </xsl:text>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1080
      p2i(<xsl:value-of select="$name"/>)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1081
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1082
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1083
      <xsl:apply-templates select="$child" mode="traceInValue"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1084
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1085
  </xsl:choose> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1086
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1087
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1088
<xsl:template match="inptr" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1089
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1090
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1091
  <xsl:value-of select="$name"/>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1092
  <xsl:text>=" PTR_FORMAT "</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1093
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1094
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1095
<xsl:template match="inptr" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1096
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1097
  <xsl:text>, </xsl:text>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1098
  p2i(<xsl:value-of select="$name"/>)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1099
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1100
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1101
<xsl:template match="jrawMonitorID|jfieldID" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1102
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1103
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1104
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1105
  <xsl:text>=%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1106
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1107
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1108
<xsl:template match="jclass" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1109
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1110
  <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1111
  <xsl:if test="count(@method)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1112
    <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1113
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1114
    <xsl:text>=%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1115
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1116
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1117
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1118
<xsl:template match="jrawMonitorID" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1119
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1120
  <xsl:text>, rmonitor->get_name()</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1121
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1122
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1123
<xsl:template match="jthread" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1124
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1125
  <!-- If we convert and test threads -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1126
  <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1127
    <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1128
    <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1129
    <xsl:text>=%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1130
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1131
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1132
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1133
<xsl:template match="jthread" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1134
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1135
  <!-- If we convert and test threads -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1136
  <xsl:if test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1137
    <xsl:text>, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1138
                    JvmtiTrace::safe_get_thread_name(java_thread)</xsl:text>  
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1139
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1140
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1141
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1142
<xsl:template match="jframeID" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1143
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1144
  <xsl:text>depth=%d</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1145
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1146
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1147
<xsl:template match="jframeID" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1148
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1149
  <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1150
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1151
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1152
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1153
<xsl:template match="jclass" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1154
  <!-- for JVMTI a jclass/jmethodID becomes just jmethodID -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1155
  <xsl:if test="count(@method)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1156
    <xsl:text>, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1157
                    JvmtiTrace::get_class_name(k_mirror)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1158
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1159
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1160
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1161
<xsl:template match="jmethodID" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1162
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1163
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1164
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1165
  <xsl:text>=%s.%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1166
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1167
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1168
<xsl:template match="jmethodID" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1169
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1170
  <xsl:text>, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1171
                    method_oop == NULL? "NULL" : method_oop->klass_name()->as_C_string(),
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1172
                    method_oop == NULL? "NULL" : method_oop->name()->as_C_string()
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1173
             </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1174
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1175
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1176
<xsl:template match="jfieldID" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1177
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1178
  <xsl:text>, fdesc.name()->as_C_string()</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1179
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1180
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1181
<xsl:template match="enum" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1182
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1183
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1184
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1185
  <xsl:text>=%d:%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1186
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1187
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1188
<xsl:template match="enum" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1189
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1190
  <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1191
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1192
  <xsl:text>, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1193
                    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1194
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1195
    <xsl:when test=".='jvmtiError'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1196
      <xsl:text>JvmtiUtil::error_name(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1197
      <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1198
      <xsl:text>)
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1199
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1200
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1201
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1202
      <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1203
        <xsl:when test=".='jvmtiEvent'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1204
          <xsl:text>JvmtiTrace::event_name(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1205
          <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1206
          <xsl:text>)
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1207
        </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1208
      </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1209
      <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1210
        <xsl:text>JvmtiTrace::enum_name(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1211
        <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1212
        <xsl:text>ConstantNames, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1213
        <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1214
        <xsl:text>ConstantValues, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1215
        <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1216
        <xsl:text>)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1217
      </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1218
    </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1219
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1220
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1221
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1222
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1223
<xsl:template match="jint" mode="traceInFormat">
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1224
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1225
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1226
  <xsl:value-of select="$name"/>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1227
  <xsl:text>=" INT32_FORMAT "</xsl:text>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1228
</xsl:template>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1229
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1230
<xsl:template match="jlocation" mode="traceInFormat">
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1231
  <xsl:param name="name"/>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1232
  <xsl:text> </xsl:text>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1233
  <xsl:value-of select="$name"/>
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1234
  <xsl:text>=" INT64_FORMAT "</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1235
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1236
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1237
<xsl:template match="jlong" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1238
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1239
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1240
  <xsl:value-of select="$name"/>
33148
68fa8b6c4340 8042893: compiler: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
david
parents: 29081
diff changeset
  1241
  <xsl:text>=" INT64_FORMAT "</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1242
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1243
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1244
<xsl:template match="size_t" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1245
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1246
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1247
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1248
  <xsl:text>=0x%zx</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1249
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1250
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1251
<xsl:template match="jfloat|jdouble" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1252
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1253
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1254
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1255
  <xsl:text>=%f</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1256
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1257
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1258
<xsl:template match="char" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1259
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1260
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1261
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1262
  <xsl:text>=%c</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1263
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1264
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1265
<xsl:template match="uchar|jchar" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1266
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1267
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1268
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1269
  <xsl:text>=0x%x</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1270
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1271
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1272
<xsl:template match="jint|jlocation|jchar|jlong|jfloat|jdouble|char|uchar|size_t" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1273
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1274
  <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1275
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1276
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1277
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1278
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1279
<xsl:template match="jboolean" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1280
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1281
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1282
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1283
  <xsl:text>=%s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1284
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1285
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1286
<xsl:template match="jboolean" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1287
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1288
  <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1289
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1290
  <xsl:text>? "true" : "false"</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1291
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1292
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1293
<xsl:template match="jobject|jvalue|jthreadGroup|void|struct" mode="traceInFormat">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1294
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1295
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1296
<xsl:template match="jobject|jvalue|jthreadGroup|void|struct" mode="traceInValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1297
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1298
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1299
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1300
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1301
</xsl:stylesheet>