RFR: 8287281: adjust guarantee in Handshake::execute for the case of target thread being current [v4]
David Holmes
dholmes at openjdk.java.net
Mon Jun 6 07:36:41 UTC 2022
On Mon, 6 Jun 2022 07:19:06 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Johan Sjölén has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - do_thread(target) not self
>> - Remove checks for is_handshake_for, instead call Handshake::execute
>> - Switch order of handshake check
>
> src/hotspot/share/prims/jvmtiEventController.cpp line 370:
>
>> 368: }
>> 369: EnterInterpOnlyModeClosure hs;
>> 370: assert(state->get_thread() != NULL, "sanity check");
>
> Existing: We have already performed this check. We set `target` above and returned if it was `NULL`.
We also no longer need L358 as `current` is now unused.
> src/hotspot/share/runtime/handshake.cpp line 360:
>
>> 358: }
>> 359:
>> 360: HandshakeOperation op(hs_cl, target, Thread::current());
>
> Existing nit: this should pass `self` not re-invoke `Thread::current()`.
Actually, `self` should be `current` as that is the convention we are trying to use everywhere (some old code still uses 'self').
-------------
PR: https://git.openjdk.java.net/jdk/pull/8992
More information about the serviceability-dev
mailing list