Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8273486

Zero: Handle DiagnoseSyncOnValueBasedClasses VM option

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b15

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: