58 |
58 |
59 #ifdef DTRACE_ENABLED |
59 #ifdef DTRACE_ENABLED |
60 |
60 |
61 // Only bother with this argument setup if dtrace is available |
61 // Only bother with this argument setup if dtrace is available |
62 |
62 |
63 #ifndef USDT2 |
|
64 HS_DTRACE_PROBE_DECL8(hotspot, method__compile__begin, |
|
65 char*, intptr_t, char*, intptr_t, char*, intptr_t, char*, intptr_t); |
|
66 HS_DTRACE_PROBE_DECL9(hotspot, method__compile__end, |
|
67 char*, intptr_t, char*, intptr_t, char*, intptr_t, char*, intptr_t, bool); |
|
68 |
|
69 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, comp_name) \ |
|
70 { \ |
|
71 Symbol* klass_name = (method)->klass_name(); \ |
|
72 Symbol* name = (method)->name(); \ |
|
73 Symbol* signature = (method)->signature(); \ |
|
74 HS_DTRACE_PROBE8(hotspot, method__compile__begin, \ |
|
75 comp_name, strlen(comp_name), \ |
|
76 klass_name->bytes(), klass_name->utf8_length(), \ |
|
77 name->bytes(), name->utf8_length(), \ |
|
78 signature->bytes(), signature->utf8_length()); \ |
|
79 } |
|
80 |
|
81 #define DTRACE_METHOD_COMPILE_END_PROBE(method, comp_name, success) \ |
|
82 { \ |
|
83 Symbol* klass_name = (method)->klass_name(); \ |
|
84 Symbol* name = (method)->name(); \ |
|
85 Symbol* signature = (method)->signature(); \ |
|
86 HS_DTRACE_PROBE9(hotspot, method__compile__end, \ |
|
87 comp_name, strlen(comp_name), \ |
|
88 klass_name->bytes(), klass_name->utf8_length(), \ |
|
89 name->bytes(), name->utf8_length(), \ |
|
90 signature->bytes(), signature->utf8_length(), (success)); \ |
|
91 } |
|
92 |
|
93 #else /* USDT2 */ |
|
94 |
|
95 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, comp_name) \ |
63 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, comp_name) \ |
96 { \ |
64 { \ |
97 Symbol* klass_name = (method)->klass_name(); \ |
65 Symbol* klass_name = (method)->klass_name(); \ |
98 Symbol* name = (method)->name(); \ |
66 Symbol* name = (method)->name(); \ |
99 Symbol* signature = (method)->signature(); \ |
67 Symbol* signature = (method)->signature(); \ |
113 (char *) comp_name, strlen(comp_name), \ |
81 (char *) comp_name, strlen(comp_name), \ |
114 (char *) klass_name->bytes(), klass_name->utf8_length(), \ |
82 (char *) klass_name->bytes(), klass_name->utf8_length(), \ |
115 (char *) name->bytes(), name->utf8_length(), \ |
83 (char *) name->bytes(), name->utf8_length(), \ |
116 (char *) signature->bytes(), signature->utf8_length(), (success)); \ |
84 (char *) signature->bytes(), signature->utf8_length(), (success)); \ |
117 } |
85 } |
118 #endif /* USDT2 */ |
|
119 |
86 |
120 #else // ndef DTRACE_ENABLED |
87 #else // ndef DTRACE_ENABLED |
121 |
88 |
122 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, comp_name) |
89 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, comp_name) |
123 #define DTRACE_METHOD_COMPILE_END_PROBE(method, comp_name, success) |
90 #define DTRACE_METHOD_COMPILE_END_PROBE(method, comp_name, success) |