src/share/vm/classfile/systemDictionary.cpp

changeset 6992
2c6ef90f030a
parent 6911
ce8f6bb717c9
child 7064
c3990b8c710e
equal deleted inserted replaced
6991:882004b9e7e1 6992:2c6ef90f030a
1611 // 1611 //
1612 // The second phase removes (unloads) unreachable classes from the 1612 // The second phase removes (unloads) unreachable classes from the
1613 // system dictionary and follows the remaining classes' contents. 1613 // system dictionary and follows the remaining classes' contents.
1614 1614
1615 void SystemDictionary::always_strong_oops_do(OopClosure* blk) { 1615 void SystemDictionary::always_strong_oops_do(OopClosure* blk) {
1616 blk->do_oop(&_java_system_loader); 1616 roots_oops_do(blk, NULL);
1617 blk->do_oop(&_system_loader_lock_obj);
1618
1619 dictionary()->always_strong_oops_do(blk);
1620
1621 // Visit extra methods
1622 invoke_method_table()->oops_do(blk);
1623 } 1617 }
1624 1618
1625 void SystemDictionary::always_strong_classes_do(KlassClosure* closure) { 1619 void SystemDictionary::always_strong_classes_do(KlassClosure* closure) {
1626 // Follow all system classes and temporary placeholders in dictionary 1620 // Follow all system classes and temporary placeholders in dictionary
1627 dictionary()->always_strong_classes_do(closure); 1621 dictionary()->always_strong_classes_do(closure);
1682 #ifdef ASSERT 1676 #ifdef ASSERT
1683 VerifySDReachableAndLiveClosure cl(is_alive); 1677 VerifySDReachableAndLiveClosure cl(is_alive);
1684 dictionary()->oops_do(&cl); 1678 dictionary()->oops_do(&cl);
1685 #endif 1679 #endif
1686 return unloading_occurred; 1680 return unloading_occurred;
1681 }
1682
1683 void SystemDictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) {
1684 strong->do_oop(&_java_system_loader);
1685 strong->do_oop(&_system_loader_lock_obj);
1686
1687 // Adjust dictionary
1688 dictionary()->roots_oops_do(strong, weak);
1689
1690 // Visit extra methods
1691 invoke_method_table()->oops_do(strong);
1687 } 1692 }
1688 1693
1689 void SystemDictionary::oops_do(OopClosure* f) { 1694 void SystemDictionary::oops_do(OopClosure* f) {
1690 f->do_oop(&_java_system_loader); 1695 f->do_oop(&_java_system_loader);
1691 f->do_oop(&_system_loader_lock_obj); 1696 f->do_oop(&_system_loader_lock_obj);

mercurial