RFR: 8324881: ObjectSynchronizer::inflate(Thread* current...) is invoked for non-current thread [v5]
Axel Boldt-Christmas
aboldtch at openjdk.org
Fri Feb 2 08:09:06 UTC 2024
On Thu, 1 Feb 2024 21:52:59 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 1339:
>>
>>> 1337: }
>>> 1338:
>>> 1339: ObjectMonitor* ObjectSynchronizer::inflate_impl(JavaThread* thread, oop object, const InflateCause cause) {
>>
>> I did like the name locking_thread better than just thread. I see the comment below but I can see also missing the comment and below (it's a long function) deciding that ResourceMark is more efficient when you pass the current thread. I don't think we managed to rename all "thread" parameter "current" in our cleanups. Having a longer name makes it more special, which it is.
>
> I'm not fond of `thread` either, but I don't have a better name suggestion.
Given the legacy that of `thread` and `THREAD` being `JavaThread::current()` I will rename this to `inflating_thread` with a comment that this may not always be the `JavaThread::current()` in the case of `ObjectSynchronizer::inflate_for`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17626#discussion_r1475701601
More information about the hotspot-dev
mailing list