[aarch64-port-dev ] 8248238: Implementation of JEP: Windows AArch64 Support
Anton Kozlov
akozlov at azul.com
Tue Sep 8 18:36:14 UTC 2020
Hello Bernhard, All,
On 26.08.2020 14:52, Bernhard Urban-Forster wrote:
> On 25/08/2020 11:44, Andrew Haley wrote:
>> Looks OK. It would be nice if you could get rid of some of the #ifndef
>> _WIN64 stuff in common code by moving queries like icache_line_size()
>> into os-specific files, but you may do that later.
>
> I agree, there are still a few opportunities to make it cleaner. I'll take care of it.
How far have you gone with CPU feature and cache size detection? I have some
time I can spend some time cleaning vm_version for aarch64, which I think leaks
too much Linux details into the common CPU code.
1. The linux part of feature detection should probably go to
os_cpu/xxx/vm_version_xxx.cpp.
2. CPU features detection stub [1] for some reason takes 550 bytes (and is
allocated permanently in the code cache), constructs a frame, and probably can
be replaced with just inline assembly at least for Linux.
3. dcpop feature is taken from /proc/cpuinfo[2], although it is also there in
HWCAP[3].
4. I'm a bit concerned about Feature_Flags[4] implicitly mirrors of Linux
HWCAP. I think some code (e.g assert) should provide a hint about mapping. For
example, HWCAP_ATOMIC implicitly mapped to CPU_LSE. As a note, Feature_Flags
had also leaked into Graal, which should also be considered.
...
I'm asking to avoid duplicating efforts. If you have done some significant work
for vm_version that you're not ready to share yet, then OK, there is no rush.
Otherwise, I can try to do something with these and anything else that may jump
out after some work. In that case, the success criteria will be a better
separation of common and Linux code, which should also simplify the
Windows-aarch64 patch.
Thanks,
Anton
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp#L110
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp#L211
[3] https://elixir.bootlin.com/linux/latest/source/arch/arm64/include/uapi/asm/hwcap.h#L39
[4] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp#L91
More information about the hotspot-dev
mailing list