RFR: 8264742: member variable _monitor of MonitorLocker is redundant
David Holmes
david.holmes at oracle.com
Tue Apr 6 04:23:03 UTC 2021
Hi Xin,
On 6/04/2021 2:11 pm, Xin Liu wrote:
> MonitorLocker is a subclass of MutexLocker. The member variable _monitor
> has the same value of _mutex in its base class.
Yes it does, but it has a different type obviously. Do your as_monitor
calls actually get completely elided by the compiler? If so then this
change seems okay, but otherwise I prefer to save any runtime overhead
by using an extra word of stack.
Thanks,
David
> -------------
>
> Commit messages:
> - member variable _monitor of MonitorLocker is redundant
>
> Changes: https://git.openjdk.java.net/jdk/pull/3350/files
> Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3350&range=00
> Issue: https://bugs.openjdk.java.net/browse/JDK-8264742
> Stats: 15 lines in 1 file changed: 5 ins; 1 del; 9 mod
> Patch: https://git.openjdk.java.net/jdk/pull/3350.diff
> Fetch: git fetch https://git.openjdk.java.net/jdk pull/3350/head:pull/3350
>
> PR: https://git.openjdk.java.net/jdk/pull/3350
>
More information about the hotspot-runtime-dev
mailing list