6902701: G1: protect debugging code related to 6898948 with a debug flag

Thu, 19 Nov 2009 10:19:19 -0800

author
ysr
date
Thu, 19 Nov 2009 10:19:19 -0800
changeset 1522
23b9a8d315fc
parent 1521
89f1b9ae8991
child 1523
3fc996d4edd2

6902701: G1: protect debugging code related to 6898948 with a debug flag
Summary: Protected stats dump with a new develop flag; other than for the dump, reconciled product and non-product behaviour in face of the error.
Reviewed-by: tonyp

src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1_globals.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Nov 13 11:55:26 2009 -0800
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Nov 19 10:19:19 2009 -0800
     1.3 @@ -1528,18 +1528,17 @@
     1.4        _recent_prev_end_times_for_all_gcs_sec->dump();
     1.5        gclog_or_tty->print_cr("GC = %3.3f, Interval = %3.3f, Ratio = %3.3f",
     1.6                               _recent_gc_times_ms->sum(), interval_ms, recent_avg_pause_time_ratio());
     1.7 -      // TEMPORARY: In debug mode, terminate the JVM, so nightly testing explicitly
     1.8 -      // flags the sighting by failing the test.
     1.9 -      assert(false, "Debugging data for CR 6898948 has been dumped above");
    1.10 -#else  // PRODUCT
    1.11 -      // Clip ratio between 0.0 and 1.0
    1.12 +      // In debug mode, terminate the JVM if the user wants to debug at this point.
    1.13 +      assert(!G1FailOnFPError, "Debugging data for CR 6898948 has been dumped above");
    1.14 +#endif  // !PRODUCT
    1.15 +      // Clip ratio between 0.0 and 1.0, and continue. This will be fixed in
    1.16 +      // CR 6902692 by redoing the manner in which the ratio is incrementally computed.
    1.17        if (_recent_avg_pause_time_ratio < 0.0) {
    1.18          _recent_avg_pause_time_ratio = 0.0;
    1.19        } else {
    1.20          assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant");
    1.21          _recent_avg_pause_time_ratio = 1.0;
    1.22        }
    1.23 -#endif  // PRODUCT
    1.24      }
    1.25    }
    1.26  
     2.1 --- a/src/share/vm/gc_implementation/g1/g1_globals.hpp	Fri Nov 13 11:55:26 2009 -0800
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp	Thu Nov 19 10:19:19 2009 -0800
     2.3 @@ -242,6 +242,10 @@
     2.4    product(bool, G1UseSurvivorSpaces, true,                                  \
     2.5            "When true, use survivor space.")                                 \
     2.6                                                                              \
     2.7 +  develop(bool, G1FailOnFPError, false,                                     \
     2.8 +          "When set, G1 will fail when it encounters an FP 'error', "       \
     2.9 +          "so as to allow debugging")                                       \
    2.10 +                                                                            \
    2.11    develop(bool, G1FixedTenuringThreshold, false,                            \
    2.12            "When set, G1 will not adjust the tenuring threshold")            \
    2.13                                                                              \

mercurial