Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/debug.cpp @ 342:37f87013dfd8
6711316: Open source the Garbage-First garbage collector
Summary: First mercurial integration of the code for the Garbage-First garbage collector.
Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author | ysr |
---|---|
date | Thu, 05 Jun 2008 15:57:56 -0700 |
parents | ba764ed4b6f2 |
children | 1ee8caae33af |
comparison
equal
deleted
inserted
replaced
189:0b27f3512f9e | 342:37f87013dfd8 |
---|---|
664 class LookForRefInGenClosure : public OopsInGenClosure { | 664 class LookForRefInGenClosure : public OopsInGenClosure { |
665 public: | 665 public: |
666 oop target; | 666 oop target; |
667 void do_oop(oop* o) { | 667 void do_oop(oop* o) { |
668 if (o != NULL && *o == target) { | 668 if (o != NULL && *o == target) { |
669 tty->print_cr("0x%08x", o); | 669 tty->print_cr(INTPTR_FORMAT, o); |
670 } | 670 } |
671 } | 671 } |
672 void do_oop(narrowOop* o) { ShouldNotReachHere(); } | 672 void do_oop(narrowOop* o) { ShouldNotReachHere(); } |
673 }; | 673 }; |
674 | 674 |
683 } | 683 } |
684 }; | 684 }; |
685 | 685 |
686 | 686 |
687 static void findref(intptr_t x) { | 687 static void findref(intptr_t x) { |
688 GenCollectedHeap *gch = GenCollectedHeap::heap(); | 688 CollectedHeap *ch = Universe::heap(); |
689 LookForRefInGenClosure lookFor; | 689 LookForRefInGenClosure lookFor; |
690 lookFor.target = (oop) x; | 690 lookFor.target = (oop) x; |
691 LookForRefInObjectClosure look_in_object((oop) x); | 691 LookForRefInObjectClosure look_in_object((oop) x); |
692 | 692 |
693 tty->print_cr("Searching heap:"); | 693 tty->print_cr("Searching heap:"); |
694 gch->object_iterate(&look_in_object); | 694 ch->object_iterate(&look_in_object); |
695 | 695 |
696 tty->print_cr("Searching strong roots:"); | 696 tty->print_cr("Searching strong roots:"); |
697 Universe::oops_do(&lookFor, false); | 697 Universe::oops_do(&lookFor, false); |
698 JNIHandles::oops_do(&lookFor); // Global (strong) JNI handles | 698 JNIHandles::oops_do(&lookFor); // Global (strong) JNI handles |
699 Threads::oops_do(&lookFor); | 699 Threads::oops_do(&lookFor); |