RFR: 8289004: investigate if SharedRuntime::get_java_tid parameter should be a JavaThread*

Robbin Ehn rehn at openjdk.org
Tue Oct 4 08:50:57 UTC 2022


On Tue, 4 Oct 2022 04:23:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Hi, please consider.
>> 
>> Yes it should be JavaThread*.
>> But some additional places needed to use JavaThread*
>> 
>> Passes t1-3.
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 1004:
> 
>> 1002:     return 0;
>> 1003:   }
>> 1004:   guarantee(Thread::current() != thread || JavaThread::cast(thread)->is_oop_safe(),
> 
> You don't need the cast any more.

Thanks, fixing!

> src/hotspot/share/runtime/sharedRuntime.cpp line 1006:
> 
>> 1004:   guarantee(Thread::current() != thread || JavaThread::cast(thread)->is_oop_safe(),
>> 1005:             "current cannot touch oops after its GC barrier is detached.");
>> 1006:   oop obj = JavaThread::cast(thread)->threadObj();
> 
> Again no cast needed.

Thanks, fixing!

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

PR: https://git.openjdk.org/jdk/pull/10532


More information about the hotspot-dev mailing list