RFR: 8308614: Enabling JVMTI ClassLoad event slows down vthread creation by factor 10 [v4]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Nov 30 21:01:11 UTC 2023
On Thu, 30 Nov 2023 17:33:28 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
> I don't think we should change the guarantee() in Handshake::execute(). When the
> three parameter version of execute() is called with tlh == nullptr, the caller is
> saying that there is supposed to be a ThreadsListHandle in the calling context. Yes,
> if the target thread is the calling thread, then a ThreadsListHandle is not needed,
> but that's why we have this code to prevent the call to Handshake::execute():
> if (target->is_handshake_safe_for(current)) {
> hs.do_thread(target);
>
> In other words, I think Handshake::execute() is working the way it is supposed to
> when tlh == nullptr is passed.
Just to share my view...
It is a little bit ugly to do it for each call site.
The `Handshake::execute()` can do it instead, so its call sites could be simplified.
BTW, it is done in the `JvmtiHandshake::execute()` and one can find it to be convenient.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16686#issuecomment-1834550955
More information about the hotspot-dev
mailing list