< prev index next >

src/share/vm/utilities/debug.cpp

Print this page




 476     cb->print();
 477     Disassembler::decode(cb);
 478   }
 479 }
 480 
 481 
 482 extern "C" void printnm(intptr_t p) {
 483   char buffer[256];
 484   sprintf(buffer, "printnm: " INTPTR_FORMAT, p);
 485   Command c(buffer);
 486   CodeBlob* cb = CodeCache::find_blob((address) p);
 487   if (cb->is_nmethod()) {
 488     nmethod* nm = (nmethod*)cb;
 489     nm->print_nmethod(true);
 490   }
 491 }
 492 
 493 
 494 extern "C" void universe() {
 495   Command c("universe");
 496   Universe::print();
 497 }
 498 
 499 
 500 extern "C" void verify() {
 501   // try to run a verify on the entire system
 502   // note: this may not be safe if we're not at a safepoint; for debugging,
 503   // this manipulates the safepoint settings to avoid assertion failures
 504   Command c("universe verify");
 505   bool safe = SafepointSynchronize::is_at_safepoint();
 506   if (!safe) {
 507     tty->print_cr("warning: not at safepoint -- verify may fail");
 508     SafepointSynchronize::set_is_at_safepoint();
 509   }
 510   // Ensure Eden top is correct before verification
 511   Universe::heap()->prepare_for_verify();
 512   Universe::verify();
 513   if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
 514 }
 515 
 516 




 476     cb->print();
 477     Disassembler::decode(cb);
 478   }
 479 }
 480 
 481 
 482 extern "C" void printnm(intptr_t p) {
 483   char buffer[256];
 484   sprintf(buffer, "printnm: " INTPTR_FORMAT, p);
 485   Command c(buffer);
 486   CodeBlob* cb = CodeCache::find_blob((address) p);
 487   if (cb->is_nmethod()) {
 488     nmethod* nm = (nmethod*)cb;
 489     nm->print_nmethod(true);
 490   }
 491 }
 492 
 493 
 494 extern "C" void universe() {
 495   Command c("universe");
 496   Universe::print_on(tty);
 497 }
 498 
 499 
 500 extern "C" void verify() {
 501   // try to run a verify on the entire system
 502   // note: this may not be safe if we're not at a safepoint; for debugging,
 503   // this manipulates the safepoint settings to avoid assertion failures
 504   Command c("universe verify");
 505   bool safe = SafepointSynchronize::is_at_safepoint();
 506   if (!safe) {
 507     tty->print_cr("warning: not at safepoint -- verify may fail");
 508     SafepointSynchronize::set_is_at_safepoint();
 509   }
 510   // Ensure Eden top is correct before verification
 511   Universe::heap()->prepare_for_verify();
 512   Universe::verify();
 513   if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
 514 }
 515 
 516 


< prev index next >