Mercurial > hg > truffle
diff src/share/vm/runtime/synchronizer.cpp @ 4006:436b4a3231bf
7098194: integrate macosx-port changes
Summary: Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29.
Reviewed-by: kvn, dholmes, never, phh
Contributed-by: Christos Zoulas <christos@zoulas.com>, Greg Lewis <glewis@eyesbeyond.com>, Kurt Miller <kurt@intricatesoftware.com>, Alexander Strange <astrange@apple.com>, Mike Swingler <swingler@apple.com>, Roger Hoover <rhoover@apple.com>, Victor Hernandez <vhernandez@apple.com>, Pratik Solanki <psolanki@apple.com>
author | dcubed |
---|---|
date | Thu, 13 Oct 2011 09:35:42 -0700 |
parents | f08d439fab8c |
children | 04b9a2566eec da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/runtime/synchronizer.cpp Mon Oct 10 21:01:36 2011 -0400 +++ b/src/share/vm/runtime/synchronizer.cpp Thu Oct 13 09:35:42 2011 -0700 @@ -77,11 +77,6 @@ // Only bother with this argument setup if dtrace is available // TODO-FIXME: probes should not fire when caller is _blocked. assert() accordingly. -HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait, - jlong, uintptr_t, char*, int, long); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited, - jlong, uintptr_t, char*, int); - #define DTRACE_MONITOR_PROBE_COMMON(klassOop, thread) \ char* bytes = NULL; \ int len = 0; \ @@ -92,6 +87,12 @@ len = klassname->utf8_length(); \ } +#ifndef USDT2 +HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait, + jlong, uintptr_t, char*, int, long); +HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited, + jlong, uintptr_t, char*, int); + #define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \ { \ if (DTraceMonitorProbes) { \ @@ -110,6 +111,29 @@ } \ } +#else /* USDT2 */ + +#define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \ + { \ + if (DTraceMonitorProbes) { \ + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ + HOTSPOT_MONITOR_WAIT(jtid, \ + (uintptr_t)(monitor), bytes, len, (millis)); \ + } \ + } + +#define HOTSPOT_MONITOR_PROBE_waited HOTSPOT_MONITOR_PROBE_WAITED + +#define DTRACE_MONITOR_PROBE(probe, monitor, klassOop, thread) \ + { \ + if (DTraceMonitorProbes) { \ + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ + HOTSPOT_MONITOR_PROBE_##probe(jtid, /* probe = waited */ \ + (uintptr_t)(monitor), bytes, len); \ + } \ + } + +#endif /* USDT2 */ #else // ndef DTRACE_ENABLED #define DTRACE_MONITOR_WAIT_PROBE(klassOop, thread, millis, mon) {;}