diff src/share/vm/services/classLoadingService.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents e6195383bcaf
children 52b4284cb496
line wrap: on
line diff
--- a/src/share/vm/services/classLoadingService.cpp	Tue Apr 01 14:09:03 2014 +0200
+++ b/src/share/vm/services/classLoadingService.cpp	Tue Apr 01 13:57:07 2014 +0200
@@ -37,6 +37,26 @@
 
 // Only bother with this argument setup if dtrace is available
 
+#ifndef USDT2
+
+HS_DTRACE_PROBE_DECL4(hotspot, class__loaded, char*, int, oop, bool);
+HS_DTRACE_PROBE_DECL4(hotspot, class__unloaded, char*, int, oop, bool);
+
+#define DTRACE_CLASSLOAD_PROBE(type, clss, shared)  \
+  {                                                 \
+    char* data = NULL;                              \
+    int len = 0;                                    \
+    Symbol* name = (clss)->name();                  \
+    if (name != NULL) {                             \
+      data = (char*)name->bytes();                  \
+      len = name->utf8_length();                    \
+    }                                               \
+    HS_DTRACE_PROBE4(hotspot, class__##type,        \
+      data, len, SOLARIS_ONLY((void *))(clss)->class_loader(), (shared)); \
+  }
+
+#else /* USDT2 */
+
 #define HOTSPOT_CLASS_unloaded HOTSPOT_CLASS_UNLOADED
 #define HOTSPOT_CLASS_loaded HOTSPOT_CLASS_LOADED
 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared)  \
@@ -52,6 +72,7 @@
       data, len, (clss)->class_loader(), (shared)); \
   }
 
+#endif /* USDT2 */
 #else //  ndef DTRACE_ENABLED
 
 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared)