hotspot/src/share/vm/code/nmethod.cpp
changeset 46968 9119841280f4
parent 46701 f559541c0daa
child 47099 49f5fa3fc2ae
equal deleted inserted replaced
46953:39063b484ec2 46968:9119841280f4
  2088   bool     _ok;
  2088   bool     _ok;
  2089 public:
  2089 public:
  2090   VerifyOopsClosure(nmethod* nm) : _nm(nm), _ok(true) { }
  2090   VerifyOopsClosure(nmethod* nm) : _nm(nm), _ok(true) { }
  2091   bool ok() { return _ok; }
  2091   bool ok() { return _ok; }
  2092   virtual void do_oop(oop* p) {
  2092   virtual void do_oop(oop* p) {
  2093     if ((*p) == NULL || (*p)->is_oop())  return;
  2093     if (oopDesc::is_oop_or_null(*p)) return;
  2094     if (_ok) {
  2094     if (_ok) {
  2095       _nm->print_nmethod(true);
  2095       _nm->print_nmethod(true);
  2096       _ok = false;
  2096       _ok = false;
  2097     }
  2097     }
  2098     tty->print_cr("*** non-oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)",
  2098     tty->print_cr("*** non-oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)",
  2110     return;
  2110     return;
  2111 
  2111 
  2112   // Make sure all the entry points are correctly aligned for patching.
  2112   // Make sure all the entry points are correctly aligned for patching.
  2113   NativeJump::check_verified_entry_alignment(entry_point(), verified_entry_point());
  2113   NativeJump::check_verified_entry_alignment(entry_point(), verified_entry_point());
  2114 
  2114 
  2115   // assert(method()->is_oop(), "must be valid");
  2115   // assert(oopDesc::is_oop(method()), "must be valid");
  2116 
  2116 
  2117   ResourceMark rm;
  2117   ResourceMark rm;
  2118 
  2118 
  2119   if (!CodeCache::contains(this)) {
  2119   if (!CodeCache::contains(this)) {
  2120     fatal("nmethod at " INTPTR_FORMAT " not in zone", p2i(this));
  2120     fatal("nmethod at " INTPTR_FORMAT " not in zone", p2i(this));