8188773: PPC64 and s390: Fix UseMembar and enable ShareVtableStubs
authormdoerr
Wed, 04 Oct 2017 16:44:45 +0200
changeset 47586 07ad034e0c29
parent 47585 c264868bff5b
child 47587 bf73ca31add9
child 47588 6feee2a82b0b
8188773: PPC64 and s390: Fix UseMembar and enable ShareVtableStubs Reviewed-by: goetz
src/hotspot/cpu/ppc/globals_ppc.hpp
src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
src/hotspot/cpu/s390/globals_s390.hpp
src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp
--- a/src/hotspot/cpu/ppc/globals_ppc.hpp	Wed Oct 04 14:25:53 2017 +0200
+++ b/src/hotspot/cpu/ppc/globals_ppc.hpp	Wed Oct 04 16:44:45 2017 +0200
@@ -32,7 +32,7 @@
 // Sets the default values for platform dependent flags used by the runtime system.
 // (see globals.hpp)
 
-define_pd_global(bool, ShareVtableStubs,      false); // Improves performance markedly for mtrt and compress.
+define_pd_global(bool, ShareVtableStubs,      true);
 define_pd_global(bool, NeedsDeoptSuspend,     false); // Only register window machines need this.
 
 
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Wed Oct 04 14:25:53 2017 +0200
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Wed Oct 04 16:44:45 2017 +0200
@@ -2238,9 +2238,6 @@
   __ release();
   // TODO: PPC port assert(4 == JavaThread::sz_thread_state(), "unexpected field size");
   __ stw(R0, thread_(thread_state));
-  if (UseMembar) {
-    __ fence();
-  }
 
 
   // The JNI call
@@ -2397,9 +2394,6 @@
   __ release();
   // TODO: PPC port assert(4 == JavaThread::sz_thread_state(), "unexpected field size");
   __ stw(R0, thread_(thread_state));
-  if (UseMembar) {
-    __ fence();
-  }
   __ bind(after_transition);
 
   // Reguard any pages if necessary.
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp	Wed Oct 04 14:25:53 2017 +0200
+++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp	Wed Oct 04 16:44:45 2017 +0200
@@ -1470,10 +1470,6 @@
   // TODO PPC port assert(4 == JavaThread::sz_thread_state(), "unexpected field size");
   __ stw(R0, thread_(thread_state));
 
-  if (UseMembar) {
-    __ fence();
-  }
-
   //=============================================================================
   // Call the native method. Argument registers must not have been
   // overwritten since "__ call_stub(signature_handler);" (except for
@@ -1594,9 +1590,6 @@
   __ li(R0/*thread_state*/, _thread_in_Java);
   __ release();
   __ stw(R0/*thread_state*/, thread_(thread_state));
-  if (UseMembar) {
-    __ fence();
-  }
 
   if (CheckJNICalls) {
     // clear_pending_jni_exception_check
--- a/src/hotspot/cpu/s390/globals_s390.hpp	Wed Oct 04 14:25:53 2017 +0200
+++ b/src/hotspot/cpu/s390/globals_s390.hpp	Wed Oct 04 16:44:45 2017 +0200
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017 SAP SE. 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
@@ -34,7 +34,7 @@
 // Sorted according to sparc.
 
 // z/Architecture remembers branch targets, so don't share vtables.
-define_pd_global(bool,  ShareVtableStubs,            false);
+define_pd_global(bool,  ShareVtableStubs,            true);
 define_pd_global(bool,  NeedsDeoptSuspend,           false); // Only register window machines need this.
 
 define_pd_global(bool,  ImplicitNullChecks,          true);  // Generate code for implicit null checks.
--- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp	Wed Oct 04 14:25:53 2017 +0200
+++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp	Wed Oct 04 16:44:45 2017 +0200
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017 SAP SE. 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
@@ -471,7 +471,7 @@
     // Info->si_addr need not be the exact address, it is only
     // guaranteed to be on the same page as the address that caused
     // the SIGSEGV.
-    if ((sig == SIGSEGV) &&
+    if ((sig == SIGSEGV) && !UseMembar &&
         (os::get_memory_serialize_page() ==
          (address)((uintptr_t)info->si_addr & ~(os::vm_page_size()-1)))) {
       return true;