This commit is contained in:
Mikael Vidstedt 2019-07-01 17:08:04 -07:00
commit c15943f7a8
3 changed files with 125 additions and 111 deletions

View File

@ -62,7 +62,8 @@
<div class="centered" role="banner"> <div class="centered" role="banner">
<xsl:apply-templates select="title"/> <xsl:apply-templates select="title"/>
</div> </div>
<ul role="navigation"> <nav>
<ul>
<li> <li>
<a href="#SpecificationIntro"><b>Introduction</b></a> <a href="#SpecificationIntro"><b>Introduction</b></a>
<ul> <ul>
@ -166,6 +167,7 @@
<a href="#ChangeHistory"><b>Change History</b></a> <a href="#ChangeHistory"><b>Change History</b></a>
</li> </li>
</ul> </ul>
</nav>
<!-- end table of contents, begin body --> <!-- end table of contents, begin body -->
<div role="main"> <div role="main">
<div class="sep"/> <div class="sep"/>
@ -212,11 +214,11 @@
<h1> <h1>
<xsl:apply-templates/> <xsl:apply-templates/>
</h1> </h1>
<h3> <h2>
<xsl:value-of select="@subtitle"/> <xsl:value-of select="@subtitle"/>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:call-template name="showbasicversion"/> <xsl:call-template name="showbasicversion"/>
</h3> </h2>
</xsl:template> </xsl:template>
<xsl:template match="functionsection"> <xsl:template match="functionsection">
@ -363,7 +365,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td > <td>
<xsl:apply-templates select="." mode="phaseinfo"/> <xsl:apply-templates select="." mode="phaseinfo"/>
</td> </td>
<td> <td>
@ -642,12 +644,12 @@ typedef struct {
</xsl:template> </xsl:template>
<xsl:template match="capabilitiestypedef|typedef|uniontypedef"> <xsl:template match="capabilitiestypedef|typedef|uniontypedef">
<h4> <h3>
<xsl:attribute name="id"> <xsl:attribute name="id">
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="@label"/> <xsl:value-of select="@label"/>
</h4> </h3>
<xsl:apply-templates select="." mode="description"/> <xsl:apply-templates select="." mode="description"/>
<blockquote> <blockquote>
<xsl:apply-templates select="." mode="code"/> <xsl:apply-templates select="." mode="code"/>
@ -1951,12 +1953,12 @@ typedef struct {
<xsl:if test="@id!=''"> <xsl:if test="@id!=''">
<xsl:choose> <xsl:choose>
<xsl:when test="@label!=''"> <xsl:when test="@label!=''">
<h4> <h3>
<xsl:attribute name="id"> <xsl:attribute name="id">
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="@label"/> <xsl:value-of select="@label"/>
</h4> </h3>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<a> <a>

View File

@ -840,6 +840,15 @@ public:
} }
return NULL; return NULL;
} }
oop lookup_raw(intptr_t raw_value) {
// Have to cast to avoid little/big-endian problems.
if (sizeof(PrimitiveType) > sizeof(jint)) {
jlong value = (jlong)raw_value;
return lookup(value);
}
PrimitiveType value = (PrimitiveType)*((jint*)&raw_value);
return lookup(value);
}
}; };
typedef BoxCache<jint, java_lang_Integer_IntegerCache, java_lang_Integer> IntegerBoxCache; typedef BoxCache<jint, java_lang_Integer_IntegerCache, java_lang_Integer> IntegerBoxCache;
@ -878,6 +887,11 @@ public:
} }
return _singleton; return _singleton;
} }
oop lookup_raw(intptr_t raw_value) {
// Have to cast to avoid little/big-endian problems.
jboolean value = (jboolean)*((jint*)&raw_value);
return lookup(value);
}
oop lookup(jboolean value) { oop lookup(jboolean value) {
if (value != 0) { if (value != 0) {
return JNIHandles::resolve_non_null(_true_cache); return JNIHandles::resolve_non_null(_true_cache);
@ -892,18 +906,14 @@ oop Deoptimization::get_cached_box(AutoBoxObjectValue* bv, frame* fr, RegisterMa
Klass* k = java_lang_Class::as_Klass(bv->klass()->as_ConstantOopReadValue()->value()()); Klass* k = java_lang_Class::as_Klass(bv->klass()->as_ConstantOopReadValue()->value()());
BasicType box_type = SystemDictionary::box_klass_type(k); BasicType box_type = SystemDictionary::box_klass_type(k);
if (box_type != T_OBJECT) { if (box_type != T_OBJECT) {
StackValue* value = StackValue::create_stack_value(fr, reg_map, bv->field_at(0)); StackValue* value = StackValue::create_stack_value(fr, reg_map, bv->field_at(box_type == T_LONG ? 1 : 0));
switch(box_type) { switch(box_type) {
case T_INT: return IntegerBoxCache::singleton(THREAD)->lookup(value->get_int()); case T_INT: return IntegerBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
case T_LONG: { case T_CHAR: return CharacterBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
StackValue* low = StackValue::create_stack_value(fr, reg_map, bv->field_at(1)); case T_SHORT: return ShortBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
jlong res = (jlong)low->get_int(); case T_BYTE: return ByteBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
return LongBoxCache::singleton(THREAD)->lookup(res); case T_BOOLEAN: return BooleanBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
} case T_LONG: return LongBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
case T_CHAR: return CharacterBoxCache::singleton(THREAD)->lookup(value->get_int());
case T_SHORT: return ShortBoxCache::singleton(THREAD)->lookup(value->get_int());
case T_BYTE: return ByteBoxCache::singleton(THREAD)->lookup(value->get_int());
case T_BOOLEAN: return BooleanBoxCache::singleton(THREAD)->lookup(value->get_int());
default:; default:;
} }
} }

View File

@ -475,7 +475,9 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
methodData = new HotSpotMethodData(metaspaceMethodData, this); methodData = new HotSpotMethodData(metaspaceMethodData, this);
String methodDataFilter = Option.TraceMethodDataFilter.getString(); String methodDataFilter = Option.TraceMethodDataFilter.getString();
if (methodDataFilter != null && this.format("%H.%n").contains(methodDataFilter)) { if (methodDataFilter != null && this.format("%H.%n").contains(methodDataFilter)) {
System.out.println(methodData.toString()); String line = methodData.toString() + System.lineSeparator();
byte[] lineBytes = line.getBytes();
CompilerToVM.compilerToVM().writeDebugOutput(lineBytes, 0, lineBytes.length, true, true);
} }
} }
} }