diff src/share/vm/runtime/dtraceJSDT.cpp @ 742:45463a04ca27

6834177: Running jsynprog on Solaris Nevada can cause JVM crash Summary: Use CodeCache buffer blob instead of static buffer in AdapterHandlerLibrary. Reviewed-by: never
author kvn
date Wed, 29 Apr 2009 12:58:09 -0700
parents d1605aabd0a1
children bd02caa94611
line wrap: on
line diff
--- a/src/share/vm/runtime/dtraceJSDT.cpp	Fri Apr 24 15:08:30 2009 -0700
+++ b/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);