8071654: disassembler handles embedded OOPs not uniformly
authorzmajo
Thu, 29 Jan 2015 19:16:47 +0100
changeset 28914 bee40a1e5cff
parent 28913 252f7d579300
child 28916 9e4da5f6abe5
child 28918 da6e98e25711
child 28922 bff1596d4b44
8071654: disassembler handles embedded OOPs not uniformly Summary: Remove (currently dead) code that prints oops within disassembled instructions. Reviewed-by: kvn, thartmann, roland
hotspot/src/share/vm/code/nmethod.cpp
hotspot/src/share/vm/code/nmethod.hpp
hotspot/src/share/vm/compiler/disassembler.cpp
--- a/hotspot/src/share/vm/code/nmethod.cpp	Thu Jan 29 10:26:02 2015 -0800
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Jan 29 19:16:47 2015 +0100
@@ -2310,17 +2310,6 @@
 #endif // !SHARK
 }
 
-
-oop nmethod::embeddedOop_at(u_char* p) {
-  RelocIterator iter(this, p, p + 1);
-  while (iter.next())
-    if (iter.type() == relocInfo::oop_type) {
-      return iter.oop_reloc()->oop_value();
-    }
-  return NULL;
-}
-
-
 inline bool includes(void* p, void* from, void* to) {
   return from <= p && p < to;
 }
--- a/hotspot/src/share/vm/code/nmethod.hpp	Thu Jan 29 10:26:02 2015 -0800
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Thu Jan 29 19:16:47 2015 +0100
@@ -730,11 +730,6 @@
   int  compile_id() const                         { return _compile_id; }
   const char* compile_kind() const;
 
-  // For debugging
-  // CompiledIC*    IC_at(char* p) const;
-  // PrimitiveIC*   primitiveIC_at(char* p) const;
-  oop embeddedOop_at(address p);
-
   // tells if any of this method's dependencies have been invalidated
   // (this is expensive!)
   static void check_all_dependencies(DepChange& changes);
--- a/hotspot/src/share/vm/compiler/disassembler.cpp	Thu Jan 29 10:26:02 2015 -0800
+++ b/hotspot/src/share/vm/compiler/disassembler.cpp	Thu Jan 29 19:16:47 2015 +0100
@@ -345,21 +345,6 @@
       if (WizardMode) st->print(" " INTPTR_FORMAT, (intptr_t)adr);
       return;
     }
-
-    oop obj;
-    if (_nm != NULL
-        && (obj = _nm->embeddedOop_at(cur_insn())) != NULL
-        && (address) obj == adr
-        && Universe::heap()->is_in(obj)
-        && Universe::heap()->is_in(obj->klass())) {
-      julong c = st->count();
-      obj->print_value_on(st);
-      if (st->count() == c) {
-        // No output.  (Can happen in product builds.)
-        st->print("(a %s)", obj->klass()->external_name());
-      }
-      return;
-    }
   }
 
   // Fall through to a simple (hexadecimal) numeral.