Mercurial > hg > truffle
diff src/share/vm/utilities/dtrace.hpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | 436b4a3231bf |
children | 75982791ddb6 |
line wrap: on
line diff
--- a/src/share/vm/utilities/dtrace.hpp Sat Dec 17 20:50:09 2011 +0100 +++ b/src/share/vm/utilities/dtrace.hpp Sat Dec 17 21:40:27 2011 +0100 @@ -25,7 +25,7 @@ #ifndef SHARE_VM_UTILITIES_DTRACE_HPP #define SHARE_VM_UTILITIES_DTRACE_HPP -#if defined(SOLARIS) && defined(DTRACE_ENABLED) +#if defined(DTRACE_ENABLED) #include <sys/sdt.h> @@ -36,11 +36,27 @@ #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0) -#else // ndef SOLARIS || ndef DTRACE_ENABLED +#if defined(SOLARIS) +#define USDT1 1 +#elif defined(__APPLE__) +#define USDT2 1 +#include <sys/types.h> +#include "dtracefiles/hotspot.h" +#include "dtracefiles/hotspot_jni.h" +#include "dtracefiles/hs_private.h" +#else +#error "dtrace enabled for unknown os" +#endif /* defined(SOLARIS) */ + +#else /* defined(DTRACE_ENABLED) */ #define DTRACE_ONLY(x) #define NOT_DTRACE(x) x +#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() + +#ifndef USDT2 + #define DTRACE_PROBE(a,b) {;} #define DTRACE_PROBE1(a,b,c) {;} #define DTRACE_PROBE2(a,b,c,d) {;} @@ -48,9 +64,14 @@ #define DTRACE_PROBE4(a,b,c,d,e,f) {;} #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} -#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() +#else /* USDT2 */ -#endif +#include "dtrace_usdt2_disabled.hpp" +#endif /* USDT2 */ + +#endif /* defined(DTRACE_ENABLED) */ + +#ifndef USDT2 #define HS_DTRACE_PROBE_FN(provider,name)\ __dtrace_##provider##___##name @@ -133,4 +154,6 @@ (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ (uintptr_t)a8,(uintptr_t)a9)) +#endif /* !USDT2 */ + #endif // SHARE_VM_UTILITIES_DTRACE_HPP