Client emulation mode sets MaxRAM too late

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 11
    • Component/s: hotspot
    • None
    • gc
    • b22

      Client emulation mode flags set MaxRAM to 1G, which is then used to influence the heap size when setting it ergonomically in Arguments::set_heap_size(). However, when setting the client emulation mode flags from CompilerConfig::ergo_initialize(), the min, max and initial heap sizes have already been set, so the desired impact is lost. See code below.

      jint Arguments::apply_ergo() {
        ...
        // Set heap size based on available physical memory
        set_heap_size();
        ...
        // Set compiler flags after GC is selected and GC specific
        // flags (LoopStripMiningIter) are set.
        CompilerConfig::ergo_initialize();
        ...
      }

      It looks like this was introduced in JDK-8184349.

            Assignee:
            Joel Sikström
            Reporter:
            Joel Sikström
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: