RFR 8235678: Remove unnecessary calls to Thread::current() in MutexLocker calls
David Holmes
david.holmes at oracle.com
Tue Jan 14 23:04:46 UTC 2020
Hi Lois,
On 15/01/2020 1:05 am, Lois Foltan wrote:
> On 1/14/2020 9:00 AM, Harold Seigel wrote:
>> Hi,
>>
>> Please review this small change, to reduce unnecessary calls to
>> Thread::current() in MutexLocker calls, by passing the current thread
>> as an argument. A few ResoureMark declarations were also changed.
>>
>> Open Webrev:
>> http://cr.openjdk.java.net/~hseigel/bug_8235678/webrev/index.html
>>
>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8235678
>>
>> The fix was regression tested by running Mach5 tiers 1 and 2 tests and
>> builds on Linux-x64, Solaris, Windows, and Mac OS X, by running Mach5
>> tiers 3-5 tests on Linux-x64, and JCK lang and VM tests on Linux-x64.
>>
>> Thanks, Harold
>>
>
> Overall looks great. One comment:
>
> - prims/methodHandles.cpp
> line #1507: Curious to know why you use "THREAD" and the MutexLocker mu1
> at line #1502 uses "thread"?
Just for reference THREAD is a Thread*, but thread is a JavaThread*
introduced by some of the *ENTRY macros. It can be confusing when they
both get used by code that only needs a Thread* - as per the line you
quoted. We probably have a few places where we explicitly cast THREAD to
JavaThread* unnecessarily because it isn't obvious that the thread
variable exists.
David
> Thanks,
> Lois
More information about the hotspot-dev
mailing list