equal
deleted
inserted
replaced
58 assert(probe->name != NULL, "valid probe name"); |
58 assert(probe->name != NULL, "valid probe name"); |
59 assert(probe->function != NULL, "valid probe function spec"); |
59 assert(probe->function != NULL, "valid probe function spec"); |
60 methodHandle h_method = |
60 methodHandle h_method = |
61 methodHandle(THREAD, JNIHandles::resolve_jmethod_id(probe->method)); |
61 methodHandle(THREAD, JNIHandles::resolve_jmethod_id(probe->method)); |
62 nmethod* nm = AdapterHandlerLibrary::create_dtrace_nmethod(h_method); |
62 nmethod* nm = AdapterHandlerLibrary::create_dtrace_nmethod(h_method); |
|
63 if (nm == NULL) { |
|
64 delete probes; |
|
65 THROW_MSG_0(vmSymbols::java_lang_RuntimeException(), |
|
66 "Unable to register DTrace probes (CodeCache: no room for DTrace nmethods)."); |
|
67 } |
63 h_method()->set_not_compilable(CompLevel_highest_tier); |
68 h_method()->set_not_compilable(CompLevel_highest_tier); |
64 h_method()->set_code(h_method, nm); |
69 h_method()->set_code(h_method, nm); |
65 probes->nmethod_at_put(count++, nm); |
70 probes->nmethod_at_put(count++, nm); |
66 } |
71 } |
67 } |
72 } |