< prev index next >

src/share/vm/utilities/debug.cpp

Print this page




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




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


< prev index next >