2807 address end = start + (java_lang_Class::static_oop_field_count(mirror) * heapOopSize);
2808 assert(end >= start, "sanity check");
2809
2810 if (obj_p >= start && obj_p < end) {
2811 return true;
2812 } else {
2813 return false;
2814 }
2815 }
2816 #endif // #ifdef ASSERT
2817
2818 // a class references its super class, interfaces, class loader, ...
2819 // and finally its static fields
2820 inline bool VM_HeapWalkOperation::iterate_over_class(oop java_class) {
2821 int i;
2822 Klass* klass = java_lang_Class::as_Klass(java_class);
2823
2824 if (klass->oop_is_instance()) {
2825 InstanceKlass* ik = InstanceKlass::cast(klass);
2826
2827 // ignore the class if it's has been initialized yet
2828 if (!ik->is_linked()) {
2829 return true;
2830 }
2831
2832 // get the java mirror
2833 oop mirror = klass->java_mirror();
2834
2835 // super (only if something more interesting than java.lang.Object)
2836 Klass* java_super = ik->java_super();
2837 if (java_super != NULL && java_super != SystemDictionary::Object_klass()) {
2838 oop super = java_super->java_mirror();
2839 if (!CallbackInvoker::report_superclass_reference(mirror, super)) {
2840 return false;
2841 }
2842 }
2843
2844 // class loader
2845 oop cl = ik->class_loader();
2846 if (cl != NULL) {
2847 if (!CallbackInvoker::report_class_loader_reference(mirror, cl)) {
|
2807 address end = start + (java_lang_Class::static_oop_field_count(mirror) * heapOopSize);
2808 assert(end >= start, "sanity check");
2809
2810 if (obj_p >= start && obj_p < end) {
2811 return true;
2812 } else {
2813 return false;
2814 }
2815 }
2816 #endif // #ifdef ASSERT
2817
2818 // a class references its super class, interfaces, class loader, ...
2819 // and finally its static fields
2820 inline bool VM_HeapWalkOperation::iterate_over_class(oop java_class) {
2821 int i;
2822 Klass* klass = java_lang_Class::as_Klass(java_class);
2823
2824 if (klass->oop_is_instance()) {
2825 InstanceKlass* ik = InstanceKlass::cast(klass);
2826
2827 // Ignore the class if it hasn't been initialized yet
2828 if (!ik->is_linked()) {
2829 return true;
2830 }
2831
2832 // get the java mirror
2833 oop mirror = klass->java_mirror();
2834
2835 // super (only if something more interesting than java.lang.Object)
2836 Klass* java_super = ik->java_super();
2837 if (java_super != NULL && java_super != SystemDictionary::Object_klass()) {
2838 oop super = java_super->java_mirror();
2839 if (!CallbackInvoker::report_superclass_reference(mirror, super)) {
2840 return false;
2841 }
2842 }
2843
2844 // class loader
2845 oop cl = ik->class_loader();
2846 if (cl != NULL) {
2847 if (!CallbackInvoker::report_class_loader_reference(mirror, cl)) {
|