changeset 23976:342cab081103 jvmci-0.23

Merge
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 22 Nov 2016 10:43:15 -0800
parents ac36c0370367 2e6402187643
children 2f5a8d1a9657
files .hgtags
diffstat 6 files changed, 121 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Nov 22 10:42:55 2016 -0800
+++ b/.hgtags	Tue Nov 22 10:43:15 2016 -0800
@@ -951,3 +951,4 @@
 c64c9fac1ab97322f82f403daecf693355ced99c jvmci-0.21
 be0d95e992045ed0e4ffd6846adb7614e2f3d94d jvmci-0.21
 5cf445d2acf6c42e5472e0cd35e6109a79f7f052 jvmci-0.22
+bf96b9e1058342cb726541eb02664bf36e30ab46 jvmci-0.23
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java	Tue Nov 22 10:42:55 2016 -0800
+++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java	Tue Nov 22 10:43:15 2016 -0800
@@ -34,15 +34,27 @@
 public final class DataPatch extends Site {
 
     public Reference reference;
+    public Object note;
 
     public DataPatch(int pcOffset, Reference reference) {
         super(pcOffset);
         this.reference = reference;
+        this.note = null;
+    }
+
+    public DataPatch(int pcOffset, Reference reference, Object note) {
+        super(pcOffset);
+        this.reference = reference;
+        this.note = note;
     }
 
     @Override
     public String toString() {
-        return String.format("%d[<data patch referring to %s>]", pcOffset, reference.toString());
+        if (note != null) {
+            return String.format("%d[<data patch referring to %s>, note: %s]", pcOffset, reference.toString(), note.toString());
+        } else {
+            return String.format("%d[<data patch referring to %s>]", pcOffset, reference.toString());
+        }
     }
 
     @Override
@@ -52,7 +64,7 @@
         }
         if (obj instanceof DataPatch) {
             DataPatch that = (DataPatch) obj;
-            if (this.pcOffset == that.pcOffset && Objects.equals(this.reference, that.reference)) {
+            if (this.pcOffset == that.pcOffset && Objects.equals(this.reference, that.reference) && Objects.equals(this.note, that.note)) {
                 return true;
             }
         }
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Tue Nov 22 10:42:55 2016 -0800
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Tue Nov 22 10:43:15 2016 -0800
@@ -483,7 +483,7 @@
     @Override
     public Annotation[][] getParameterAnnotations() {
         Executable javaMethod = toJava();
-        return javaMethod == null ? null : javaMethod.getParameterAnnotations();
+        return javaMethod == null ? new Annotation[signature.getParameterCount(false)][0] : javaMethod.getParameterAnnotations();
     }
 
     @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java	Tue Nov 22 10:43:15 2016 -0800
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.vm.ci.hotspot;
+
+import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.ValueKind;
+import jdk.vm.ci.meta.VMConstant;
+import jdk.vm.ci.meta.Value;
+
+public final class HotSpotSentinelConstant extends Value implements JavaConstant, VMConstant {
+
+    private final JavaKind javaKind;
+
+    public HotSpotSentinelConstant(ValueKind<?> valueKind, JavaKind javaKind) {
+        super(valueKind);
+        this.javaKind = javaKind;
+    }
+
+    public JavaKind getJavaKind() {
+        return javaKind;
+    }
+
+    @Override
+    public boolean isNull() {
+        return true;
+    }
+
+    @Override
+    public boolean isDefaultForKind() {
+        return true;
+    }
+
+    @Override
+    public Object asBoxedPrimitive() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public int asInt() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public boolean asBoolean() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public long asLong() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public float asFloat() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public double asDouble() {
+        throw new IllegalArgumentException();
+    }
+
+    @Override
+    public String toString() {
+        return JavaConstant.toString(this);
+    }
+
+    @Override
+    public String toValueString() {
+        return "sentinel";
+    }
+
+    @Override
+    public int hashCode() {
+        return 13;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return o instanceof HotSpotSentinelConstant;
+    }
+}
--- a/src/share/vm/asm/codeBuffer.cpp	Tue Nov 22 10:42:55 2016 -0800
+++ b/src/share/vm/asm/codeBuffer.cpp	Tue Nov 22 10:43:15 2016 -0800
@@ -972,6 +972,7 @@
 
 void CodeBuffer::log_section_sizes(const char* name) {
   if (xtty != NULL) {
+    ttyLocker ttyl;
     // log info about buffer usage
     xtty->print_cr("<blob name='%s' size='%d'>", name, _total_size);
     for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) {
--- a/src/share/vm/jvmci/jvmciCompiler.cpp	Tue Nov 22 10:42:55 2016 -0800
+++ b/src/share/vm/jvmci/jvmciCompiler.cpp	Tue Nov 22 10:43:15 2016 -0800
@@ -88,15 +88,13 @@
   }
 
   int qsize;
-  bool first_round = true;
   int z = 0;
   do {
     // Loop until there is something in the queue.
     do {
       os::sleep(THREAD, 100, true);
       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
-    } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
-    first_round = false;
+    } while (!_bootstrap_compilation_request_handled);
     if (PrintBootstrap) {
       while (z < (_methods_compiled / 100)) {
         ++z;