On 2/1/21 9:36 AM, Thomas Stüfe wrote:
This does not solve the alignment problem, but I don't like that we unconditionally print a message here since this is a non-fatal error. Also, CDS mapping may fail for other reasons, for which we do not print unconditionally. I think we should make this info log level:

--- a/src/hotspot/share/memory/metaspaceShared.cpp
+++ b/src/hotspot/share/memory/metaspaceShared.cpp
@@ -1725,7 +1725,7 @@ MapArchiveResult MetaspaceShared::map_archive(FileMapInfo* mapinfo, char* mapped
   mapinfo->set_is_mapped(false);

   if (mapinfo->alignment() != (size_t)os::vm_allocation_granularity()) {
-    log_error(cds)("Unable to map CDS archive -- os::vm_allocation_granularity() expected: " SIZE_FORMAT +    log_info(cds)("Unable to map CDS archive -- os::vm_allocation_granularity() expected: " SIZE_FORMAT                     " actual: %d", mapinfo->alignment(), os::vm_allocation_granularity());
     return MAP_ARCHIVE_OTHER_FAILURE;
   }

@ Ioi, does that make sense?


Yes, your fix makes sense.

This issue is being address in https://bugs.openjdk.java.net/browse/JDK-8236847. We will probably unconditionally change the alignment to 64KB for AARCH64, as well as MacOS (so that you can run a X64 JDK on M1 using Rosetta).

Thanks
- Ioi

Cheers, Thomas


On Mon, Feb 1, 2021 at 6:20 PM Andrew Haley <a...@redhat.com <mailto:a...@redhat.com>> wrote:

    On 2/1/21 5:14 PM, Aleksey Shipilev wrote:
    > On 2/1/21 4:38 PM, Andrew Haley wrote:
    >> but that doesn't work either. Any ideas? I'm really stuck.
    >
    > Did you "make clean" after changing any of the configure files
    and/or configure arguments? I.e. did
    > AWTIcon32_java_icon16_png actually regenerate?

    Many times.

    > Prepending the build with "LOG=debug" would tell what cmdlines
    are used at every step of build process.

    Sure, I can see what it's doing. I think this is actually a regression
    caused by the Windows-AArch64 port. I'll do some bisecting.

-- Andrew Haley  (he/him)
    Java Platform Lead Engineer
    Red Hat UK Ltd. <https://www.redhat.com
    
<https://urldefense.com/v3/__https://www.redhat.com__;!!GqivPVa7Brio!MzT8lD4heOPkWgVBap3cDC2aM4W8zJ1wWS_-PVlTdPwr96wHRafdO7zjS2x2qQ$>>
    https://keybase.io/andrewhaley
    
<https://urldefense.com/v3/__https://keybase.io/andrewhaley__;!!GqivPVa7Brio!MzT8lD4heOPkWgVBap3cDC2aM4W8zJ1wWS_-PVlTdPwr96wHRafdO7wP-EZNow$>
    EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


Reply via email to