Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8068942

Improve validation of -XX:G1ConfidencePercent value

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • hotspot
    • gc
    • b51
    • generic
    • generic

    Backports

      Description

        The -XX:G1ConfidencePercent option is expected to be an integer percentage. However, there is no code in argument processing to verify that it is a valid percentage.

        Instead, dealing with invalid values (e.g. > 100) is presently left to the one user of this option, the constructor for G1CollectorPolicy. There, if an invalid value is detected, the value is clipped to 100 and a warning message is printed (if PrintWarnings option is true).

        It would be better to detect the invalid option value during option processing and deal with it there in the normal fashion, rather than leaving it to users of the option to worry about bad values and deal with such in an ad hoc manner. Specifically, the function Arguments::check_vm_args_consistency() should use verify_percentage() to check this option's value.

        Attachments

          Issue Links

            Activity

              People

                kbarrett Kim Barrett
                kbarrett Kim Barrett
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: