src/hotspot/share/prims/jvmtiH.xsl
author coleenp
Fri, 04 Jan 2019 15:06:01 -0500
changeset 53149 259c36ef27df
parent 50735 2f2af62dfac7
child 54836 e2ed0691ae79
permissions -rw-r--r--
8215731: Move forward class definitions out of globalDefinitions.hpp Summary: redistribute the forward declarations to the header files that need them. Reviewed-by: dholmes, lfoltan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
<!--
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
     3
 Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    22
 questions.
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
    23
1
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"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
                version="1.0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
  <xsl:import href="jvmtiLib.xsl"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
  <xsl:output method="text" omit-xml-declaration="yes"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
  <xsl:template match="/">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
    <xsl:apply-templates select="specification"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  <xsl:template match="specification">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
    <xsl:call-template name="intro"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    <xsl:text>/* Derived Base Types */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
    <xsl:apply-templates select="//basetype"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
    /* Constants */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    <xsl:apply-templates select="//constants"/>
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
    50
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
    /* Errors */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
typedef enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
     <xsl:for-each select="//errorid">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
       <xsl:sort select="@num" data-type="number"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
         <xsl:apply-templates select="." mode="enum"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
         <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
         <xsl:if test="position() = last()">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
           <xsl:text>    JVMTI_ERROR_MAX = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
           <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
         </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
     </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
} jvmtiError;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    <xsl:apply-templates select="eventsection" mode="enum"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    /* Pre-Declarations */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
<xsl:apply-templates select="//typedef|//uniontypedef" mode="early"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    /* Function Types */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    <xsl:apply-templates select="//callback"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    /* Structure Types */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    <xsl:apply-templates select="//typedef|//uniontypedef" mode="body"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    <xsl:apply-templates select="//capabilitiestypedef"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    <xsl:apply-templates select="eventsection" mode="body"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    <xsl:apply-templates select="functionsection"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    <xsl:call-template name="outro"/>
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
    94
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  <xsl:template name="intro">
41287
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    98
  <xsl:call-template name="include_GPL_CP_Header"/>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    /* Include file for the Java(tm) Virtual Machine Tool Interface */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
#ifndef _JAVA_JVMTI_H_
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
#define _JAVA_JVMTI_H_
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
#include "jni.h"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
#ifdef __cplusplus
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
extern "C" {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    JVMTI_VERSION_1   = 0x30010000,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    JVMTI_VERSION_1_0 = 0x30010000,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    JVMTI_VERSION_1_1 = 0x30010100,
7413
59b978f8fbdf 7003782: Update JVMTI version to 1.2 for jdk7
kamg
parents: 5547
diff changeset
   115
    JVMTI_VERSION_1_2 = 0x30010200,
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   116
    JVMTI_VERSION_9   = 0x30090000,
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   117
    JVMTI_VERSION_11  = 0x300B0000,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    JVMTI_VERSION = 0x30000000 + (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  <xsl:value-of select="//specification/@majorversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  <xsl:text> * 0x10000) + (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  <xsl:value-of select="//specification/@minorversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  <xsl:text> * 0x100)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  <xsl:variable name="micro">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    <xsl:call-template name="microversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
    <xsl:when test="string($micro)='dev'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
      <xsl:text>  /* checked out - </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
      <xsl:text> + </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
      <xsl:value-of select="$micro"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
      <xsl:text>  /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  <xsl:text>version: </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  <xsl:call-template name="showversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   142
JNIEXPORT jint JNICALL
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
JNIEXPORT jint JNICALL
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   148
JNIEXPORT void JNICALL
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
Agent_OnUnload(JavaVM *vm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
    /* Forward declaration of the environment */
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   152
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
struct _jvmtiEnv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
struct jvmtiInterface_1_;
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   156
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
#ifdef __cplusplus
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
typedef _jvmtiEnv jvmtiEnv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
typedef const struct jvmtiInterface_1_ *jvmtiEnv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
#endif /* __cplusplus */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  <xsl:template name="outro">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
#ifdef __cplusplus
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
} /* extern "C" */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
#endif /* __cplusplus */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
#endif /* !_JAVA_JVMTI_H_ */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
<xsl:template match="eventsection" mode="enum">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    /* Event IDs */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
typedef enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
     <xsl:for-each select="event">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
       <xsl:sort select="@num" data-type="number"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
       <xsl:if test="position()=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
         <xsl:text>    JVMTI_MIN_EVENT_TYPE_VAL = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
         <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
         <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
       </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
       <xsl:apply-templates select="." mode="enum"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
       <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
       <xsl:if test="position()=last()">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
         <xsl:text>    JVMTI_MAX_EVENT_TYPE_VAL = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
         <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
       </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
     </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
} jvmtiEvent;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
<xsl:template match="eventsection" mode="body">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
    /* Event Definitions */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
typedef void (JNICALL *jvmtiEventReserved)(void);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  <xsl:apply-templates select="event" mode="definition">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
    <xsl:sort select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    /* Event Callback Structure */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
typedef struct {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  <xsl:call-template name="eventStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
    <xsl:with-param name="events" select="event"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
    <xsl:with-param name="index" select="0"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
    <xsl:with-param name="started" select="false"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
    <xsl:with-param name="comment" select="'Yes'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  <xsl:text>} jvmtiEventCallbacks;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
<xsl:template match="event" mode="definition">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
typedef void (JNICALL *jvmtiEvent</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  <xsl:text>)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    (jvmtiEnv *jvmti_env</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  <xsl:apply-templates select="parameters" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
    <xsl:with-param name="comma">
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   242
      <xsl:text>,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
     </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
    </xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
   </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
 <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
<xsl:template match="functionsection">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
   <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
    /* Function Interface */
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   254
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
typedef struct jvmtiInterface_1_ {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  <xsl:call-template name="funcStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
    <xsl:with-param name="funcs" select="category/function[count(@hide)=0]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
    <xsl:with-param name="index" select="1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  <xsl:text>} jvmtiInterface_1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
struct _jvmtiEnv {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
    const struct jvmtiInterface_1_ *functions;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
#ifdef __cplusplus
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  <xsl:apply-templates select="category" mode="cppinline"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
#endif /* __cplusplus */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
<xsl:template name="funcStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  <xsl:param name="funcs"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  <xsl:param name="index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  <xsl:variable name="thisFunction" select="$funcs[@num=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  <xsl:text>  /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  <xsl:number value="$index" format="  1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  <xsl:text> : </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
    <xsl:when test="count($thisFunction)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
      <xsl:value-of select="$thisFunction/synopsis"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
      <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
  jvmtiError (JNICALL *</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
      <xsl:value-of select="$thisFunction/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
      <xsl:text>) (jvmtiEnv* env</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
      <xsl:apply-templates select="$thisFunction/parameters" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
        <xsl:with-param name="comma">
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   294
          <xsl:text>,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
        </xsl:with-param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
      </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
      <xsl:text>)</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
      <xsl:text> RESERVED */
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   302
  void *reserved</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
      <xsl:value-of select="$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
  <xsl:if test="count($funcs[@num &gt; $index]) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
    <xsl:call-template name="funcStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
      <xsl:with-param name="funcs" select="$funcs"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
      <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
    </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
<xsl:template match="function">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
  <xsl:text>  jvmtiError (JNICALL *</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
  <xsl:text>) (jvmtiEnv* env</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
  <xsl:apply-templates select="parameters" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
<xsl:template match="category" mode="cppinline">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
    <xsl:apply-templates select="function[count(@hide)=0]" mode="cppinline"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
<xsl:template match="function" mode="cppinline">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
  jvmtiError </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
  <xsl:text>(</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  <xsl:apply-templates select="parameters" mode="signaturenoleadcomma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
  <xsl:text>) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
    return functions-></xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  <xsl:text>(this</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  <xsl:for-each select="parameters">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
    <xsl:for-each select="param">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
      <xsl:if test="@id != '...' and count(jclass/@method) = 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
        <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
        <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
    </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
  <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
  <xsl:template match="basetype">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
    <xsl:if test="count(definition)!=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
      <xsl:apply-templates select="definition"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
  <xsl:template match="constants">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
    <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
    /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
    <xsl:value-of select="@label"/>
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 7413
diff changeset
   369
    <xsl:text> */
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
    <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
      <xsl:when test="@kind='enum'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
        <xsl:apply-templates select="." mode="enum"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
      </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
      <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
        <xsl:apply-templates select="." mode="constants"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
      </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
    </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
<xsl:template match="callback">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
      <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
typedef </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
      <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
      <xsl:text> (JNICALL *</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
      <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
      <xsl:text>)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
    (</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
      <xsl:for-each select="parameters">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
        <xsl:apply-templates select="param[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
        <xsl:for-each select="param[position()>1]">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
          <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
          <xsl:apply-templates select="." mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
        </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
      </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
      <xsl:text>);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
<xsl:template match="capabilitiestypedef">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
  <xsl:apply-templates select="." mode="genstruct"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
<xsl:template match="typedef" mode="early">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
  <xsl:text>struct _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
  <xsl:text>typedef struct _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
<xsl:template match="typedef" mode="body">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
  <xsl:text>struct _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
  <xsl:text> {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
<xsl:apply-templates select="field" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
  <xsl:text>};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
<xsl:template match="uniontypedef" mode="early">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
  <xsl:text>union _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
  <xsl:text>typedef union _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
<xsl:template match="uniontypedef" mode="body">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
  <xsl:text>union _</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
  <xsl:text> {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
<xsl:apply-templates select="field" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
  <xsl:text>};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
</xsl:stylesheet>