< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page
rev 54084 : 8208061: runtime/LoadClass/TestResize.java fails with "Load factor too high" when running in CDS mode.
Summary: Allow resizing for all system dictionaries except for the shared dictionary at runtime.
Reviewed-by: iklam, gziemski


 554 }
 555 
 556 void SymbolPropertyTable::methods_do(void f(Method*)) {
 557   for (int index = 0; index < table_size(); index++) {
 558     for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
 559       Method* prop = p->method();
 560       if (prop != NULL) {
 561         f((Method*)prop);
 562       }
 563     }
 564   }
 565 }
 566 
 567 
 568 // ----------------------------------------------------------------------------
 569 
 570 void Dictionary::print_on(outputStream* st) const {
 571   ResourceMark rm;
 572 
 573   assert(loader_data() != NULL, "loader data should not be null");
 574   st->print_cr("Java dictionary (table_size=%d, classes=%d)",
 575                table_size(), number_of_entries());
 576   st->print_cr("^ indicates that initiating loader is different from defining loader");
 577 
 578   for (int index = 0; index < table_size(); index++) {
 579     for (DictionaryEntry* probe = bucket(index);
 580                           probe != NULL;
 581                           probe = probe->next()) {
 582       Klass* e = probe->instance_klass();
 583       bool is_defining_class =
 584          (loader_data() == e->class_loader_data());
 585       st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
 586       ClassLoaderData* cld = e->class_loader_data();
 587       if (cld == NULL) {
 588         // Shared class not restored yet in shared dictionary
 589         st->print(", loader data <shared, not restored>");
 590       } else if (!loader_data()->is_the_null_class_loader_data()) {
 591         // Class loader output for the dictionary for the null class loader data is
 592         // redundant and obvious.
 593         st->print(", ");
 594         cld->print_value_on(st);
 595       }




 554 }
 555 
 556 void SymbolPropertyTable::methods_do(void f(Method*)) {
 557   for (int index = 0; index < table_size(); index++) {
 558     for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
 559       Method* prop = p->method();
 560       if (prop != NULL) {
 561         f((Method*)prop);
 562       }
 563     }
 564   }
 565 }
 566 
 567 
 568 // ----------------------------------------------------------------------------
 569 
 570 void Dictionary::print_on(outputStream* st) const {
 571   ResourceMark rm;
 572 
 573   assert(loader_data() != NULL, "loader data should not be null");
 574   st->print_cr("Java dictionary (table_size=%d, classes=%d, resizable=%s)",
 575                table_size(), number_of_entries(), BOOL_TO_STR(_resizable));
 576   st->print_cr("^ indicates that initiating loader is different from defining loader");
 577 
 578   for (int index = 0; index < table_size(); index++) {
 579     for (DictionaryEntry* probe = bucket(index);
 580                           probe != NULL;
 581                           probe = probe->next()) {
 582       Klass* e = probe->instance_klass();
 583       bool is_defining_class =
 584          (loader_data() == e->class_loader_data());
 585       st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
 586       ClassLoaderData* cld = e->class_loader_data();
 587       if (cld == NULL) {
 588         // Shared class not restored yet in shared dictionary
 589         st->print(", loader data <shared, not restored>");
 590       } else if (!loader_data()->is_the_null_class_loader_data()) {
 591         // Class loader output for the dictionary for the null class loader data is
 592         // redundant and obvious.
 593         st->print(", ");
 594         cld->print_value_on(st);
 595       }


< prev index next >