RFR: 8256675: Zero: purge biased locking support
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Thu Nov 19 19:58:10 UTC 2020
On Thu, 19 Nov 2020 16:23:54 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Biased locking support was always disabled for C++ interpreter. Zero seems to have inherited that, see block in `arguments.cpp`:
>
> #ifdef ZERO
> // Clear flags not supported on zero.
> FLAG_SET_DEFAULT(ProfileInterpreter, false);
> FLAG_SET_DEFAULT(UseBiasedLocking, false);
> LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
> LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false));
> #endif // ZERO
>
> But `zero/bytecodeInterpreter.cpp` still has paths that imply biased locking support. Seeing that biased locking can go away, and the cost/benefit balance of supporting it in Zero, it makes more sense to purge the long-time-disabled biased locking support from Zero.
>
> Additional testing:
> - [x] Ad-hoc benchmark runs with `-XX:(-|+)UseBiasedLocking` (Zero is so slow that BL does not matter)
Hi Aleksey,
Changes look good to me.
There are 3 places left when unlocking the monitor where there is a has_bias_pattern() check. Maybe change them into an assert? (seems Github doesn't allow to add comments on collapsed lines).
Thanks,
Patricio
-------------
Marked as reviewed by pchilanomate (Committer).
PR: https://git.openjdk.java.net/jdk/pull/1322
More information about the hotspot-runtime-dev
mailing list