hotspot/src/share/vm/runtime/synchronizer.cpp
changeset 22796 bb0ea482a99e
parent 22743 e043208c9d93
child 22881 b16d7faa638d
equal deleted inserted replaced
22795:2b5380bc0926 22796:bb0ea482a99e
    82   if (klassname != NULL) {                                                 \
    82   if (klassname != NULL) {                                                 \
    83     bytes = (char*)klassname->bytes();                                     \
    83     bytes = (char*)klassname->bytes();                                     \
    84     len = klassname->utf8_length();                                        \
    84     len = klassname->utf8_length();                                        \
    85   }
    85   }
    86 
    86 
    87 #ifndef USDT2
       
    88 HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait,
       
    89   jlong, uintptr_t, char*, int, long);
       
    90 HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited,
       
    91   jlong, uintptr_t, char*, int);
       
    92 
       
    93 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis)            \
       
    94   {                                                                        \
       
    95     if (DTraceMonitorProbes) {                                            \
       
    96       DTRACE_MONITOR_PROBE_COMMON(obj, thread);                            \
       
    97       HS_DTRACE_PROBE5(hotspot, monitor__wait, jtid,                       \
       
    98                        (monitor), bytes, len, (millis));                   \
       
    99     }                                                                      \
       
   100   }
       
   101 
       
   102 #define DTRACE_MONITOR_PROBE(probe, monitor, obj, thread)                  \
       
   103   {                                                                        \
       
   104     if (DTraceMonitorProbes) {                                            \
       
   105       DTRACE_MONITOR_PROBE_COMMON(obj, thread);                            \
       
   106       HS_DTRACE_PROBE4(hotspot, monitor__##probe, jtid,                    \
       
   107                        (uintptr_t)(monitor), bytes, len);                  \
       
   108     }                                                                      \
       
   109   }
       
   110 
       
   111 #else /* USDT2 */
       
   112 
       
   113 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis)            \
    87 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis)            \
   114   {                                                                        \
    88   {                                                                        \
   115     if (DTraceMonitorProbes) {                                            \
    89     if (DTraceMonitorProbes) {                                            \
   116       DTRACE_MONITOR_PROBE_COMMON(obj, thread);                            \
    90       DTRACE_MONITOR_PROBE_COMMON(obj, thread);                            \
   117       HOTSPOT_MONITOR_WAIT(jtid,                                           \
    91       HOTSPOT_MONITOR_WAIT(jtid,                                           \
   128       HOTSPOT_MONITOR_PROBE_##probe(jtid, /* probe = waited */             \
   102       HOTSPOT_MONITOR_PROBE_##probe(jtid, /* probe = waited */             \
   129                        (uintptr_t)(monitor), bytes, len);                  \
   103                        (uintptr_t)(monitor), bytes, len);                  \
   130     }                                                                      \
   104     }                                                                      \
   131   }
   105   }
   132 
   106 
   133 #endif /* USDT2 */
       
   134 #else //  ndef DTRACE_ENABLED
   107 #else //  ndef DTRACE_ENABLED
   135 
   108 
   136 #define DTRACE_MONITOR_WAIT_PROBE(obj, thread, millis, mon)    {;}
   109 #define DTRACE_MONITOR_WAIT_PROBE(obj, thread, millis, mon)    {;}
   137 #define DTRACE_MONITOR_PROBE(probe, obj, thread, mon)          {;}
   110 #define DTRACE_MONITOR_PROBE(probe, obj, thread, mon)          {;}
   138 
   111