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