On Wed, 9 Mar 2022 08:35:41 GMT, Johannes Bechberger <d...@openjdk.java.net> 
wrote:

>> The WXMode for the current thread (on MacOS aarch64) is currently stored in 
>> the thread class which is unnecessary as the WXMode is bound to the current 
>> OS thread, not the current instance of the thread class.
>> This pull request moves the storage of the current WXMode into a thread 
>> local global variable in `os` and changes all related code. SafeFetch 
>> depended on the existence of a thread object only because of the WXMode. 
>> This pull request therefore removes the dependency, making SafeFetch usable 
>> in more contexts.
>
> Johannes Bechberger has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   current_thread_wx -> ThreadWX

A couple of minor nits but otherwise I'm okay with this version.

Thanks,
David

src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp line 35:

> 33: #include "prims/jvmtiExport.hpp"
> 34: #include "runtime/safepoint.hpp"
> 35: #include "runtime/thread.inline.hpp"

I still don't see why this is needed.

src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp line 77:

> 75: template<int BType, typename JniType = 
> decltype(BasicTypeToJni<BType>::jni_type)>
> 76: JniType static_fast_get_field_wrapper(JNIEnv *env, jobject obj, jfieldID 
> fieldID) {
> 77:   JavaThread* thread = JavaThread::thread_from_jni_environment(env);

This line is no longer needed.

-------------

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

Reply via email to