src/share/vm/code/nmethod.cpp

changeset 9327
f96fcd9e1e1b
parent 9291
a2c8195708cc
child 9355
792ccf73293a
equal deleted inserted replaced
9324:efdbe9b904ad 9327:f96fcd9e1e1b
2321 #ifndef PRODUCT 2321 #ifndef PRODUCT
2322 nmethod* _print_nm; 2322 nmethod* _print_nm;
2323 void maybe_print(oop* p) { 2323 void maybe_print(oop* p) {
2324 if (_print_nm == NULL) return; 2324 if (_print_nm == NULL) return;
2325 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root"); 2325 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root");
2326 tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")", 2326 tty->print_cr("" PTR_FORMAT "[offset=%d] detected scavengable oop " PTR_FORMAT " (found at " PTR_FORMAT ")",
2327 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm), 2327 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm),
2328 (void *)(*p), (intptr_t)p); 2328 (void *)(*p), (intptr_t)p);
2329 (*p)->print(); 2329 (*p)->print();
2330 } 2330 }
2331 #endif //PRODUCT 2331 #endif //PRODUCT
2702 if ((*p) == NULL || (*p)->is_oop()) return; 2702 if ((*p) == NULL || (*p)->is_oop()) return;
2703 if (_ok) { 2703 if (_ok) {
2704 _nm->print_nmethod(true); 2704 _nm->print_nmethod(true);
2705 _ok = false; 2705 _ok = false;
2706 } 2706 }
2707 tty->print_cr("*** non-oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 2707 tty->print_cr("*** non-oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)",
2708 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 2708 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
2709 } 2709 }
2710 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } 2710 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
2711 }; 2711 };
2712 2712
2826 if ((*p) == NULL || !(*p)->is_scavengable()) return; 2826 if ((*p) == NULL || !(*p)->is_scavengable()) return;
2827 if (_ok) { 2827 if (_ok) {
2828 _nm->print_nmethod(true); 2828 _nm->print_nmethod(true);
2829 _ok = false; 2829 _ok = false;
2830 } 2830 }
2831 tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 2831 tty->print_cr("*** scavengable oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)",
2832 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 2832 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
2833 (*p)->print(); 2833 (*p)->print();
2834 } 2834 }
2835 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } 2835 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
2836 }; 2836 };
2871 } 2871 }
2872 2872
2873 print_on(tty, NULL); 2873 print_on(tty, NULL);
2874 2874
2875 if (WizardMode) { 2875 if (WizardMode) {
2876 tty->print("((nmethod*) "INTPTR_FORMAT ") ", this); 2876 tty->print("((nmethod*) " INTPTR_FORMAT ") ", this);
2877 tty->print(" for method " INTPTR_FORMAT , (address)method()); 2877 tty->print(" for method " INTPTR_FORMAT , (address)method());
2878 tty->print(" { "); 2878 tty->print(" { ");
2879 if (is_in_use()) tty->print("in_use "); 2879 if (is_in_use()) tty->print("in_use ");
2880 if (is_not_entrant()) tty->print("not_entrant "); 2880 if (is_not_entrant()) tty->print("not_entrant ");
2881 if (is_zombie()) tty->print("zombie "); 2881 if (is_zombie()) tty->print("zombie ");

mercurial