RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call [v6]
Coleen Phillimore
coleenp at openjdk.org
Wed Nov 16 12:59:11 UTC 2022
On Wed, 16 Nov 2022 03:54:31 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comments.
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 564:
>
>> 562:
>> 563: for (int i = 0; i < length; i++) {
>> 564: objArray[i] = (jthreadGroup)JNIHandles::make_local(groups->obj_at(i));
>
> Nit: It is better to use `jni_reference` instead of `JNIHandles::make_local` for consistency as at the line 549.
jni_reference takes a Handle and this passes a Handle to an objArray so groups->obj_at(i) is an oop and it's a waste to make it a handle for jni_reference to just unhandlize it.
-------------
PR: https://git.openjdk.org/jdk/pull/11033
More information about the core-libs-dev
mailing list