On Tue, 20 Oct 2020 07:17:24 GMT, Robbin Ehn <r...@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