CDS: Make sure the ArchiveRelocationMode is always printed in the log

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: hotspot
    • b17

      It seems like we don't always print the ArchiveRelocationMode (at least, when it's default, i.e. 1). A quote from [~ccheung]:

      "If MetaspaceShared::map_archives() returns early, then the "ArchiveRelocationMode ==1" won't appear in the output."

      Here's a correct sample output line, which we expect:

      [0.034s][info][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address

      Log messages provide important troubleshooting information and should not be printed probabilistically or avoided on certain execution paths only. This also violates the least astonishment principle.

      AFAIU, we're talking about the 'MapArchiveResult MetaspaceShared::map_archives' defined in the 'hotspot/share/cds/metaspaceShared.cpp'.

            Assignee:
            Calvin Cheung (Inactive)
            Reporter:
            Evgeny Nikitin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: