annotate src/share/vm/prims/jvmtiEnv.xsl @ 20543:e7d0505c8a30

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