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

gtest CollectorPolicy.young_scaled_initial_ergo() inconsistent with code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 23
    • hotspot
    • gc

      CollectorPolicy.young_scaled_initial_ergo()'s comment says

      // If NewSize has been ergonomically set, the collector policy
      // should use it for min but calculate the initial young size
      // using NewRatio.

      (https://github.com/openjdk/jdk/blob/master/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp#L224)


      and code has comment that says:
            // If NewSize is set on the command line, we should use it as
            // the initial size, but make sure it is within the heap bounds.

      (https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/genArguments.cpp#L258)

      BTW, I believe CollectorPolicy gtest is fault, please refer to the discussion in JDK-8331675. I think we should convert them to something similar to https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java. GC experts, please confirm.

            lmesnik Leonid Mesnik
            zgu Zhengyu Gu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: