changeset 55543:448d63614b6b

Merge
author mikael
date Mon, 01 Jul 2019 17:08:04 -0700
parents 734e58d8477b e1a876085988
children e846a51e8966
files src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
diffstat 3 files changed, 117 insertions(+), 103 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/prims/jvmti.xsl	Mon Jul 01 18:24:06 2019 +0000
+++ b/src/hotspot/share/prims/jvmti.xsl	Mon Jul 01 17:08:04 2019 -0700
@@ -62,37 +62,96 @@
     <div class="centered" role="banner">
       <xsl:apply-templates select="title"/>
     </div>
-    <ul role="navigation">
-      <li>
-        <a href="#SpecificationIntro"><b>Introduction</b></a>
-        <ul>
-          <xsl:for-each select="intro">
+    <nav>
+      <ul>
+        <li>
+          <a href="#SpecificationIntro"><b>Introduction</b></a>
+          <ul>
+            <xsl:for-each select="intro">
+              <li>
+                <a>
+                  <xsl:attribute name="href">#<xsl:value-of select="@id"/>
+                  </xsl:attribute>
+                  <b><xsl:value-of select="@label"/></b>
+                </a>
+              </li>
+            </xsl:for-each>
+          </ul>
+        </li>
+        <li>
+          <a href="#FunctionSection"><b>Functions</b></a>
+          <ul>
+            <xsl:for-each select="functionsection/intro">
+              <li>
+                <a>
+                  <xsl:attribute name="href">#<xsl:value-of select="@id"/>
+                  </xsl:attribute>
+                  <b><xsl:value-of select="@label"/></b>
+                </a>
+              </li>
+            </xsl:for-each>
+            <li>
+              <a href="#FunctionIndex"><b>Function Index</b></a>
+              <ul>
+                <xsl:for-each select="functionsection/category">
+                  <li>
+                    <a>
+                      <xsl:attribute name="href">#<xsl:value-of select="@id"/>
+                      </xsl:attribute>
+                      <b><xsl:value-of select="@label"/></b>
+                    </a>
+                  </li>
+                </xsl:for-each>
+              </ul>
+            </li>
+            <li>
+              <a href="#ErrorSection"><b>Error Codes</b></a>
+            </li>
+          </ul>
+        </li>
+        <li>
+          <a href="#EventSection"><b>Events</b></a>
+          <ul>
+            <li>
+              <a href="#EventIndex"><b>Event Index</b></a>
+            </li>
+          </ul>
+        </li>
+        <li>
+          <a href="#DataSection"><b>Data Types</b></a>
+          <ul>
+            <xsl:for-each select="//basetypes">
             <li>
               <a>
-                <xsl:attribute name="href">#<xsl:value-of select="@id"/>
-                </xsl:attribute>
-                <b><xsl:value-of select="@label"/></b>
+                <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
+                <b>
+                  <xsl:value-of select="@label"/>
+                </b>
               </a>
             </li>
-          </xsl:for-each>
-        </ul>
-      </li>
-      <li>
-        <a href="#FunctionSection"><b>Functions</b></a>
-        <ul>
-          <xsl:for-each select="functionsection/intro">
+            </xsl:for-each>
             <li>
-              <a>
-                <xsl:attribute name="href">#<xsl:value-of select="@id"/>
-                </xsl:attribute>
-                <b><xsl:value-of select="@label"/></b>
-              </a>
+              <a href="#StructureTypeDefinitions"><b>Structure Type Definitions</b></a>
             </li>
-          </xsl:for-each>
+            <li>
+              <a href="#FunctionTypeDefinitions"><b>Function Type Definitions</b></a>
+            </li>
+            <li>
+              <a href="#EnumerationDefinitions"><b>Enumeration Definitions</b></a>
+            </li>
+            <li>
+              <a href="#FunctionTable"><b>Function Table</b></a>
+            </li>
+          </ul>
+        </li>
+        <li>
+          <a href="#ConstantIndex"><b>Constant Index</b></a>
+        </li>
+        <xsl:if test="$development = 'Show'">
           <li>
-            <a href="#FunctionIndex"><b>Function Index</b></a>
+            <a href="#SpecificationIssues"><b>Issues</b></a>
             <ul>
-              <xsl:for-each select="functionsection/category">
+              <xsl:for-each select="issuessection/intro">
                 <li>
                   <a>
                     <xsl:attribute name="href">#<xsl:value-of select="@id"/>
@@ -103,69 +162,12 @@
               </xsl:for-each>
             </ul>
           </li>
-          <li>
-            <a href="#ErrorSection"><b>Error Codes</b></a>
-          </li>
-        </ul>
-      </li>
-      <li>
-        <a href="#EventSection"><b>Events</b></a>
-        <ul>
-          <li>
-            <a href="#EventIndex"><b>Event Index</b></a>
-          </li>
-        </ul>
-      </li>
-      <li>
-        <a href="#DataSection"><b>Data Types</b></a>
-        <ul>
-          <xsl:for-each select="//basetypes">
-          <li>
-            <a>
-              <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
-              <b>
-                <xsl:value-of select="@label"/>
-              </b>
-            </a>
-          </li>
-          </xsl:for-each>
-          <li>
-            <a href="#StructureTypeDefinitions"><b>Structure Type Definitions</b></a>
-          </li>
-          <li>
-            <a href="#FunctionTypeDefinitions"><b>Function Type Definitions</b></a>
-          </li>
-          <li>
-            <a href="#EnumerationDefinitions"><b>Enumeration Definitions</b></a>
-          </li>
-          <li>
-            <a href="#FunctionTable"><b>Function Table</b></a>
-          </li>
-        </ul>
-      </li>
-      <li>
-        <a href="#ConstantIndex"><b>Constant Index</b></a>
-      </li>
-      <xsl:if test="$development = 'Show'">
+        </xsl:if>
         <li>
-          <a href="#SpecificationIssues"><b>Issues</b></a>
-          <ul>
-            <xsl:for-each select="issuessection/intro">
-              <li>
-                <a>
-                  <xsl:attribute name="href">#<xsl:value-of select="@id"/>
-                  </xsl:attribute>
-                  <b><xsl:value-of select="@label"/></b>
-                </a>
-              </li>
-            </xsl:for-each>
-          </ul>
+          <a href="#ChangeHistory"><b>Change History</b></a>
         </li>
-      </xsl:if>
-      <li>
-        <a href="#ChangeHistory"><b>Change History</b></a>
-      </li>
-    </ul>
+      </ul>
+    </nav>
     <!-- end table of contents, begin body -->
     <div role="main">
     <div class="sep"/>
@@ -212,11 +214,11 @@
     <h1>
       <xsl:apply-templates/>
     </h1>
-    <h3>
+    <h2>
       <xsl:value-of select="@subtitle"/>
       <xsl:text> </xsl:text>
       <xsl:call-template name="showbasicversion"/>
-    </h3>
+    </h2>
 </xsl:template>
 
 <xsl:template match="functionsection">
@@ -363,7 +365,7 @@
       </td>
     </tr>
     <tr>
-      <td >
+      <td>
         <xsl:apply-templates select="." mode="phaseinfo"/>
       </td>
       <td>
@@ -642,12 +644,12 @@
 </xsl:template>
 
 <xsl:template match="capabilitiestypedef|typedef|uniontypedef">
-  <h4>
+  <h3>
     <xsl:attribute name="id">
       <xsl:value-of select="@id"/>
     </xsl:attribute>
     <xsl:value-of select="@label"/>
-  </h4>
+  </h3>
   <xsl:apply-templates select="." mode="description"/>
   <blockquote>
     <xsl:apply-templates select="." mode="code"/>
@@ -1951,12 +1953,12 @@
   <xsl:if test="@id!=''">
     <xsl:choose>
       <xsl:when test="@label!=''">
-        <h4>
+        <h3>
           <xsl:attribute name="id">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
           <xsl:value-of select="@label"/>
-        </h4>
+        </h3>
       </xsl:when>
       <xsl:otherwise>
         <a>
--- a/src/hotspot/share/runtime/deoptimization.cpp	Mon Jul 01 18:24:06 2019 +0000
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Mon Jul 01 17:08:04 2019 -0700
@@ -840,6 +840,15 @@
     }
     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;
@@ -878,6 +887,11 @@
     }
     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) {
     if (value != 0) {
       return JNIHandles::resolve_non_null(_true_cache);
@@ -892,18 +906,14 @@
    Klass* k = java_lang_Class::as_Klass(bv->klass()->as_ConstantOopReadValue()->value()());
    BasicType box_type = SystemDictionary::box_klass_type(k);
    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) {
-       case T_INT:     return IntegerBoxCache::singleton(THREAD)->lookup(value->get_int());
-       case T_LONG: {
-                       StackValue* low = StackValue::create_stack_value(fr, reg_map, bv->field_at(1));
-                       jlong res = (jlong)low->get_int();
-                       return LongBoxCache::singleton(THREAD)->lookup(res);
-                     }
-       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());
+       case T_INT:     return IntegerBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
+       case T_CHAR:    return CharacterBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
+       case T_SHORT:   return ShortBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
+       case T_BYTE:    return ByteBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
+       case T_BOOLEAN: return BooleanBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
+       case T_LONG:    return LongBoxCache::singleton(THREAD)->lookup_raw(value->get_int());
        default:;
      }
    }
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Mon Jul 01 18:24:06 2019 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Mon Jul 01 17:08:04 2019 -0700
@@ -475,7 +475,9 @@
                 methodData = new HotSpotMethodData(metaspaceMethodData, this);
                 String methodDataFilter = Option.TraceMethodDataFilter.getString();
                 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);
                 }
             }
         }