76 if (klassname != NULL) { \ |
76 if (klassname != NULL) { \ |
77 bytes = (char*)klassname->bytes(); \ |
77 bytes = (char*)klassname->bytes(); \ |
78 len = klassname->utf8_length(); \ |
78 len = klassname->utf8_length(); \ |
79 } |
79 } |
80 |
80 |
81 #ifndef USDT2 |
|
82 |
|
83 HS_DTRACE_PROBE_DECL4(hotspot, monitor__notify, |
|
84 jlong, uintptr_t, char*, int); |
|
85 HS_DTRACE_PROBE_DECL4(hotspot, monitor__notifyAll, |
|
86 jlong, uintptr_t, char*, int); |
|
87 HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__enter, |
|
88 jlong, uintptr_t, char*, int); |
|
89 HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__entered, |
|
90 jlong, uintptr_t, char*, int); |
|
91 HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__exit, |
|
92 jlong, uintptr_t, char*, int); |
|
93 |
|
94 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis) \ |
|
95 { \ |
|
96 if (DTraceMonitorProbes) { \ |
|
97 DTRACE_MONITOR_PROBE_COMMON(obj, thread); \ |
|
98 HS_DTRACE_PROBE5(hotspot, monitor__wait, jtid, \ |
|
99 (monitor), bytes, len, (millis)); \ |
|
100 } \ |
|
101 } |
|
102 |
|
103 #define DTRACE_MONITOR_PROBE(probe, monitor, obj, thread) \ |
|
104 { \ |
|
105 if (DTraceMonitorProbes) { \ |
|
106 DTRACE_MONITOR_PROBE_COMMON(obj, thread); \ |
|
107 HS_DTRACE_PROBE4(hotspot, monitor__##probe, jtid, \ |
|
108 (uintptr_t)(monitor), bytes, len); \ |
|
109 } \ |
|
110 } |
|
111 |
|
112 #else /* USDT2 */ |
|
113 |
|
114 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis) \ |
81 #define DTRACE_MONITOR_WAIT_PROBE(monitor, obj, thread, millis) \ |
115 { \ |
82 { \ |
116 if (DTraceMonitorProbes) { \ |
83 if (DTraceMonitorProbes) { \ |
117 DTRACE_MONITOR_PROBE_COMMON(obj, thread); \ |
84 DTRACE_MONITOR_PROBE_COMMON(obj, thread); \ |
118 HOTSPOT_MONITOR_WAIT(jtid, \ |
85 HOTSPOT_MONITOR_WAIT(jtid, \ |
133 HOTSPOT_MONITOR_##probe(jtid, \ |
100 HOTSPOT_MONITOR_##probe(jtid, \ |
134 (uintptr_t)(monitor), bytes, len); \ |
101 (uintptr_t)(monitor), bytes, len); \ |
135 } \ |
102 } \ |
136 } |
103 } |
137 |
104 |
138 #endif /* USDT2 */ |
|
139 #else // ndef DTRACE_ENABLED |
105 #else // ndef DTRACE_ENABLED |
140 |
106 |
141 #define DTRACE_MONITOR_WAIT_PROBE(obj, thread, millis, mon) {;} |
107 #define DTRACE_MONITOR_WAIT_PROBE(obj, thread, millis, mon) {;} |
142 #define DTRACE_MONITOR_PROBE(probe, obj, thread, mon) {;} |
108 #define DTRACE_MONITOR_PROBE(probe, obj, thread, mon) {;} |
143 |
109 |