RFR: 8236847: CDS archive with 4K alignment unusable on machines with 64k pages

David Holmes david.holmes at oracle.com
Tue Feb 23 21:50:12 UTC 2021


On 24/02/2021 3:50 am, Ioi Lam wrote:
> On Tue, 23 Feb 2021 17:32:44 GMT, Yumin Qi <minqi at openjdk.org> wrote:
> 
>> Is?
>> `#if (defined(LINUX) || defined(__APPLE__)) && defined(AARCH64) or #if (defined(LINUX) && defined(AARCH64)) || defined(__APPLE__)`
> 
> Actually, I think we should use
> 
> #if (defined(LINUX) && defined(AARCH64)) || (defined(__APPLE__) && defined(AMD64))`
> 
> For the macOS case, we are running an AMD64 binary inside Rosetta.
> 
> We don't need to worry about `(defined(__APPLE__) && defined(AARCH64))` because we cannot run M1 binaries on AMD64.

I'm confused. Is this about running binaries on different architectures 
or running binaries on machines with different page sizes? Or both? If 
the M1 machines support 4K or 64K then they would need this change - no?

Regardless I'd rather see this hidden by some abstraction that captures 
whether a given platform supports multiple sizes rather than these 
explicit ifdefs.

Thanks,
David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/2651
> 


More information about the hotspot-runtime-dev mailing list