78 #include "c1/c1_Compiler.hpp" |
78 #include "c1/c1_Compiler.hpp" |
79 #endif |
79 #endif |
80 |
80 |
81 #ifdef DTRACE_ENABLED |
81 #ifdef DTRACE_ENABLED |
82 |
82 |
|
83 #ifndef USDT2 |
|
84 |
83 HS_DTRACE_PROBE_DECL4(hotspot, class__initialization__required, |
85 HS_DTRACE_PROBE_DECL4(hotspot, class__initialization__required, |
84 char*, intptr_t, oop, intptr_t); |
86 char*, intptr_t, oop, intptr_t); |
85 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__recursive, |
87 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__recursive, |
86 char*, intptr_t, oop, intptr_t, int); |
88 char*, intptr_t, oop, intptr_t, int); |
87 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__concurrent, |
89 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__concurrent, |
120 len = name->utf8_length(); \ |
122 len = name->utf8_length(); \ |
121 } \ |
123 } \ |
122 HS_DTRACE_PROBE5(hotspot, class__initialization__##type, \ |
124 HS_DTRACE_PROBE5(hotspot, class__initialization__##type, \ |
123 data, len, (clss)->class_loader(), thread_type, wait); \ |
125 data, len, (clss)->class_loader(), thread_type, wait); \ |
124 } |
126 } |
|
127 #else /* USDT2 */ |
|
128 |
|
129 #define HOTSPOT_CLASS_INITIALIZATION_required HOTSPOT_CLASS_INITIALIZATION_REQUIRED |
|
130 #define HOTSPOT_CLASS_INITIALIZATION_recursive HOTSPOT_CLASS_INITIALIZATION_RECURSIVE |
|
131 #define HOTSPOT_CLASS_INITIALIZATION_concurrent HOTSPOT_CLASS_INITIALIZATION_CONCURRENT |
|
132 #define HOTSPOT_CLASS_INITIALIZATION_erroneous HOTSPOT_CLASS_INITIALIZATION_ERRONEOUS |
|
133 #define HOTSPOT_CLASS_INITIALIZATION_super__failed HOTSPOT_CLASS_INITIALIZATION_SUPER_FAILED |
|
134 #define HOTSPOT_CLASS_INITIALIZATION_clinit HOTSPOT_CLASS_INITIALIZATION_CLINIT |
|
135 #define HOTSPOT_CLASS_INITIALIZATION_error HOTSPOT_CLASS_INITIALIZATION_ERROR |
|
136 #define HOTSPOT_CLASS_INITIALIZATION_end HOTSPOT_CLASS_INITIALIZATION_END |
|
137 #define DTRACE_CLASSINIT_PROBE(type, clss, thread_type) \ |
|
138 { \ |
|
139 char* data = NULL; \ |
|
140 int len = 0; \ |
|
141 Symbol* name = (clss)->name(); \ |
|
142 if (name != NULL) { \ |
|
143 data = (char*)name->bytes(); \ |
|
144 len = name->utf8_length(); \ |
|
145 } \ |
|
146 HOTSPOT_CLASS_INITIALIZATION_##type( \ |
|
147 data, len, (clss)->class_loader(), thread_type); \ |
|
148 } |
|
149 |
|
150 #define DTRACE_CLASSINIT_PROBE_WAIT(type, clss, thread_type, wait) \ |
|
151 { \ |
|
152 char* data = NULL; \ |
|
153 int len = 0; \ |
|
154 Symbol* name = (clss)->name(); \ |
|
155 if (name != NULL) { \ |
|
156 data = (char*)name->bytes(); \ |
|
157 len = name->utf8_length(); \ |
|
158 } \ |
|
159 HOTSPOT_CLASS_INITIALIZATION_##type( \ |
|
160 data, len, (clss)->class_loader(), thread_type, wait); \ |
|
161 } |
|
162 #endif /* USDT2 */ |
125 |
163 |
126 #else // ndef DTRACE_ENABLED |
164 #else // ndef DTRACE_ENABLED |
127 |
165 |
128 #define DTRACE_CLASSINIT_PROBE(type, clss, thread_type) |
166 #define DTRACE_CLASSINIT_PROBE(type, clss, thread_type) |
129 #define DTRACE_CLASSINIT_PROBE_WAIT(type, clss, thread_type, wait) |
167 #define DTRACE_CLASSINIT_PROBE_WAIT(type, clss, thread_type, wait) |