--- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp Fri Apr 24 15:08:30 2009 -0700
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp Wed Apr 29 12:58:09 2009 -0700
@@ -60,6 +60,11 @@
methodHandle h_method =
methodHandle(THREAD, JNIHandles::resolve_jmethod_id(probe->method));
nmethod* nm = AdapterHandlerLibrary::create_dtrace_nmethod(h_method);
+ if (nm == NULL) {
+ delete probes;
+ THROW_MSG_0(vmSymbols::java_lang_RuntimeException(),
+ "Unable to register DTrace probes (CodeCache: no room for DTrace nmethods).");
+ }
h_method()->set_not_compilable(CompLevel_highest_tier);
h_method()->set_code(h_method, nm);
probes->nmethod_at_put(count++, nm);