< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Print this page
@@ -811,10 +811,12 @@
    add_parallel_task(new NoteStartOfMarkTask());
  };
  
  void G1ConcurrentMark::pre_concurrent_start(GCCause::Cause cause) {
    assert_at_safepoint_on_vm_thread();
+     
+   CodeCache::increment_marking_cycle();
  
    G1PreConcurrentStartTask cl(cause, this);
    G1CollectedHeap::heap()->run_batch_task(&cl);
  
    _gc_tracer_cm->set_gc_cause(cause);

@@ -1303,10 +1305,11 @@
    _remark_mark_times.add((mark_work_end - start) * 1000.0);
    _remark_weak_ref_times.add((now - mark_work_end) * 1000.0);
    _remark_times.add((now - start) * 1000.0);
  
    policy->record_concurrent_mark_remark_end();
+   CodeCache::increment_marking_cycle();
  }
  
  class G1ReclaimEmptyRegionsTask : public AbstractGangTask {
    // Per-region work during the Cleanup pause.
    class G1ReclaimEmptyRegionsClosure : public HeapRegionClosure {

@@ -1780,11 +1783,11 @@
  
   public:
    G1RemarkThreadsClosure(G1CollectedHeap* g1h, G1CMTask* task) :
      _qset(G1BarrierSet::satb_mark_queue_set()),
      _cm_cl(g1h, task),
-     _code_cl(&_cm_cl, !CodeBlobToOopClosure::FixRelocations),
+     _code_cl(&_cm_cl, !CodeBlobToOopClosure::FixRelocations, true /* keepalive nmethods */),
      _claim_token(Threads::thread_claim_token()) {}
  
    void do_thread(Thread* thread) {
      if (thread->claim_threads_do(true, _claim_token)) {
        // Transfer any partial buffer to the qset for completed buffer processing.
< prev index next >