< prev index next >

src/share/vm/classfile/dictionary.cpp

Print this page


 268       }
 269     }
 270   }
 271 }
 272 
 273 //   All classes, and their class loaders
 274 // Don't iterate over placeholders
 275 void Dictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
 276   for (int index = 0; index < table_size(); index++) {
 277     for (DictionaryEntry* probe = bucket(index);
 278                           probe != NULL;
 279                           probe = probe->next()) {
 280       Klass* k = probe->klass();
 281       f(k, probe->loader_data());
 282     }
 283   }
 284 }
 285 
 286 // Used to scan and relocate the classes during CDS archive dump.
 287 void Dictionary::classes_do(MetaspaceClosure* it) {

 288   for (int index = 0; index < table_size(); index++) {
 289     for (DictionaryEntry* probe = bucket(index);
 290                           probe != NULL;
 291                           probe = probe->next()) {
 292       it->push(probe->klass_addr());
 293       if (DumpSharedSpaces) {
 294         ((SharedDictionaryEntry*)probe)->metaspace_pointers_do(it);
 295       }
 296     }
 297   }
 298 }
 299 
 300 
 301 void Dictionary::oops_do(OopClosure* f) {
 302   // Only the protection domain oops contain references into the heap. Iterate
 303   // over all of them.
 304   _pd_cache_table->oops_do(f);
 305 }
 306 
 307 void Dictionary::unlink(BoolObjectClosure* is_alive) {
 308   // Only the protection domain cache table may contain references to the heap
 309   // that need to be unlinked.
 310   _pd_cache_table->unlink(is_alive);
 311 }
 312 
 313 InstanceKlass* Dictionary::try_get_next_class() {
 314   while (true) {
 315     if (_current_class_entry != NULL) {




 268       }
 269     }
 270   }
 271 }
 272 
 273 //   All classes, and their class loaders
 274 // Don't iterate over placeholders
 275 void Dictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
 276   for (int index = 0; index < table_size(); index++) {
 277     for (DictionaryEntry* probe = bucket(index);
 278                           probe != NULL;
 279                           probe = probe->next()) {
 280       Klass* k = probe->klass();
 281       f(k, probe->loader_data());
 282     }
 283   }
 284 }
 285 
 286 // Used to scan and relocate the classes during CDS archive dump.
 287 void Dictionary::classes_do(MetaspaceClosure* it) {
 288   assert(DumpSharedSpaces, "dump-time only");
 289   for (int index = 0; index < table_size(); index++) {
 290     for (DictionaryEntry* probe = bucket(index);
 291                           probe != NULL;
 292                           probe = probe->next()) {
 293       it->push(probe->klass_addr());

 294       ((SharedDictionaryEntry*)probe)->metaspace_pointers_do(it);

 295     }
 296   }
 297 }
 298 
 299 
 300 void Dictionary::oops_do(OopClosure* f) {
 301   // Only the protection domain oops contain references into the heap. Iterate
 302   // over all of them.
 303   _pd_cache_table->oops_do(f);
 304 }
 305 
 306 void Dictionary::unlink(BoolObjectClosure* is_alive) {
 307   // Only the protection domain cache table may contain references to the heap
 308   // that need to be unlinked.
 309   _pd_cache_table->unlink(is_alive);
 310 }
 311 
 312 InstanceKlass* Dictionary::try_get_next_class() {
 313   while (true) {
 314     if (_current_class_entry != NULL) {


< prev index next >