comparison src/share/vm/code/nmethod.cpp @ 12316:190899198332

7195622: CheckUnhandledOops has limited usefulness now Summary: Enable CHECK_UNHANDLED_OOPS in fastdebug builds across all supported platforms. Reviewed-by: coleenp, hseigel, dholmes, stefank, twisti, ihse, rdurbin Contributed-by: lois.foltan@oracle.com
author hseigel
date Thu, 26 Sep 2013 10:25:02 -0400
parents 3bfb204913de
children 268e7a2178d7
comparison
equal deleted inserted replaced
12315:c1fbf21c7397 12316:190899198332
1963 void maybe_print(oop* p) { 1963 void maybe_print(oop* p) {
1964 if (_print_nm == NULL) return; 1964 if (_print_nm == NULL) return;
1965 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root"); 1965 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root");
1966 tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")", 1966 tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")",
1967 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm), 1967 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm),
1968 (intptr_t)(*p), (intptr_t)p); 1968 (void *)(*p), (intptr_t)p);
1969 (*p)->print(); 1969 (*p)->print();
1970 } 1970 }
1971 #endif //PRODUCT 1971 #endif //PRODUCT
1972 }; 1972 };
1973 1973
2343 if (_ok) { 2343 if (_ok) {
2344 _nm->print_nmethod(true); 2344 _nm->print_nmethod(true);
2345 _ok = false; 2345 _ok = false;
2346 } 2346 }
2347 tty->print_cr("*** non-oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 2347 tty->print_cr("*** non-oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
2348 (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 2348 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
2349 } 2349 }
2350 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } 2350 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
2351 }; 2351 };
2352 2352
2353 void nmethod::verify() { 2353 void nmethod::verify() {
2464 if (_ok) { 2464 if (_ok) {
2465 _nm->print_nmethod(true); 2465 _nm->print_nmethod(true);
2466 _ok = false; 2466 _ok = false;
2467 } 2467 }
2468 tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 2468 tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
2469 (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 2469 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
2470 (*p)->print(); 2470 (*p)->print();
2471 } 2471 }
2472 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } 2472 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
2473 }; 2473 };
2474 2474