RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v2]

Coleen Phillimore coleenp at openjdk.java.net
Tue Jan 26 12:04:48 UTC 2021

On Tue, 26 Jan 2021 11:31:18 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> This could be a follow-up RFE.
> I assume a WXVerifier class that tracks W^X mode in debug mode and does nothing in release mode. I've considered to do this, it's relates to small inefficiencies, while this patch brings zero overhead (in release) for a platform that does not need W^X. 
> * We don't need thread instance in release to call `os::current_thread_enable_wx`. Having WXVerifier a part of the Thread will require calling `Thread::current()` first and we could only hope for compiler to optimize this out, not sure if it will happen at all. In some contexts the Thread instance is available, in some it's not. 
> * An instance of the empty class (as WXVerifier will be in the release) will occupy non-zero space in the Thread instance.
> If such costs are negligible, I can do as suggested.

I really just want the minimal number of lines of code and hooks in thread.hpp.  You can still access it through the thread, just like these lines currently.  Look at HandshakeState as an example.


PR: https://git.openjdk.java.net/jdk/pull/2200

More information about the core-libs-dev mailing list