< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Print this page
*** 788,11 ***
  void GenCollectedHeap::full_process_roots(bool is_adjust_phase,
                                            ScanningOption so,
                                            bool only_strong_roots,
                                            OopClosure* root_closure,
                                            CLDClosure* cld_closure) {
!   MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
    CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
  
    process_roots(so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
  }
  
--- 788,11 ---
  void GenCollectedHeap::full_process_roots(bool is_adjust_phase,
                                            ScanningOption so,
                                            bool only_strong_roots,
                                            OopClosure* root_closure,
                                            CLDClosure* cld_closure) {
!   MarkingCodeBlobClosure mark_code_closure(root_closure, CodeBlobToOopClosure::FixRelocations, !is_adjust_phase);
    CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
  
    process_roots(so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
  }
  

*** 898,11 ***
                    false,               // is_tlab
                    OldGen);             // last_generation
    }
  }
  
! bool GenCollectedHeap::is_in_young(oop p) {
    bool result = cast_from_oop<HeapWord*>(p) < _old_gen->reserved().start();
    assert(result == _young_gen->is_in_reserved(p),
           "incorrect test - result=%d, p=" INTPTR_FORMAT, result, p2i((void*)p));
    return result;
  }
--- 898,11 ---
                    false,               // is_tlab
                    OldGen);             // last_generation
    }
  }
  
! bool GenCollectedHeap::is_in_young(oop p) const {
    bool result = cast_from_oop<HeapWord*>(p) < _old_gen->reserved().start();
    assert(result == _young_gen->is_in_reserved(p),
           "incorrect test - result=%d, p=" INTPTR_FORMAT, result, p2i((void*)p));
    return result;
  }

*** 1176,10 ***
--- 1176,14 ---
    ensure_parsability(true);   // retire TLABs
  
    // Walk generations
    GenGCPrologueClosure blk(full);
    generation_iterate(&blk, false);  // not old-to-young.
+ 
+   if (full) {
+     CodeCache::increment_marking_cycle();
+   }
  };
  
  class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure {
   private:
    bool _full;

*** 1195,10 ***
--- 1199,14 ---
    assert(DerivedPointerTable::is_empty(), "derived pointer present");
    size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr()));
    guarantee(!CompilerConfig::is_c2_or_jvmci_compiler_enabled() || actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps");
  #endif // COMPILER2_OR_JVMCI
  
+   if (full) {
+     CodeCache::increment_marking_cycle();
+   }
+ 
    resize_all_tlabs();
  
    GenGCEpilogueClosure blk(full);
    generation_iterate(&blk, false);  // not old-to-young.
  

*** 1237,15 ***
  
  oop GenCollectedHeap::handle_failed_promotion(Generation* old_gen,
                                                oop obj,
                                                size_t obj_size) {
    guarantee(old_gen == _old_gen, "We only get here with an old generation");
!   assert(obj_size == (size_t)obj->size(), "bad obj_size passed in");
    HeapWord* result = NULL;
  
    result = old_gen->expand_and_allocate(obj_size, false);
  
    if (result != NULL) {
!     Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(obj), result, obj_size);
    }
    return cast_to_oop(result);
  }
--- 1245,15 ---
  
  oop GenCollectedHeap::handle_failed_promotion(Generation* old_gen,
                                                oop obj,
                                                size_t obj_size) {
    guarantee(old_gen == _old_gen, "We only get here with an old generation");
!   assert(obj_size == (size_t)obj->compact_size(), "bad obj_size passed in");
    HeapWord* result = NULL;
  
    result = old_gen->expand_and_allocate(obj_size, false);
  
    if (result != NULL) {
!     obj->copy_disjoint_compact(result, obj_size);
    }
    return cast_to_oop(result);
  }
< prev index next >