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

Move PtrQueue behaviors to PtrQueueSet subclasses

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
      gc

      Description

      PtrQueue provides enqueue (and enqueue_known_active) to add a value to the queue. Part of this is a protocol for the PtrQueue to hand off the current buffer to the associated PtrQueueSet, with several virtual functions involved in one or both classes to handle various special cases, such that each of the three extent derivation lines overrides or extends different parts in sometimes tricky ways. There's also some loss of type checking within these base classes and required casting in the derived classes as a result.

      This could be simplified by making PtrQueue a dump data container and having all of the specialized behavior in the PtrQueueSet subclasses, with some supporting functions in PtrQueueSet.

      This isn't expected to directly provide any performance benefits [1]. However, by providing better separation it will make it easier to make additional changes for performance to individual deriviation lines without having to potentially touch everything in the hierarchy, including hand coded assembly for every target platform.

      [1] One benefit would be reducing the size of the queue objects in the thread-local data, possibly with some small caching benefit.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kbarrett Kim Barrett
              Reporter:
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: