598 // not a method entry so not interesting by default
599 return false;
600 }
601
602 methodOop m = NULL;
603 if (is_vfinal()) {
604 // virtual and final so _f2 contains method ptr instead of vtable index
605 m = f2_as_vfinal_method();
606 } else if (is_f1_null()) {
607 // NULL _f1 means this is a virtual entry so also not interesting
608 return false;
609 } else {
610 oop f1 = _f1; // _f1 is volatile
611 if (!f1->is_method()) {
612 // _f1 can also contain a klassOop for an interface
613 return false;
614 }
615 m = f1_as_method();
616 }
617
618 assert(m != NULL && m->is_method(), "sanity check");
619 if (m == NULL || !m->is_method() || (k != NULL && m->method_holder() != k)) {
620 // robustness for above sanity checks or method is not in
621 // the interesting class
622 return false;
623 }
624
625 // the method is in the interesting class so the entry is interesting
626 return true;
627 }
628
629 void ConstantPoolCacheEntry::print(outputStream* st, int index) const {
630 // print separator
631 if (index == 0) st->print_cr(" -------------");
632 // print entry
633 st->print("%3d ("PTR_FORMAT") ", index, (intptr_t)this);
634 if (is_secondary_entry())
635 st->print_cr("[%5d|secondary]", main_entry_index());
636 else
637 st->print_cr("[%02x|%02x|%5d]", bytecode_2(), bytecode_1(), constant_pool_index());
638 st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)(oop)_f1);
|
598 // not a method entry so not interesting by default
599 return false;
600 }
601
602 methodOop m = NULL;
603 if (is_vfinal()) {
604 // virtual and final so _f2 contains method ptr instead of vtable index
605 m = f2_as_vfinal_method();
606 } else if (is_f1_null()) {
607 // NULL _f1 means this is a virtual entry so also not interesting
608 return false;
609 } else {
610 oop f1 = _f1; // _f1 is volatile
611 if (!f1->is_method()) {
612 // _f1 can also contain a klassOop for an interface
613 return false;
614 }
615 m = f1_as_method();
616 }
617
618 // Secondary entry can have vfinal flag and a NULL _f2, giving m==NULL here:
619 assert(is_secondary_entry() || (m != NULL && m->is_method()), "sanity check");
620
621 if (m == NULL || !m->is_method() || (k != NULL && m->method_holder() != k)) {
622 // robustness for above sanity checks or method is not in
623 // the interesting class
624 return false;
625 }
626
627 // the method is in the interesting class so the entry is interesting
628 return true;
629 }
630
631 void ConstantPoolCacheEntry::print(outputStream* st, int index) const {
632 // print separator
633 if (index == 0) st->print_cr(" -------------");
634 // print entry
635 st->print("%3d ("PTR_FORMAT") ", index, (intptr_t)this);
636 if (is_secondary_entry())
637 st->print_cr("[%5d|secondary]", main_entry_index());
638 else
639 st->print_cr("[%02x|%02x|%5d]", bytecode_2(), bytecode_1(), constant_pool_index());
640 st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)(oop)_f1);
|