61 #define DTRACE_PROBE1(a,b,c) {;} |
66 #define DTRACE_PROBE1(a,b,c) {;} |
62 #define DTRACE_PROBE2(a,b,c,d) {;} |
67 #define DTRACE_PROBE2(a,b,c,d) {;} |
63 #define DTRACE_PROBE3(a,b,c,d,e) {;} |
68 #define DTRACE_PROBE3(a,b,c,d,e) {;} |
64 #define DTRACE_PROBE4(a,b,c,d,e,f) {;} |
69 #define DTRACE_PROBE4(a,b,c,d,e,f) {;} |
65 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} |
70 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} |
|
71 #define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;} |
|
72 #define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;} |
|
73 #define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;} |
|
74 #define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;} |
|
75 #define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;} |
66 |
76 |
67 #else /* USDT2 */ |
77 #else /* USDT2 */ |
68 |
78 |
69 #include "dtrace_usdt2_disabled.hpp" |
79 #include "dtrace_usdt2_disabled.hpp" |
70 #endif /* USDT2 */ |
80 #endif /* USDT2 */ |
74 #ifndef USDT2 |
84 #ifndef USDT2 |
75 |
85 |
76 #define HS_DTRACE_PROBE_FN(provider,name)\ |
86 #define HS_DTRACE_PROBE_FN(provider,name)\ |
77 __dtrace_##provider##___##name |
87 __dtrace_##provider##___##name |
78 |
88 |
|
89 #ifdef SOLARIS |
|
90 // Solaris dtrace needs actual extern function decls. |
79 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \ |
91 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \ |
80 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) |
92 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) |
81 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ |
93 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ |
82 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) |
94 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) |
|
95 #else |
|
96 // Systemtap dtrace compatible probes on GNU/Linux don't. |
|
97 // If dtrace is disabled this macro becomes NULL |
|
98 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) |
|
99 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) |
|
100 #endif |
83 |
101 |
84 /* Dtrace probe declarations */ |
102 /* Dtrace probe declarations */ |
85 #define HS_DTRACE_PROBE_DECL(provider,name) \ |
103 #define HS_DTRACE_PROBE_DECL(provider,name) \ |
86 HS_DTRACE_PROBE_DECL0(provider,name) |
104 HS_DTRACE_PROBE_DECL0(provider,name) |
87 #define HS_DTRACE_PROBE_DECL0(provider,name)\ |
105 #define HS_DTRACE_PROBE_DECL0(provider,name)\ |
116 HS_DTRACE_PROBE_DECL_N(provider,name,(\ |
134 HS_DTRACE_PROBE_DECL_N(provider,name,(\ |
117 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ |
135 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ |
118 uintptr_t,uintptr_t,uintptr_t)) |
136 uintptr_t,uintptr_t,uintptr_t)) |
119 |
137 |
120 /* Dtrace probe definitions */ |
138 /* Dtrace probe definitions */ |
|
139 #if defined(SOLARIS) |
|
140 // Solaris dtrace uses actual function calls. |
121 #define HS_DTRACE_PROBE_N(provider,name, args) \ |
141 #define HS_DTRACE_PROBE_N(provider,name, args) \ |
122 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) |
142 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) |
123 |
143 |
124 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) |
144 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) |
125 #define HS_DTRACE_PROBE0(provider,name)\ |
145 #define HS_DTRACE_PROBE0(provider,name)\ |
151 (uintptr_t)a8)) |
171 (uintptr_t)a8)) |
152 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ |
172 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ |
153 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ |
173 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ |
154 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ |
174 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ |
155 (uintptr_t)a8,(uintptr_t)a9)) |
175 (uintptr_t)a8,(uintptr_t)a9)) |
|
176 #else |
|
177 // Systemtap dtrace compatible probes on GNU/Linux use direct macros. |
|
178 // If dtrace is disabled this macro becomes NULL |
|
179 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) |
|
180 #define HS_DTRACE_PROBE0(provider,name)\ |
|
181 DTRACE_PROBE(provider,name) |
|
182 #define HS_DTRACE_PROBE1(provider,name,a0)\ |
|
183 DTRACE_PROBE1(provider,name,a0) |
|
184 #define HS_DTRACE_PROBE2(provider,name,a0,a1)\ |
|
185 DTRACE_PROBE2(provider,name,a0,a1) |
|
186 #define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\ |
|
187 DTRACE_PROBE3(provider,name,a0,a1,a2) |
|
188 #define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\ |
|
189 DTRACE_PROBE4(provider,name,a0,a1,a2,a3) |
|
190 #define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\ |
|
191 DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4) |
|
192 #define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\ |
|
193 DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5) |
|
194 #define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\ |
|
195 DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6) |
|
196 #define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\ |
|
197 DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7) |
|
198 #define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\ |
|
199 DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8) |
|
200 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ |
|
201 DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9) |
|
202 #endif |
156 |
203 |
157 #endif /* !USDT2 */ |
204 #endif /* !USDT2 */ |
158 |
205 |
159 #endif // SHARE_VM_UTILITIES_DTRACE_HPP |
206 #endif // SHARE_VM_UTILITIES_DTRACE_HPP |