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

Remove confusing locking_enqueue_completed_buffer

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic

      Description

      PtrQueue::locking_enqueue_completed_buffer asserts _lock->owned_by_self() and then calls enqueue_complete_buffer. It used to contain a complicated unlock / with-other-lock / relock pattern, but was simplified as part of JDK-8182703.

      It is called from exactly one place, in PtrQueue::handle_zero_index, a few lines after an assert of _lock->owned_by_self().

      At this point, it just adds a function call and makes the code a bit harder to understand because of the confusing name. So remove it and just call enqueue_complete_buffer directly instead.

        Attachments

          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: