RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v10]

Daniel D.Daugherty dcubed at openjdk.java.net
Fri Nov 5 15:54:17 UTC 2021


On Thu, 4 Nov 2021 21:44:45 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> 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?

I've changed `is_JavaThread_protected()` to materialize current_thread when it is declared
to simplify the code paths.

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

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


More information about the serviceability-dev mailing list