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

Client emulation mode sets MaxRAM too late

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 11
    • 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.

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

              Created:
              Updated:
              Resolved: