JDK-8258251 : Move PtrQueue behaviors to PtrQueueSet subclasses
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2020-12-14
  • Updated: 2021-02-03
  • Resolved: 2021-02-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17Resolved
Related Reports
Duplicate :  
Sub Tasks
JDK-8258252 :  
JDK-8258254 :  
JDK-8258255 :  
JDK-8258508 :  
JDK-8258742 :  
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.

Comments
All subtasks completed.
03-02-2021