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

Improve validation of -XX:G1ConfidencePercent value

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Introduced In Version:
    • Resolved In Build:
      b51
    • CPU:
      generic
    • OS:
      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

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: