< prev index next >

src/share/vm/code/relocInfo.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 923     }
 924   case relocInfo::static_stub_type:
 925     {
 926       static_stub_Relocation* r = (static_stub_Relocation*) reloc();
 927       tty->print(" | [static_call=" INTPTR_FORMAT "]", p2i(r->static_call()));
 928       break;
 929     }
 930   case relocInfo::trampoline_stub_type:
 931     {
 932       trampoline_stub_Relocation* r = (trampoline_stub_Relocation*) reloc();
 933       tty->print(" | [trampoline owner=" INTPTR_FORMAT "]", p2i(r->owner()));
 934       break;
 935     }
 936   case relocInfo::opt_virtual_call_type:
 937     {
 938       opt_virtual_call_Relocation* r = (opt_virtual_call_Relocation*) reloc();
 939       tty->print(" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT "]",
 940                  p2i(r->destination()), p2i(r->method_value()));
 941       break;
 942     }


 943   }
 944   tty->cr();
 945 }
 946 
 947 
 948 void RelocIterator::print() {
 949   RelocIterator save_this = (*this);
 950   relocInfo* scan = _current;
 951   if (!has_current())  scan += 1;  // nothing to scan here!
 952 
 953   bool skip_next = has_current();
 954   bool got_next;
 955   while (true) {
 956     got_next = (skip_next || next());
 957     skip_next = false;
 958 
 959     tty->print("         @" INTPTR_FORMAT ": ", p2i(scan));
 960     relocInfo* newscan = _current+1;
 961     if (!has_current())  newscan -= 1;  // nothing to scan here!
 962     while (scan < newscan) {


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 923     }
 924   case relocInfo::static_stub_type:
 925     {
 926       static_stub_Relocation* r = (static_stub_Relocation*) reloc();
 927       tty->print(" | [static_call=" INTPTR_FORMAT "]", p2i(r->static_call()));
 928       break;
 929     }
 930   case relocInfo::trampoline_stub_type:
 931     {
 932       trampoline_stub_Relocation* r = (trampoline_stub_Relocation*) reloc();
 933       tty->print(" | [trampoline owner=" INTPTR_FORMAT "]", p2i(r->owner()));
 934       break;
 935     }
 936   case relocInfo::opt_virtual_call_type:
 937     {
 938       opt_virtual_call_Relocation* r = (opt_virtual_call_Relocation*) reloc();
 939       tty->print(" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT "]",
 940                  p2i(r->destination()), p2i(r->method_value()));
 941       break;
 942     }
 943   default:
 944     break;
 945   }
 946   tty->cr();
 947 }
 948 
 949 
 950 void RelocIterator::print() {
 951   RelocIterator save_this = (*this);
 952   relocInfo* scan = _current;
 953   if (!has_current())  scan += 1;  // nothing to scan here!
 954 
 955   bool skip_next = has_current();
 956   bool got_next;
 957   while (true) {
 958     got_next = (skip_next || next());
 959     skip_next = false;
 960 
 961     tty->print("         @" INTPTR_FORMAT ": ", p2i(scan));
 962     relocInfo* newscan = _current+1;
 963     if (!has_current())  newscan -= 1;  // nothing to scan here!
 964     while (scan < newscan) {


< prev index next >