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

jvm.cfg needs to be generated based on the VMs being built

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: embedded
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b91

      Description

      Numerous tests are failing for platforms without the server VM because -server is passed. What used to happen is that the jvm.cfg would alias server to client for BUILD_CLIENT_ONLY:

      ifdef BUILD_CLIENT_ONLY
      $(JVMCFG)::
              $(MKDIR) -p $(JVMCFG_DIR)
              @# Update jvm.cfg to use -client by default and alias -server to -client
              $(RM) -f $(JVMCFG)
              $(ECHO) "-client KNOWN">$(JVMCFG)
              $(ECHO) "-server ALIASED_TO -client">>$(JVMCFG)
              $(ECHO) "-hotspot ALIASED_TO -client">>$(JVMCFG)
              $(ECHO) "-classic WARN">>$(JVMCFG)
              $(ECHO) "-native ERROR">>$(JVMCFG)
              $(ECHO) "-green ERROR">>$(JVMCFG)

      This was in the old build. This logic got converted to the new build as well but was changed to look at the value of JVM_VARIANTS.

      What has changed during this time is the presence of the minimal VM. On what was a BUILD_CLIENT_ONLY platform we actually now build client and minimal. This means JVM_VARIANTS=,client,mininal1, and so this doesn't match the logic that will do the server -> client aliasing.

      Really jvm.cfg should be dynamically generated based on the current configuration - The jvm.cfg would be generated something like this:

      if (client && server) {
        if (platform.usesErgonomics)
          write("-client IF_SERVER_CLASS -server")
        else
          write("-client known")
        write("-server known")
      }
      else if (client)
        ...
      else if (server)
        ...
      else if (minimal)
        ...

      but it is also complicated by the selection of default VM.

      As part of this change we also take the opportunity to remove the legacy jvm.cfg options, both from dynamically generated files, and those stored in the repository: -classic, -hotspot,-native,-green are all removed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: