< prev index next >

src/share/vm/utilities/debug.cpp

Print this page
rev 11777 : [mq]: gcinterface.patch


 527 }
 528 
 529 
 530 extern "C" void universe() {
 531   Command c("universe");
 532   Universe::print_on(tty);
 533 }
 534 
 535 
 536 extern "C" void verify() {
 537   // try to run a verify on the entire system
 538   // note: this may not be safe if we're not at a safepoint; for debugging,
 539   // this manipulates the safepoint settings to avoid assertion failures
 540   Command c("universe verify");
 541   bool safe = SafepointSynchronize::is_at_safepoint();
 542   if (!safe) {
 543     tty->print_cr("warning: not at safepoint -- verify may fail");
 544     SafepointSynchronize::set_is_at_safepoint();
 545   }
 546   // Ensure Eden top is correct before verification
 547   Universe::heap()->prepare_for_verify();
 548   Universe::verify();
 549   if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
 550 }
 551 
 552 
 553 extern "C" void pp(void* p) {
 554   Command c("pp");
 555   FlagSetting fl(PrintVMMessages, true);
 556   FlagSetting f2(DisplayVMOutput, true);
 557   if (Universe::heap()->is_in(p)) {
 558     oop obj = oop(p);
 559     obj->print();
 560   } else {
 561     tty->print(PTR_FORMAT, p2i(p));
 562   }
 563 }
 564 
 565 
 566 // pv: print vm-printable object
 567 extern "C" void pa(intptr_t p)   { ((AllocatedObj*) p)->print(); }
 568 extern "C" void findpc(intptr_t x);
 569 
 570 #endif // !PRODUCT
 571 
 572 extern "C" void ps() { // print stack
 573   if (Thread::current_or_null() == NULL) return;
 574   Command c("ps");
 575 
 576 
 577   // Prints the stack of the current Java thread




 527 }
 528 
 529 
 530 extern "C" void universe() {
 531   Command c("universe");
 532   Universe::print_on(tty);
 533 }
 534 
 535 
 536 extern "C" void verify() {
 537   // try to run a verify on the entire system
 538   // note: this may not be safe if we're not at a safepoint; for debugging,
 539   // this manipulates the safepoint settings to avoid assertion failures
 540   Command c("universe verify");
 541   bool safe = SafepointSynchronize::is_at_safepoint();
 542   if (!safe) {
 543     tty->print_cr("warning: not at safepoint -- verify may fail");
 544     SafepointSynchronize::set_is_at_safepoint();
 545   }
 546   // Ensure Eden top is correct before verification
 547   GC::gc()->heap()->prepare_for_verify();
 548   Universe::verify();
 549   if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
 550 }
 551 
 552 
 553 extern "C" void pp(void* p) {
 554   Command c("pp");
 555   FlagSetting fl(PrintVMMessages, true);
 556   FlagSetting f2(DisplayVMOutput, true);
 557   if (GC::gc()->heap()->is_in(p)) {
 558     oop obj = oop(p);
 559     obj->print();
 560   } else {
 561     tty->print(PTR_FORMAT, p2i(p));
 562   }
 563 }
 564 
 565 
 566 // pv: print vm-printable object
 567 extern "C" void pa(intptr_t p)   { ((AllocatedObj*) p)->print(); }
 568 extern "C" void findpc(intptr_t x);
 569 
 570 #endif // !PRODUCT
 571 
 572 extern "C" void ps() { // print stack
 573   if (Thread::current_or_null() == NULL) return;
 574   Command c("ps");
 575 
 576 
 577   // Prints the stack of the current Java thread


< prev index next >