hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 28947 2ea471384931
parent 28039 bf5a8340bf8a
child 29070 b0a5fc9c59c8
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Wed Feb 04 16:26:38 2015 +0100
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Jan 12 14:05:16 2015 +0100
@@ -2610,68 +2610,6 @@
   GC_locker::unlock_critical(thread);
 JRT_END
 
-#ifdef HAVE_DTRACE_H
-/**
- * Create a dtrace nmethod for this method.  The wrapper converts the
- * Java-compiled calling convention to the native convention, makes a dummy call
- * (actually nops for the size of the call instruction, which become a trap if
- * probe is enabled), and finally returns to the caller. Since this all looks like a
- * leaf, no thread transition is needed.
- */
-nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
-  ResourceMark rm;
-  nmethod* nm = NULL;
-
-  if (PrintCompilation) {
-    ttyLocker ttyl;
-    tty->print("---   n  ");
-    method->print_short_name(tty);
-    if (method->is_static()) {
-      tty->print(" (static)");
-    }
-    tty->cr();
-  }
-
-  {
-    // perform the work while holding the lock, but perform any printing
-    // outside the lock
-    MutexLocker mu(AdapterHandlerLibrary_lock);
-    // See if somebody beat us to it
-    nm = method->code();
-    if (nm) {
-      return nm;
-    }
-
-    ResourceMark rm;
-
-    BufferBlob*  buf = buffer_blob(); // the temporary code buffer in CodeCache
-    if (buf != NULL) {
-      CodeBuffer buffer(buf);
-      // Need a few relocation entries
-      double locs_buf[20];
-      buffer.insts()->initialize_shared_locs(
-        (relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
-      MacroAssembler _masm(&buffer);
-
-      // Generate the compiled-to-native wrapper code
-      nm = SharedRuntime::generate_dtrace_nmethod(&_masm, method);
-    }
-  }
-  return nm;
-}
-
-// the dtrace method needs to convert java lang string to utf8 string.
-void SharedRuntime::get_utf(oopDesc* src, address dst) {
-  typeArrayOop jlsValue  = java_lang_String::value(src);
-  int          jlsOffset = java_lang_String::offset(src);
-  int          jlsLen    = java_lang_String::length(src);
-  jchar*       jlsPos    = (jlsLen == 0) ? NULL :
-                                           jlsValue->char_at_addr(jlsOffset);
-  assert(TypeArrayKlass::cast(jlsValue->klass())->element_type() == T_CHAR, "compressed string");
-  (void) UNICODE::as_utf8(jlsPos, jlsLen, (char *)dst, max_dtrace_string_size);
-}
-#endif // ndef HAVE_DTRACE_H
-
 int SharedRuntime::convert_ints_to_longints_argcnt(int in_args_count, BasicType* in_sig_bt) {
   int argcnt = in_args_count;
   if (CCallingConventionRequiresIntsAsLongs) {