1.1 --- a/src/share/vm/runtime/synchronizer.cpp Mon Oct 10 21:01:36 2011 -0400 1.2 +++ b/src/share/vm/runtime/synchronizer.cpp Thu Oct 13 09:35:42 2011 -0700 1.3 @@ -77,11 +77,6 @@ 1.4 // Only bother with this argument setup if dtrace is available 1.5 // TODO-FIXME: probes should not fire when caller is _blocked. assert() accordingly. 1.6 1.7 -HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait, 1.8 - jlong, uintptr_t, char*, int, long); 1.9 -HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited, 1.10 - jlong, uintptr_t, char*, int); 1.11 - 1.12 #define DTRACE_MONITOR_PROBE_COMMON(klassOop, thread) \ 1.13 char* bytes = NULL; \ 1.14 int len = 0; \ 1.15 @@ -92,6 +87,12 @@ 1.16 len = klassname->utf8_length(); \ 1.17 } 1.18 1.19 +#ifndef USDT2 1.20 +HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait, 1.21 + jlong, uintptr_t, char*, int, long); 1.22 +HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited, 1.23 + jlong, uintptr_t, char*, int); 1.24 + 1.25 #define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \ 1.26 { \ 1.27 if (DTraceMonitorProbes) { \ 1.28 @@ -110,6 +111,29 @@ 1.29 } \ 1.30 } 1.31 1.32 +#else /* USDT2 */ 1.33 + 1.34 +#define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \ 1.35 + { \ 1.36 + if (DTraceMonitorProbes) { \ 1.37 + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ 1.38 + HOTSPOT_MONITOR_WAIT(jtid, \ 1.39 + (uintptr_t)(monitor), bytes, len, (millis)); \ 1.40 + } \ 1.41 + } 1.42 + 1.43 +#define HOTSPOT_MONITOR_PROBE_waited HOTSPOT_MONITOR_PROBE_WAITED 1.44 + 1.45 +#define DTRACE_MONITOR_PROBE(probe, monitor, klassOop, thread) \ 1.46 + { \ 1.47 + if (DTraceMonitorProbes) { \ 1.48 + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ 1.49 + HOTSPOT_MONITOR_PROBE_##probe(jtid, /* probe = waited */ \ 1.50 + (uintptr_t)(monitor), bytes, len); \ 1.51 + } \ 1.52 + } 1.53 + 1.54 +#endif /* USDT2 */ 1.55 #else // ndef DTRACE_ENABLED 1.56 1.57 #define DTRACE_MONITOR_WAIT_PROBE(klassOop, thread, millis, mon) {;}