Integrated: 8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option
Aleksey Shipilev
shade at openjdk.java.net
Tue Sep 14 08:18:07 UTC 2021
On Wed, 8 Sep 2021 10:41:34 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> JDK-8257027 added a diagnostic option to check for synchronization on value-based classes. Zero does not support it, so it would fail the relevant test:
>
>
> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/Monitor/SyncOnValueBasedClassTest.java
>
> STDERR:
> stdout: [];
> stderr: [Exception in thread "main" java.lang.RuntimeException: synchronization on value based class did not fail
> at SyncOnValueBasedClassTest$FatalTest.main(SyncOnValueBasedClassTest.java:128)
> ]
> exitValue = 1
>
> java.lang.RuntimeException: 'fatal error: Synchronizing on object' missing from stdout/stderr
>
>
> Template interpreters implement this check by going to to slowpath that calls `InterpreterRuntime::monitorenter`. Zero already goes to that path when `UseHeavyMonitors` is enabled, so we might just enable it when lock diagnostics is requested. This would cost us zero (pun intended) when diagnostic option is disabled.
>
> Additional testing:
> - [x] Linux x86_64 Zero, affected test now passes
This pull request has now been integrated.
Changeset: 86a8e552
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/86a8e5524ddb5e25dab54b4f56cc1b9c27d0a4a6
Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod
8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option
Reviewed-by: dholmes
-------------
PR: https://git.openjdk.java.net/jdk/pull/5412
More information about the hotspot-dev
mailing list