< prev index next >

src/hotspot/share/gc/parallel/psParallelCompact.cpp

Print this page
*** 983,10 ***
--- 983,12 ---
    _space_info[to_space_id].set_space(heap->young_gen()->to_space());
  
    // Increment the invocation count
    heap->increment_total_collections(true);
  
+   CodeCache::increment_marking_cycle();
+ 
    // We need to track unique mark sweep invocations as well.
    _total_invocations++;
  
    heap->print_heap_before_gc();
    heap->trace_heap_before_gc(&_gc_tracer);

*** 1013,10 ***
--- 1015,12 ---
  void PSParallelCompact::post_compact()
  {
    GCTraceTime(Info, gc, phases) tm("Post Compact", &_gc_timer);
    ParCompactionManager::remove_all_shadow_regions();
  
+   CodeCache::increment_marking_cycle();
+ 
    for (unsigned int id = old_space_id; id < last_space_id; ++id) {
      // Clear the marking bitmap, summary data and split info.
      clear_data_covering_space(SpaceId(id));
      // Update top().  Must be done after clearing the bitmap and summary data.
      _space_info[id].publish_new_top();

*** 1955,11 ***
      ResourceMark rm;
  
      ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(_worker_id);
  
      PCMarkAndPushClosure mark_and_push_closure(cm);
!     MarkingCodeBlobClosure mark_and_push_in_blobs(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations);
  
      thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
  
      // Do the real work
      cm->follow_marking_stacks();
--- 1959,11 ---
      ResourceMark rm;
  
      ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(_worker_id);
  
      PCMarkAndPushClosure mark_and_push_closure(cm);
!     MarkingCodeBlobClosure mark_and_push_in_blobs(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations, true /* keepalive nmethods */);
  
      thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
  
      // Do the real work
      cm->follow_marking_stacks();
< prev index next >