< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page




 575 }
 576 
 577 void SymbolPropertyTable::methods_do(void f(Method*)) {
 578   for (int index = 0; index < table_size(); index++) {
 579     for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
 580       Method* prop = p->method();
 581       if (prop != NULL) {
 582         f((Method*)prop);
 583       }
 584     }
 585   }
 586 }
 587 
 588 
 589 // ----------------------------------------------------------------------------
 590 
 591 void Dictionary::print_on(outputStream* st) const {
 592   ResourceMark rm;
 593 
 594   assert(loader_data() != NULL, "loader data should not be null");
 595   st->print_cr("Java dictionary (table_size=%d, classes=%d)",
 596                table_size(), number_of_entries());
 597   st->print_cr("^ indicates that initiating loader is different from defining loader");
 598 
 599   for (int index = 0; index < table_size(); index++) {
 600     for (DictionaryEntry* probe = bucket(index);
 601                           probe != NULL;
 602                           probe = probe->next()) {
 603       Klass* e = probe->instance_klass();
 604       bool is_defining_class =
 605          (loader_data() == e->class_loader_data());
 606       st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
 607       ClassLoaderData* cld = e->class_loader_data();
 608       if (cld == NULL) {
 609         // Shared class not restored yet in shared dictionary
 610         st->print(", loader data <shared, not restored>");
 611       } else if (!loader_data()->is_the_null_class_loader_data()) {
 612         // Class loader output for the dictionary for the null class loader data is
 613         // redundant and obvious.
 614         st->print(", ");
 615         cld->print_value_on(st);
 616       }




 575 }
 576 
 577 void SymbolPropertyTable::methods_do(void f(Method*)) {
 578   for (int index = 0; index < table_size(); index++) {
 579     for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
 580       Method* prop = p->method();
 581       if (prop != NULL) {
 582         f((Method*)prop);
 583       }
 584     }
 585   }
 586 }
 587 
 588 
 589 // ----------------------------------------------------------------------------
 590 
 591 void Dictionary::print_on(outputStream* st) const {
 592   ResourceMark rm;
 593 
 594   assert(loader_data() != NULL, "loader data should not be null");
 595   st->print_cr("Java dictionary (table_size=%d, classes=%d, resizable=%s)",
 596                table_size(), number_of_entries(), BOOL_TO_STR(_resizable));
 597   st->print_cr("^ indicates that initiating loader is different from defining loader");
 598 
 599   for (int index = 0; index < table_size(); index++) {
 600     for (DictionaryEntry* probe = bucket(index);
 601                           probe != NULL;
 602                           probe = probe->next()) {
 603       Klass* e = probe->instance_klass();
 604       bool is_defining_class =
 605          (loader_data() == e->class_loader_data());
 606       st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
 607       ClassLoaderData* cld = e->class_loader_data();
 608       if (cld == NULL) {
 609         // Shared class not restored yet in shared dictionary
 610         st->print(", loader data <shared, not restored>");
 611       } else if (!loader_data()->is_the_null_class_loader_data()) {
 612         // Class loader output for the dictionary for the null class loader data is
 613         // redundant and obvious.
 614         st->print(", ");
 615         cld->print_value_on(st);
 616       }


< prev index next >