Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
          +++ new/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18   18   *
  19   19   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20   20   * or visit www.oracle.com if you need additional information or have any
  21   21   * questions.
  22   22   *
  23   23   */
  24   24  
  25   25  #include "precompiled.hpp"
  26   26  #include "classfile/symbolTable.hpp"
       27 +#include "code/codeCache.hpp"
  27   28  #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
  28   29  #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
  29   30  #include "gc_implementation/parallelScavenge/generationSizer.hpp"
  30   31  #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
  31   32  #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
  32   33  #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
  33   34  #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
  34   35  #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
  35   36  #include "gc_implementation/parallelScavenge/psTasks.hpp"
  36   37  #include "gc_implementation/shared/isGCActiveMark.hpp"
↓ open down ↓ 56 lines elided ↑ open up ↑
  93   94      assert(_promotion_manager != NULL, "Sanity");
  94   95    }
  95   96  
  96   97    template <class T> void do_oop_work(T* p) {
  97   98      assert (!oopDesc::is_null(*p), "expected non-null ref");
  98   99      assert ((oopDesc::load_decode_heap_oop_not_null(p))->is_oop(),
  99  100              "expected an oop while scanning weak refs");
 100  101  
 101  102      // Weak refs may be visited more than once.
 102  103      if (PSScavenge::should_scavenge(p, _to_space)) {
 103      -      PSScavenge::copy_and_push_safe_barrier(_promotion_manager, p);
      104 +      PSScavenge::copy_and_push_safe_barrier<T, /*promote_immediately=*/false>(_promotion_manager, p);
 104  105      }
 105  106    }
 106  107    virtual void do_oop(oop* p)       { PSKeepAliveClosure::do_oop_work(p); }
 107  108    virtual void do_oop(narrowOop* p) { PSKeepAliveClosure::do_oop_work(p); }
 108  109  };
 109  110  
 110  111  class PSEvacuateFollowersClosure: public VoidClosure {
 111  112   private:
 112  113    PSPromotionManager* _promotion_manager;
 113  114   public:
↓ open down ↓ 481 lines elided ↑ open up ↑
 595  596  
 596  597        heap->resize_all_tlabs();
 597  598  
 598  599        assert(young_gen->to_space()->is_empty(), "to space should be empty now");
 599  600      }
 600  601  
 601  602      COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
 602  603  
 603  604      NOT_PRODUCT(reference_processor()->verify_no_references_recorded());
 604  605  
      606 +    CodeCache::prune_scavenge_root_nmethods();
      607 +
 605  608      // Re-verify object start arrays
 606  609      if (VerifyObjectStartArray &&
 607  610          VerifyAfterGC) {
 608  611        old_gen->verify_object_start_array();
 609  612        perm_gen->verify_object_start_array();
 610  613      }
 611  614  
 612  615      // Verify all old -> young cards are now precise
 613  616      if (VerifyRememberedSets) {
 614  617        // Precise verification will give false positives. Until this is fixed,
↓ open down ↓ 219 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX