< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page




 587 }
 588 
 589 
 590 // ----------------------------------------------------------------------------
 591 
 592 void Dictionary::print_on(outputStream* st) const {
 593   ResourceMark rm;
 594 
 595   assert(loader_data() != NULL, "loader data should not be null");
 596   st->print_cr("Java dictionary (table_size=%d, classes=%d)",
 597                table_size(), number_of_entries());
 598   st->print_cr("^ indicates that initiating loader is different from defining loader");
 599 
 600   for (int index = 0; index < table_size(); index++) {
 601     for (DictionaryEntry* probe = bucket(index);
 602                           probe != NULL;
 603                           probe = probe->next()) {
 604       Klass* e = probe->instance_klass();
 605       bool is_defining_class =
 606          (loader_data() == e->class_loader_data());
 607       st->print("%4d: %s%s, loader ", index, is_defining_class ? " " : "^", e->external_name());
 608       ClassLoaderData* loader_data = e->class_loader_data();
 609       if (loader_data == NULL) {
 610         // Shared class not restored yet in shared dictionary
 611         st->print("<shared, not restored>");
 612       } else {
 613         loader_data->print_value_on(st);



 614       }
 615       st->cr();
 616     }
 617   }
 618   tty->cr();
 619 }
 620 
 621 void DictionaryEntry::verify() {
 622   Klass* e = instance_klass();
 623   guarantee(e->is_instance_klass(),
 624                           "Verify of dictionary failed");
 625   e->verify();
 626   verify_protection_domain_set();
 627 }
 628 
 629 void Dictionary::verify() {
 630   guarantee(number_of_entries() >= 0, "Verify of dictionary failed");
 631 
 632   ClassLoaderData* cld = loader_data();
 633   // class loader must be present;  a null class loader is the


 587 }
 588 
 589 
 590 // ----------------------------------------------------------------------------
 591 
 592 void Dictionary::print_on(outputStream* st) const {
 593   ResourceMark rm;
 594 
 595   assert(loader_data() != NULL, "loader data should not be null");
 596   st->print_cr("Java dictionary (table_size=%d, classes=%d)",
 597                table_size(), number_of_entries());
 598   st->print_cr("^ indicates that initiating loader is different from defining loader");
 599 
 600   for (int index = 0; index < table_size(); index++) {
 601     for (DictionaryEntry* probe = bucket(index);
 602                           probe != NULL;
 603                           probe = probe->next()) {
 604       Klass* e = probe->instance_klass();
 605       bool is_defining_class =
 606          (loader_data() == e->class_loader_data());
 607       st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
 608       ClassLoaderData* cld = e->class_loader_data();
 609       if (cld == NULL) {
 610         // Shared class not restored yet in shared dictionary
 611         st->print(", loader data <shared, not restored>");
 612       } else if (!loader_data()->is_the_null_class_loader_data()) {
 613         // Class loader output for the dictionary for the null class loader data is
 614         // redundant and obvious.
 615         st->print(", ");
 616         cld->print_value_on(st);
 617       }
 618       st->cr();
 619     }
 620   }
 621   tty->cr();
 622 }
 623 
 624 void DictionaryEntry::verify() {
 625   Klass* e = instance_klass();
 626   guarantee(e->is_instance_klass(),
 627                           "Verify of dictionary failed");
 628   e->verify();
 629   verify_protection_domain_set();
 630 }
 631 
 632 void Dictionary::verify() {
 633   guarantee(number_of_entries() >= 0, "Verify of dictionary failed");
 634 
 635   ClassLoaderData* cld = loader_data();
 636   // class loader must be present;  a null class loader is the
< prev index next >