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

Reimplement JvmtiRawMonitor to use PlatformMonitor

    Details

      Description

      From jvmtiRawMonitor.cpp:

      // -------------------------------------------------------------------------
      // The raw monitor subsystem is entirely distinct from normal
      // java-synchronization or jni-synchronization. raw monitors are not
      // associated with objects. They can be implemented in any manner
      // that makes sense. The original implementors decided to piggy-back
      // the raw-monitor implementation on the existing Java objectMonitor mechanism.
      // This flaw needs to fixed. We should reimplement raw monitors as sui-generis.
      // Specifically, we should not implement raw monitors via java monitors.
      // Time permitting, we should disentangle and deconvolve the two implementations
      // and move the resulting raw monitor implementation over to the JVMTI directories.
      // Ideally, the raw monitor implementation would be built on top of
      // park-unpark and nothing else.
      //
      // raw monitors are used mainly by JVMTI
      // The raw monitor implementation borrows the ObjectMonitor structure,
      // but the operators are degenerate and extremely simple.

      Rather than base the implementation on park/unpark we can utilise PlatformMonitor.

      By disentangling JvmtiRawMonitor from ObjectMonitor we're free to make modifications to ObjectMonitor more easily.

      Handling the "pending monitors" defined before the VM startup properly may require special care given PlatformMonitor has VM initialization dependencies.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dholmes David Holmes
                Reporter:
                dholmes David Holmes
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: