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

Add VM option ArchiveRelocationMode (Withdrawn, not needed)

XMLWordPrintable

    • behavioral
    • minimal
    • A new VM option is added.
    • add/remove/modify command line option
    • JDK

      Summary

      Add a diagnostic VM option to control CDS archive relocation at runtime.

      Problem

      If the CDS archive cannot be mapped at the desired address, JDK-8231610 will relocate the archive to an alternative location. Relocation can cause a small degradation of start-up time and memory footprint (when compared to mapping the archive without relocation), however, usually, it should still have better start-up and similar memory footprint when compared to disabling CDS altogether.

      However, since CDS archive relocation is a new feature, it may cause unexpected performance degradation in some cases that we have not tested.

      Solution

      As a precaution, we should add a VM option to control when/if archive relocation happens.

      Specification

      We add a new diagnostic VM option, ArchiveRelocationMode, which is an integer with the following valid values:

      • 0: (default) first map at preferred address, and if unsuccessful, map to alternative address;
      • 1: always map to alternative address;
      • 2: always map at preferred address, and if unsuccessful, do not map the archive;

      The value 1 is for forcing relocation in the regression test suite (because relocation happens rarely in our test environment), as well as for easy performance measurement.

      The value 2 is for avoiding potential regression that may be introduced by relocation (this revert the VM to JDK 13 behavior).

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: