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

VM reports incorrect name of option that have incorrect value if InitialTenuringThreshold > MaxTenuringThreshold

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • hs25
    • hs25
    • hotspot
    • gc

      Due to typo in runtime/arguments.cpp JVM reports that MaxTenuringThreshold have incorrect value if InitialTenuringThreshold > MaxTenuringThreshold:

      $JAVA_HOME/bin/java -XX:InitialTenuringThreshold=15 -XX:MaxTenuringThreshold=0
      MaxTenuringThreshold of 15 is invalid; must be between 0 and 0
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      Obviously, it should report that InitialTenuringThreshold has incorrect value.

      Thus, fix is trivial:

      diff -r d0afbee540e0 src/share/vm/runtime/arguments.cpp
      --- a/src/share/vm/runtime/arguments.cpp Mon Aug 19 13:44:13 2013 +0200
      +++ b/src/share/vm/runtime/arguments.cpp Tue Aug 20 13:41:20 2013 +0400
      @@ -2189,7 +2189,7 @@
         // the "age" field in the oop header is 4 bits; do not want to pull in markOop.hpp
         // just for that, so hardcode here.
         status = status && verify_interval(MaxTenuringThreshold, 0, 15, "MaxTenuringThreshold");
      - status = status && verify_interval(InitialTenuringThreshold, 0, MaxTenuringThreshold, "MaxTenuringThreshold");
      + status = status && verify_interval(InitialTenuringThreshold, 0, MaxTenuringThreshold, "InitialTenuringThreshold");
         status = status && verify_percentage(TargetSurvivorRatio, "TargetSurvivorRatio");
         status = status && verify_percentage(MarkSweepDeadRatio, "MarkSweepDeadRatio");
       

            Unassigned Unassigned
            fzhinkin Filipp Zhinkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: