RFR: 8264543: Cross modify fence optimization for x86 [v2]
Xubo Zhang
github.com+58006833+xbzhang99 at openjdk.java.net
Fri Jul 16 16:17:54 UTC 2021
On Fri, 16 Jul 2021 06:20:20 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> it will give me errors, like 'Atomic' has not been declared.
>> Also, the cross_modify_fence_impl actually is os-dependent. Linux and Windows have different implementations.
>
> vm_version_x86.hpp has a dependency on universe.hpp which has a dependency on orderAccess.hpp which is why that circularity problem arises. That can be fixed by moving the inline definition of `supports_clflush()` (which calls `Universe::is_fully_initialized()`) out of vm_version_x86.hpp into vm_version_x86.cpp. We can then proceed to include vm_version.hpp in orderAccess.hpp (something I'm surprised is not already done as I recall CPU specific memory barriers being used back in JDK 7 and 8). That change (of course) requires a few other tweaks, so I put the changes together here and ran them through our build system.
> https://github.com/openjdk/jdk/compare/master...dholmes-ora:orderAccess-vm_version?expand=1
cool. thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3334
More information about the hotspot-dev
mailing list