changeset 57632:0a8407a78a2f

8229345: Memory leak due to vtable stubs not being shared on SPARC Reviewed-by: mdoerr, dholmes, kvn
author eosterlund
date Fri, 16 Aug 2019 16:50:17 +0200
parents 6768b0f490df
children ca133d5ea78a
files src/hotspot/cpu/aarch64/globals_aarch64.hpp src/hotspot/cpu/arm/globals_arm.hpp src/hotspot/cpu/ppc/globals_ppc.hpp src/hotspot/cpu/s390/globals_s390.hpp src/hotspot/cpu/sparc/globals_sparc.hpp src/hotspot/cpu/x86/globals_x86.hpp src/hotspot/cpu/zero/globals_zero.hpp src/hotspot/share/code/vtableStubs.cpp src/hotspot/share/runtime/globals.hpp
diffstat 9 files changed, 1 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/globals_aarch64.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/aarch64/globals_aarch64.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -32,8 +32,6 @@
 // Sets the default values for platform dependent flags used by the runtime system.
 // (see globals.hpp)
 
-define_pd_global(bool, ShareVtableStubs,         true);
-
 define_pd_global(bool, ImplicitNullChecks,       true);  // Generate code for implicit null checks
 define_pd_global(bool, TrapBasedNullChecks,  false);
 define_pd_global(bool, UncommonNullCast,         true);  // Uncommon-trap NULLs past to check cast
--- a/src/hotspot/cpu/arm/globals_arm.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/arm/globals_arm.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -30,8 +30,6 @@
 // (see globals.hpp)
 //
 
-define_pd_global(bool,  ShareVtableStubs,         true);
-
 define_pd_global(bool,  ImplicitNullChecks,       true);  // Generate code for implicit null checks
 define_pd_global(bool,  UncommonNullCast,         true);  // Uncommon-trap NULLs past to check cast
 define_pd_global(bool,  TrapBasedNullChecks,      false); // Not needed
--- a/src/hotspot/cpu/ppc/globals_ppc.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/ppc/globals_ppc.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -32,8 +32,6 @@
 // Sets the default values for platform dependent flags used by the runtime system.
 // (see globals.hpp)
 
-define_pd_global(bool, ShareVtableStubs,      true);
-
 define_pd_global(bool, ImplicitNullChecks,    true);  // Generate code for implicit null checks.
 define_pd_global(bool, TrapBasedNullChecks,   true);
 define_pd_global(bool, UncommonNullCast,      true);  // Uncommon-trap NULLs passed to check cast.
--- a/src/hotspot/cpu/s390/globals_s390.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/s390/globals_s390.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -33,9 +33,6 @@
 // (see globals.hpp)
 // Sorted according to sparc.
 
-// z/Architecture remembers branch targets, so don't share vtables.
-define_pd_global(bool,  ShareVtableStubs,            true);
-
 define_pd_global(bool,  ImplicitNullChecks,          true);  // Generate code for implicit null checks.
 define_pd_global(bool,  TrapBasedNullChecks,         true);
 define_pd_global(bool,  UncommonNullCast,            true);  // Uncommon-trap NULLs passed to check cast.
--- a/src/hotspot/cpu/sparc/globals_sparc.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/sparc/globals_sparc.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -37,7 +37,6 @@
 // the load of the dispatch address and hence the jmp would still go to the location
 // according to the prior table. So, we let the thread continue and let it block by itself.
 define_pd_global(bool, DontYieldALot,               true);  // yield no more than 100 times per second
-define_pd_global(bool, ShareVtableStubs,            false); // improves performance markedly for mtrt and compress
 
 define_pd_global(bool, ImplicitNullChecks,          true);  // Generate code for implicit null checks
 define_pd_global(bool, TrapBasedNullChecks,         false); // Not needed on sparc.
--- a/src/hotspot/cpu/x86/globals_x86.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/x86/globals_x86.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -31,8 +31,6 @@
 // Sets the default values for platform dependent flags used by the runtime system.
 // (see globals.hpp)
 
-define_pd_global(bool, ShareVtableStubs,         true);
-
 define_pd_global(bool, ImplicitNullChecks,       true);  // Generate code for implicit null checks
 define_pd_global(bool, TrapBasedNullChecks,      false); // Not needed on x86.
 define_pd_global(bool, UncommonNullCast,         true);  // Uncommon-trap NULLs passed to check cast
--- a/src/hotspot/cpu/zero/globals_zero.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/cpu/zero/globals_zero.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -32,8 +32,6 @@
 // Set the default values for platform dependent flags used by the
 // runtime system.  See globals.hpp for details of what they do.
 
-define_pd_global(bool,  ShareVtableStubs,     true);
-
 define_pd_global(bool,  ImplicitNullChecks,   true);
 define_pd_global(bool,  TrapBasedNullChecks,  false);
 define_pd_global(bool,  UncommonNullCast,     true);
--- a/src/hotspot/share/code/vtableStubs.cpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/share/code/vtableStubs.cpp	Fri Aug 16 16:50:17 2019 +0200
@@ -213,7 +213,7 @@
   VtableStub* s;
   {
     MutexLocker ml(VtableStubs_lock, Mutex::_no_safepoint_check_flag);
-    s = ShareVtableStubs ? lookup(is_vtable_stub, vtable_index) : NULL;
+    s = lookup(is_vtable_stub, vtable_index);
     if (s == NULL) {
       if (is_vtable_stub) {
         s = create_vtable_stub(vtable_index);
--- a/src/hotspot/share/runtime/globals.hpp	Fri Aug 16 15:01:58 2019 +0100
+++ b/src/hotspot/share/runtime/globals.hpp	Fri Aug 16 16:50:17 2019 +0200
@@ -736,9 +736,6 @@
   product(bool, ReduceSignalUsage, false,                                   \
           "Reduce the use of OS signals in Java and/or the VM")             \
                                                                             \
-  develop_pd(bool, ShareVtableStubs,                                        \
-          "Share vtable stubs (smaller code but worse branch prediction")   \
-                                                                            \
   develop(bool, LoadLineNumberTables, true,                                 \
           "Tell whether the class file parser loads line number tables")    \
                                                                             \