On Thu, 4 Nov 2021 17:02:59 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:

>> Sorry I missed that line 463 is still within the else from line 447.
>> 
>> Thread::current() is a compiler-defined thread-local access so should be 
>> relatively cheap these days, but I have no numbers.
>
> I'm really tempted to go ahead and change it to always set
> current thread when it is declared and then clean things up a bit.

Yes, ^ that might make the logic easier to follow. I can't figure out what 
checkTLSOnly means.  Could it be refactored into a different function like 
check_TLS() and then call it in the place where you pass true instead of 
is_JavaThread_protected?  Does checkTLSOnly skip a lot of these checks?

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

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

Reply via email to