RFR: 8324881: ObjectSynchronizer::inflate(Thread* current...) is invoked for non-current thread [v2]
Coleen Phillimore
coleenp at openjdk.org
Wed Jan 31 17:23:02 UTC 2024
On Wed, 31 Jan 2024 06:55:30 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 521:
>>
>>> 519: }
>>> 520:
>>> 521: void ObjectSynchronizer::enter(Handle obj, BasicLock* lock, JavaThread* locking_thread, JavaThread* current) {
>>
>> Do we actually need to pass in the current thread? What is it used for - ResourceMarks?
>
> It is definitely an alternative to simply use Thread::current. That is all it is used for throughout this code.
Yes an alternative could be at the beginning of 'enter' do:
Thread* current = Thread::current();
You have a comment below about locking_thread not necessarily being current.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17626#discussion_r1473181992
More information about the hotspot-dev
mailing list