Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/systemDictionary.cpp @ 20278:2c6ef90f030a
8049421: G1 Class Unloading after completing a concurrent mark cycle
Reviewed-by: tschatzl, ehelin, brutisso, coleenp, roland, iveresov
Contributed-by: stefan.karlsson@oracle.com, mikael.gerdin@oracle.com
author | stefank |
---|---|
date | Mon, 07 Jul 2014 10:12:40 +0200 |
parents | ce8f6bb717c9 |
children | c3990b8c710e |
comparison
equal
deleted
inserted
replaced
20277:882004b9e7e1 | 20278: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); |