src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 3824
b9442ac22f59
parent 3823
37552638d24a
child 3891
7994a5a35fcf
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Jun 05 22:30:24 2012 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Mon Jun 04 13:29:34 2012 +0200
     1.3 @@ -1493,22 +1493,28 @@
     1.4      JavaThread::dirty_card_queue_set().abandon_logs();
     1.5      assert(!G1DeferredRSUpdate
     1.6             || (G1DeferredRSUpdate && (dirty_card_queue_set().completed_buffers_num() == 0)), "Should not be any");
     1.7 -  }
     1.8 -
     1.9 -  _young_list->reset_sampled_info();
    1.10 -  // At this point there should be no regions in the
    1.11 -  // entire heap tagged as young.
    1.12 -  assert( check_young_list_empty(true /* check_heap */),
    1.13 -    "young list should be empty at this point");
    1.14 -
    1.15 -  // Update the number of full collections that have been completed.
    1.16 -  increment_old_marking_cycles_completed(false /* concurrent */);
    1.17 -
    1.18 -  _hrs.verify_optional();
    1.19 -  verify_region_sets_optional();
    1.20 -
    1.21 -  print_heap_after_gc();
    1.22 -  g1mm()->update_sizes();
    1.23 +
    1.24 +    _young_list->reset_sampled_info();
    1.25 +    // At this point there should be no regions in the
    1.26 +    // entire heap tagged as young.
    1.27 +    assert( check_young_list_empty(true /* check_heap */),
    1.28 +      "young list should be empty at this point");
    1.29 +
    1.30 +    // Update the number of full collections that have been completed.
    1.31 +    increment_old_marking_cycles_completed(false /* concurrent */);
    1.32 +
    1.33 +    _hrs.verify_optional();
    1.34 +    verify_region_sets_optional();
    1.35 +
    1.36 +    print_heap_after_gc();
    1.37 +
    1.38 +    // We must call G1MonitoringSupport::update_sizes() in the same scoping level
    1.39 +    // as an active TraceMemoryManagerStats object (i.e. before the destructor for the
    1.40 +    // TraceMemoryManagerStats is called) so that the G1 memory pools are updated
    1.41 +    // before any GC notifications are raised.
    1.42 +    g1mm()->update_sizes();
    1.43 +  }
    1.44 +
    1.45    post_full_gc_dump();
    1.46  
    1.47    return true;
    1.48 @@ -3936,25 +3942,30 @@
    1.49  
    1.50        gc_epilogue(false);
    1.51      }
    1.52 -  }
    1.53 -
    1.54 -  // The closing of the inner scope, immediately above, will complete
    1.55 -  // logging at the "fine" level. The record_collection_pause_end() call
    1.56 -  // above will complete logging at the "finer" level.
    1.57 -  //
    1.58 -  // It is not yet to safe, however, to tell the concurrent mark to
    1.59 -  // start as we have some optional output below. We don't want the
    1.60 -  // output from the concurrent mark thread interfering with this
    1.61 -  // logging output either.
    1.62 -
    1.63 -  _hrs.verify_optional();
    1.64 -  verify_region_sets_optional();
    1.65 -
    1.66 -  TASKQUEUE_STATS_ONLY(if (ParallelGCVerbose) print_taskqueue_stats());
    1.67 -  TASKQUEUE_STATS_ONLY(reset_taskqueue_stats());
    1.68 -
    1.69 -  print_heap_after_gc();
    1.70 -  g1mm()->update_sizes();
    1.71 +
    1.72 +    // The closing of the inner scope, immediately above, will complete
    1.73 +    // logging at the "fine" level. The record_collection_pause_end() call
    1.74 +    // above will complete logging at the "finer" level.
    1.75 +    //
    1.76 +    // It is not yet to safe, however, to tell the concurrent mark to
    1.77 +    // start as we have some optional output below. We don't want the
    1.78 +    // output from the concurrent mark thread interfering with this
    1.79 +    // logging output either.
    1.80 +
    1.81 +    _hrs.verify_optional();
    1.82 +    verify_region_sets_optional();
    1.83 +
    1.84 +    TASKQUEUE_STATS_ONLY(if (ParallelGCVerbose) print_taskqueue_stats());
    1.85 +    TASKQUEUE_STATS_ONLY(reset_taskqueue_stats());
    1.86 +
    1.87 +    print_heap_after_gc();
    1.88 +
    1.89 +    // We must call G1MonitoringSupport::update_sizes() in the same scoping level
    1.90 +    // as an active TraceMemoryManagerStats object (i.e. before the destructor for the
    1.91 +    // TraceMemoryManagerStats is called) so that the G1 memory pools are updated
    1.92 +    // before any GC notifications are raised.
    1.93 +    g1mm()->update_sizes();
    1.94 +  }
    1.95  
    1.96    if (G1SummarizeRSetStats &&
    1.97        (G1SummarizeRSetStatsPeriod > 0) &&

mercurial