changeset 13466:7b6cf40330d6

Merge
author sspitsyn
date Tue, 08 Aug 2017 01:44:43 +0000
parents 3b04b795eb1e c99a4c62c22d
children 233e37b0c0bb
files
diffstat 4 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp	Mon Aug 07 18:14:39 2017 -0700
+++ b/src/share/vm/oops/instanceKlass.cpp	Tue Aug 08 01:44:43 2017 +0000
@@ -101,7 +101,7 @@
       len = clss_name->utf8_length();                            \
     }                                                            \
     HOTSPOT_CLASS_INITIALIZATION_##type(                         \
-      data, len, class_loader(), thread_type);                   \
+      data, len, (void*)class_loader(), thread_type);            \
   }
 
 #define DTRACE_CLASSINIT_PROBE_WAIT(type, thread_type, wait)     \
@@ -114,7 +114,7 @@
       len = clss_name->utf8_length();                            \
     }                                                            \
     HOTSPOT_CLASS_INITIALIZATION_##type(                         \
-      data, len, class_loader(), thread_type, wait);             \
+      data, len, (void*)class_loader(), thread_type, wait);      \
   }
 
 #else //  ndef DTRACE_ENABLED
--- a/src/share/vm/runtime/mutex.cpp	Mon Aug 07 18:14:39 2017 -0700
+++ b/src/share/vm/runtime/mutex.cpp	Tue Aug 08 01:44:43 2017 +0000
@@ -1159,9 +1159,12 @@
   uintptr_t entrylist = UNS(_EntryList);
   uintptr_t waitset = UNS(_WaitSet);
   uintptr_t ondeck = UNS(_OnDeck);
+  // Print _name with precision limit, in case failure is due to memory
+  // corruption that also trashed _name.
   assert((owner|lockword|entrylist|waitset|ondeck) == 0,
-         "_owner(" INTPTR_FORMAT ")|_LockWord(" INTPTR_FORMAT ")|_EntryList(" INTPTR_FORMAT ")|_WaitSet("
-         INTPTR_FORMAT ")|_OnDeck(" INTPTR_FORMAT ") != 0", owner, lockword, entrylist, waitset, ondeck);
+         "%.*s: _owner(" INTPTR_FORMAT ")|_LockWord(" INTPTR_FORMAT ")|_EntryList(" INTPTR_FORMAT ")|_WaitSet("
+         INTPTR_FORMAT ")|_OnDeck(" INTPTR_FORMAT ") != 0",
+         MONITOR_NAME_LEN, _name, owner, lockword, entrylist, waitset, ondeck);
 #endif
 }
 
@@ -1193,10 +1196,6 @@
 #endif
 }
 
-Mutex::~Mutex() {
-  assert((UNS(_owner)|UNS(_LockWord.FullWord)|UNS(_EntryList)|UNS(_WaitSet)|UNS(_OnDeck)) == 0, "");
-}
-
 Mutex::Mutex(int Rank, const char * name, bool allow_vm_block,
              SafepointCheckRequired safepoint_check_required) {
   ClearMonitor((Monitor *) this, name);
--- a/src/share/vm/runtime/mutex.hpp	Mon Aug 07 18:14:39 2017 -0700
+++ b/src/share/vm/runtime/mutex.hpp	Tue Aug 08 01:44:43 2017 +0000
@@ -303,7 +303,7 @@
  public:
    Mutex(int rank, const char *name, bool allow_vm_block = false,
          SafepointCheckRequired safepoint_check_required = _safepoint_check_always);
-   ~Mutex () ;
+  // default destructor
  private:
    bool notify ()    { ShouldNotReachHere(); return false; }
    bool notify_all() { ShouldNotReachHere(); return false; }
--- a/src/share/vm/services/classLoadingService.cpp	Mon Aug 07 18:14:39 2017 -0700
+++ b/src/share/vm/services/classLoadingService.cpp	Tue Aug 08 01:44:43 2017 +0000
@@ -53,7 +53,7 @@
       len = name->utf8_length();                    \
     }                                               \
     HOTSPOT_CLASS_##type( /* type = unloaded, loaded */ \
-      data, len, (clss)->class_loader(), (shared)); \
+      data, len, (void*)(clss)->class_loader(), (shared)); \
   }
 
 #else //  ndef DTRACE_ENABLED