JDK-8243325 : Cleanup TaskQueueSuper<>::peek
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-22
  • Updated: 2020-05-11
  • Resolved: 2020-05-06
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 15
15 b22Fixed
Related Reports
Relates :  
Description
The TaskQueueSuper<>::peek function simply returns true if the queue's top and bottom differ.  This means it is not being careful with the underflow possible during concurrent pop_local and pop_global.

However, it appears to only be used in assertions to verify the queue is empty after a successful termination negotiation.  In that case a temporary underflow can't be happening because there shouldn't be any pop_local or pop_global operations in progress.

So while the current implementation suffices, it would be better to have a debug-only operation with a name (and possibly behavior) more suited to its usage.

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/871e0be28aed User: kbarrett Date: 2020-05-06 06:21:05 +0000
06-05-2020