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

Remove Atomic support for OopHandle

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • hotspot
    • b08

      OopHandle provides support for Atomic manipulation of the underlying OopStorage entry, via a PrimitiveConversions::Translate specialization.

      That translation isn't really needed. The only use of this functionality is in a couple of places in the services code, in order to support lazy thread-safe initialization of some OopHandles. But we don't need Atomic access to the OopStorage entry to provide that functionality. The initialization is using the double-checked locking pattern for access. It first checks if the entry has been initialized, using it if so. If not, an OopStorage entry is allocated and initialized, and under a lock it is installed if no other thread got there first. An Atomic flag can be used to provide the lock-free checking for initialization, rather than an Atomic access of the entry.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: