Merge
authorjwilhelm
Mon, 28 Jan 2019 21:44:57 +0100
changeset 53531 fcfeed9fef45
parent 53526 688ce88f89cd (current diff)
parent 53530 f5671b2e74df (diff)
child 53532 bc20d0376402
Merge
src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
src/hotspot/share/c1/c1_LIRAssembler.hpp
test/hotspot/jtreg/ProblemList-graal.txt
test/hotspot/jtreg/ProblemList.txt
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp	Mon Jan 28 21:44:57 2019 +0100
@@ -284,7 +284,7 @@
     ref_addr = stub->ref_addr()->as_pointer_register();
   } else {
     // Load address into tmp register
-    ce->leal(stub->ref_addr(), stub->tmp(), stub->patch_code(), stub->patch_info());
+    ce->leal(stub->ref_addr(), stub->tmp());
     ref_addr = stub->tmp()->as_pointer_register();
   }
 
--- a/src/hotspot/share/c1/c1_LIRAssembler.hpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/share/c1/c1_LIRAssembler.hpp	Mon Jan 28 21:44:57 2019 +0100
@@ -240,7 +240,7 @@
   void align_call(LIR_Code code);
 
   void negate(LIR_Opr left, LIR_Opr dest, LIR_Opr tmp = LIR_OprFact::illegalOpr);
-  void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info);
+  void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code = lir_patch_none, CodeEmitInfo* info = NULL);
 
   void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
 
--- a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp	Mon Jan 28 21:44:57 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -62,9 +62,13 @@
 
   if (resolve_in_register) {
     LIR_Opr resolved_addr = gen->new_pointer_register();
-    __ leal(addr_opr, resolved_addr);
-    resolved_addr = LIR_OprFact::address(new LIR_Address(resolved_addr, access.type()));
-    return resolved_addr;
+    if (needs_patching) {
+      __ leal(addr_opr, resolved_addr, lir_patch_normal, access.patch_emit_info());
+      access.clear_decorators(C1_NEEDS_PATCHING);
+    } else {
+      __ leal(addr_opr, resolved_addr);
+    }
+    return LIR_OprFact::address(new LIR_Address(resolved_addr, access.type()));
   } else {
     return addr_opr;
   }
--- a/src/hotspot/share/gc/shared/c1/barrierSetC1.hpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.hpp	Mon Jan 28 21:44:57 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -92,17 +92,18 @@
     load_offset();
   }
 
-  LIRGenerator* gen() const            { return _gen; }
-  CodeEmitInfo*& patch_emit_info()     { return _patch_emit_info; }
-  CodeEmitInfo*& access_emit_info()    { return _access_emit_info; }
-  LIRAddressOpr& base()                { return _base; }
-  LIRAddressOpr& offset()              { return _offset; }
-  BasicType type() const               { return _type; }
-  LIR_Opr resolved_addr() const        { return _resolved_addr; }
-  void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
-  bool is_oop() const                  { return _type == T_ARRAY || _type == T_OBJECT; }
-  DecoratorSet decorators() const      { return _decorators; }
-  bool is_raw() const                  { return (_decorators & AS_RAW) != 0; }
+  LIRGenerator* gen() const              { return _gen; }
+  CodeEmitInfo*& patch_emit_info()       { return _patch_emit_info; }
+  CodeEmitInfo*& access_emit_info()      { return _access_emit_info; }
+  LIRAddressOpr& base()                  { return _base; }
+  LIRAddressOpr& offset()                { return _offset; }
+  BasicType type() const                 { return _type; }
+  LIR_Opr resolved_addr() const          { return _resolved_addr; }
+  void set_resolved_addr(LIR_Opr addr)   { _resolved_addr = addr; }
+  bool is_oop() const                    { return _type == T_ARRAY || _type == T_OBJECT; }
+  DecoratorSet decorators() const        { return _decorators; }
+  void clear_decorators(DecoratorSet ds) { _decorators &= ~ds; }
+  bool is_raw() const                    { return (_decorators & AS_RAW) != 0; }
 };
 
 // The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
--- a/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp	Mon Jan 28 21:44:57 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -36,7 +36,6 @@
     _ref_addr(access.resolved_addr()),
     _ref(ref),
     _tmp(LIR_OprFact::illegalOpr),
-    _patch_info(access.patch_emit_info()),
     _runtime_stub(runtime_stub) {
 
   // Allocate tmp register if needed
@@ -72,28 +71,14 @@
   return _tmp;
 }
 
-LIR_PatchCode ZLoadBarrierStubC1::patch_code() const {
-  return (_decorators & C1_NEEDS_PATCHING) != 0 ? lir_patch_normal : lir_patch_none;
-}
-
-CodeEmitInfo*& ZLoadBarrierStubC1::patch_info() {
-  return _patch_info;
-}
-
 address ZLoadBarrierStubC1::runtime_stub() const {
   return _runtime_stub;
 }
 
 void ZLoadBarrierStubC1::visit(LIR_OpVisitState* visitor) {
-  if (_patch_info != NULL) {
-    visitor->do_slow_case(_patch_info);
-  } else {
-    visitor->do_slow_case();
-  }
-
+  visitor->do_slow_case();
   visitor->do_input(_ref_addr);
   visitor->do_output(_ref);
-
   if (_tmp->is_valid()) {
     visitor->do_temp(_tmp);
   }
@@ -174,6 +159,14 @@
   __ branch_destination(stub->continuation());
 }
 
+LIR_Opr ZBarrierSetC1::resolve_address(LIRAccess& access, bool resolve_in_register) {
+  // We must resolve in register when patching. This is to avoid
+  // having a patch area in the load barrier stub, since the call
+  // into the runtime to patch will not have the proper oop map.
+  const bool patch_before_barrier = barrier_needed(access) && (access.decorators() & C1_NEEDS_PATCHING) != 0;
+  return BarrierSetC1::resolve_address(access, resolve_in_register || patch_before_barrier);
+}
+
 #undef __
 
 void ZBarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) {
--- a/src/hotspot/share/gc/z/c1/zBarrierSetC1.hpp	Mon Jan 28 03:51:38 2019 -0800
+++ b/src/hotspot/share/gc/z/c1/zBarrierSetC1.hpp	Mon Jan 28 21:44:57 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -32,12 +32,11 @@
 
 class ZLoadBarrierStubC1 : public CodeStub {
 private:
-  DecoratorSet  _decorators;
-  LIR_Opr       _ref_addr;
-  LIR_Opr       _ref;
-  LIR_Opr       _tmp;
-  CodeEmitInfo* _patch_info;
-  address       _runtime_stub;
+  DecoratorSet _decorators;
+  LIR_Opr      _ref_addr;
+  LIR_Opr      _ref;
+  LIR_Opr      _tmp;
+  address      _runtime_stub;
 
 public:
   ZLoadBarrierStubC1(LIRAccess& access, LIR_Opr ref, address runtime_stub);
@@ -46,8 +45,6 @@
   LIR_Opr ref() const;
   LIR_Opr ref_addr() const;
   LIR_Opr tmp() const;
-  LIR_PatchCode patch_code() const;
-  CodeEmitInfo*& patch_info();
   address runtime_stub() const;
 
   virtual void emit_code(LIR_Assembler* ce);
@@ -67,6 +64,7 @@
   void load_barrier(LIRAccess& access, LIR_Opr result) const;
 
 protected:
+  virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
   virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
   virtual LIR_Opr atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value);
   virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
--- a/test/hotspot/jtreg/ProblemList-graal.txt	Mon Jan 28 03:51:38 2019 -0800
+++ b/test/hotspot/jtreg/ProblemList-graal.txt	Mon Jan 28 21:44:57 2019 +0100
@@ -39,8 +39,6 @@
 
 compiler/graalunit/JttThreadsTest.java                          8208066   generic-all
 
-compiler/intrinsics/mathexact/LongMulOverflowTest.java          8217796   generic-all
-
 compiler/jvmci/SecurityRestrictionsTest.java                    8181837   generic-all
 
 compiler/unsafe/UnsafeGetConstantField.java                     8181833   generic-all
--- a/test/hotspot/jtreg/ProblemList.txt	Mon Jan 28 03:51:38 2019 -0800
+++ b/test/hotspot/jtreg/ProblemList.txt	Mon Jan 28 21:44:57 2019 +0100
@@ -57,6 +57,10 @@
 
 compiler/runtime/Test8168712.java 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x
 
+applications/ctw/modules/java_desktop.java 8217851 windows-all
+applications/ctw/modules/java_desktop_2.java 8217851 windows-all
+applications/ctw/modules/jdk_jconsole.java 8217851 windows-all
+
 #############################################################################
 
 # :hotspot_gc
--- a/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Mon Jan 28 03:51:38 2019 -0800
+++ b/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Mon Jan 28 21:44:57 2019 +0100
@@ -63,7 +63,7 @@
         testCompressedOopsModes(args, "-XX:+UseParallelGC");
         testCompressedOopsModes(args, "-XX:+UseParallelOldGC");
         if (GC.Shenandoah.isSupported()) {
-            testCompressedOopsModes(args, "-XX:+UseShenandoahGC");
+            testCompressedOopsModes(args, "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC");
         }
     }