RFR: 8223312: Utilize handshakes instead of is_thread_fully_suspended [v2]

Coleen Phillimore coleenp at openjdk.java.net
Tue Oct 20 12:10:26 UTC 2020


On Tue, 20 Oct 2020 07:17:24 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1525:
>> 
>>> 1523:   Thread* current_thread  = Thread::current();
>>> 1524:   HandleMark hm(current_thread);
>>> 1525:   JavaThread* java_thread = target->as_Java_thread();
>> 
>> Contrast with the same three lines at L1390 - we should use the same boilerplate in each `doit`. And ideally refactor
>> into some shared code somewhere (future RFE).
>
> Yes, that would be good.

Why don't you just do:
JavaThread* java_thread = JavaThread::current();
HandleMark hm(java_thread);

JavaThread::current is the same thing as what you have.

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

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


More information about the serviceability-dev mailing list