Some G1 policy code tries to get a prediction on an empty sequence

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 9
    • Component/s: hotspot
    • gc

      Some code in G1CollectorPolicy in some circumstances tries to get predictions from TruncatedSeqs that have no samples.

      This can be verified by adding an assert(seq->num() > 0) in G1Predictions::get_new_prediction()

      At least this is a strange behavior that should either be fixed or documented.

      The attached change is a reverse diff that implements the assert and initial changes. It seems that mostly calling G1CollectorPolicy::update_young_list_target_length() is affected.

      Failing test case with these changes applied would be a Java program that immediately calls System.gc().

            Assignee:
            Unassigned
            Reporter:
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: