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

changeset 1949
b9bc732be7c0
parent 1907
c18cbe5936b8
parent 1946
f16f1d7893de
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp	Wed Jun 09 13:53:58 2010 -0400
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp	Thu Jun 10 08:27:35 2010 -0700
     1.3 @@ -81,20 +81,24 @@
     1.4  
     1.5    remove_expired_entries(end);
     1.6    if (_no_entries == QueueLength) {
     1.7 -    // OK, right now when we fill up we bomb out
     1.8 -    // there are a few ways of dealing with this "gracefully"
     1.9 +    // OK, we've filled up the queue. There are a few ways
    1.10 +    // of dealing with this "gracefully"
    1.11      //   increase the array size (:-)
    1.12      //   remove the oldest entry (this might allow more GC time for
    1.13 -    //     the time slice than what's allowed)
    1.14 +    //     the time slice than what's allowed) - this is what we
    1.15 +    //     currently do
    1.16      //   consolidate the two entries with the minimum gap between them
    1.17      //     (this might allow less GC time than what's allowed)
    1.18 -    guarantee(NOT_PRODUCT(ScavengeALot ||) G1UseFixedWindowMMUTracker,
    1.19 -              "array full, currently we can't recover unless +G1UseFixedWindowMMUTracker");
    1.20 +
    1.21      // In the case where ScavengeALot is true, such overflow is not
    1.22      // uncommon; in such cases, we can, without much loss of precision
    1.23      // or performance (we are GC'ing most of the time anyway!),
    1.24 -    // simply overwrite the oldest entry in the tracker: this
    1.25 -    // is also the behaviour when G1UseFixedWindowMMUTracker is enabled.
    1.26 +    // simply overwrite the oldest entry in the tracker.
    1.27 +
    1.28 +    if (G1PolicyVerbose > 1) {
    1.29 +      warning("MMU Tracker Queue overflow. Replacing earliest entry.");
    1.30 +    }
    1.31 +
    1.32      _head_index = trim_index(_head_index + 1);
    1.33      assert(_head_index == _tail_index, "Because we have a full circular buffer");
    1.34      _tail_index = trim_index(_tail_index + 1);

mercurial