Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/debug.cpp @ 432:275a3b7ff0d6
6770949: minor tweaks before 6655638
Summary: minor cleanups & tuning of array.hpp, debug.cpp, growableArray.hpp, hashtable.cpp
Reviewed-by: kvn
author | jrose |
---|---|
date | Wed, 12 Nov 2008 23:26:45 -0800 |
parents | 1ee8caae33af |
children | 148e5441d916 |
comparison
equal
deleted
inserted
replaced
431:a45484ea312d | 432:275a3b7ff0d6 |
---|---|
565 tty->print_cr(INTPTR_FORMAT " is pointing to an (unnamed) stub routine", addr); | 565 tty->print_cr(INTPTR_FORMAT " is pointing to an (unnamed) stub routine", addr); |
566 return; | 566 return; |
567 } | 567 } |
568 // the InlineCacheBuffer is using stubs generated into a buffer blob | 568 // the InlineCacheBuffer is using stubs generated into a buffer blob |
569 if (InlineCacheBuffer::contains(addr)) { | 569 if (InlineCacheBuffer::contains(addr)) { |
570 tty->print_cr(INTPTR_FORMAT "is pointing into InlineCacheBuffer", addr); | 570 tty->print_cr(INTPTR_FORMAT " is pointing into InlineCacheBuffer", addr); |
571 return; | 571 return; |
572 } | 572 } |
573 VtableStub* v = VtableStubs::stub_containing(addr); | 573 VtableStub* v = VtableStubs::stub_containing(addr); |
574 if (v != NULL) { | 574 if (v != NULL) { |
575 v->print(); | 575 v->print(); |
593 } | 593 } |
594 b->print(); | 594 b->print(); |
595 return; | 595 return; |
596 } | 596 } |
597 | 597 |
598 if (Universe::heap()->is_in_reserved(addr)) { | 598 if (Universe::heap()->is_in(addr)) { |
599 HeapWord* p = Universe::heap()->block_start(addr); | 599 HeapWord* p = Universe::heap()->block_start(addr); |
600 bool print = false; | 600 bool print = false; |
601 // If we couldn't find it it just may mean that heap wasn't parseable | 601 // If we couldn't find it it just may mean that heap wasn't parseable |
602 // See if we were just given an oop directly | 602 // See if we were just given an oop directly |
603 if (p != NULL && Universe::heap()->block_is_obj(p)) { | 603 if (p != NULL && Universe::heap()->block_is_obj(p)) { |
619 mh->print_codes(); | 619 mh->print_codes(); |
620 } | 620 } |
621 } | 621 } |
622 return; | 622 return; |
623 } | 623 } |
624 } | 624 } else if (Universe::heap()->is_in_reserved(addr)) { |
625 tty->print_cr(INTPTR_FORMAT " is an unallocated location in the heap", addr); | |
626 return; | |
627 } | |
628 | |
625 if (JNIHandles::is_global_handle((jobject) addr)) { | 629 if (JNIHandles::is_global_handle((jobject) addr)) { |
626 tty->print_cr(INTPTR_FORMAT "is a global jni handle", addr); | 630 tty->print_cr(INTPTR_FORMAT " is a global jni handle", addr); |
627 return; | 631 return; |
628 } | 632 } |
629 if (JNIHandles::is_weak_global_handle((jobject) addr)) { | 633 if (JNIHandles::is_weak_global_handle((jobject) addr)) { |
630 tty->print_cr(INTPTR_FORMAT "is a weak global jni handle", addr); | 634 tty->print_cr(INTPTR_FORMAT " is a weak global jni handle", addr); |
631 return; | 635 return; |
632 } | 636 } |
633 if (JNIHandleBlock::any_contains((jobject) addr)) { | 637 if (JNIHandleBlock::any_contains((jobject) addr)) { |
634 tty->print_cr(INTPTR_FORMAT "is a local jni handle", addr); | 638 tty->print_cr(INTPTR_FORMAT " is a local jni handle", addr); |
635 return; | 639 return; |
636 } | 640 } |
637 | 641 |
638 for(JavaThread *thread = Threads::first(); thread; thread = thread->next()) { | 642 for(JavaThread *thread = Threads::first(); thread; thread = thread->next()) { |
639 // Check for priviledge stack | 643 // Check for privilege stack |
640 if (thread->privileged_stack_top() != NULL && thread->privileged_stack_top()->contains(addr)) { | 644 if (thread->privileged_stack_top() != NULL && thread->privileged_stack_top()->contains(addr)) { |
641 tty->print_cr(INTPTR_FORMAT "is pointing into the priviledge stack for thread: " INTPTR_FORMAT, addr, thread); | 645 tty->print_cr(INTPTR_FORMAT " is pointing into the privilege stack for thread: " INTPTR_FORMAT, addr, thread); |
642 return; | 646 return; |
643 } | 647 } |
644 // If the addr is a java thread print information about that. | 648 // If the addr is a java thread print information about that. |
645 if (addr == (address)thread) { | 649 if (addr == (address)thread) { |
646 thread->print(); | 650 thread->print(); |
657 tty->print_cr(INTPTR_FORMAT ": probably in C++ code; check debugger", addr); | 661 tty->print_cr(INTPTR_FORMAT ": probably in C++ code; check debugger", addr); |
658 Disassembler::decode(same_page(addr-40,addr),same_page(addr+40,addr)); | 662 Disassembler::decode(same_page(addr-40,addr),same_page(addr+40,addr)); |
659 return; | 663 return; |
660 } | 664 } |
661 | 665 |
662 tty->print_cr(INTPTR_FORMAT "is pointing to unknown location", addr); | 666 tty->print_cr(INTPTR_FORMAT " is pointing to unknown location", addr); |
663 } | 667 } |
664 | 668 |
665 | 669 |
666 class LookForRefInGenClosure : public OopsInGenClosure { | 670 class LookForRefInGenClosure : public OopsInGenClosure { |
667 public: | 671 public: |