equal
deleted
inserted
replaced
197 } |
197 } |
198 } |
198 } |
199 return class_was_unloaded; |
199 return class_was_unloaded; |
200 } |
200 } |
201 |
201 |
|
202 void Dictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) { |
|
203 // Skip the strong roots probe marking if the closures are the same. |
|
204 if (strong == weak) { |
|
205 oops_do(strong); |
|
206 return; |
|
207 } |
|
208 |
|
209 for (int index = 0; index < table_size(); index++) { |
|
210 for (DictionaryEntry *probe = bucket(index); |
|
211 probe != NULL; |
|
212 probe = probe->next()) { |
|
213 Klass* e = probe->klass(); |
|
214 ClassLoaderData* loader_data = probe->loader_data(); |
|
215 if (is_strongly_reachable(loader_data, e)) { |
|
216 probe->set_strongly_reachable(); |
|
217 } |
|
218 } |
|
219 } |
|
220 _pd_cache_table->roots_oops_do(strong, weak); |
|
221 } |
202 |
222 |
203 void Dictionary::always_strong_oops_do(OopClosure* blk) { |
223 void Dictionary::always_strong_oops_do(OopClosure* blk) { |
204 // Follow all system classes and temporary placeholders in dictionary; only |
224 // Follow all system classes and temporary placeholders in dictionary; only |
205 // protection domain oops contain references into the heap. In a first |
225 // protection domain oops contain references into the heap. In a first |
206 // pass over the system dictionary determine which need to be treated as |
226 // pass over the system dictionary determine which need to be treated as |
488 probe->oops_do(f); |
508 probe->oops_do(f); |
489 } |
509 } |
490 } |
510 } |
491 } |
511 } |
492 |
512 |
|
513 void ProtectionDomainCacheTable::roots_oops_do(OopClosure* strong, OopClosure* weak) { |
|
514 for (int index = 0; index < table_size(); index++) { |
|
515 for (ProtectionDomainCacheEntry* probe = bucket(index); |
|
516 probe != NULL; |
|
517 probe = probe->next()) { |
|
518 if (probe->is_strongly_reachable()) { |
|
519 probe->reset_strongly_reachable(); |
|
520 probe->oops_do(strong); |
|
521 } else { |
|
522 if (weak != NULL) { |
|
523 probe->oops_do(weak); |
|
524 } |
|
525 } |
|
526 } |
|
527 } |
|
528 } |
|
529 |
493 uint ProtectionDomainCacheTable::bucket_size() { |
530 uint ProtectionDomainCacheTable::bucket_size() { |
494 return sizeof(ProtectionDomainCacheEntry); |
531 return sizeof(ProtectionDomainCacheEntry); |
495 } |
532 } |
496 |
533 |
497 #ifndef PRODUCT |
534 #ifndef PRODUCT |