JDK-8259668 : Make SubTasksDone use-once
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-13
  • Updated: 2025-01-16
  • Resolved: 2021-02-16
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
17 b10Fixed
Related Reports
Relates :  
Relates :  
Description
The SubTasksDone class is used to track which in a set of tasks has been claimed by possibly parallel threads.  Nearly all uses allocate one, use it, and then delete it. With JDK-8260574, the last reusing use case is removed. Therefore, its APIs can be revisedd to drop the support of reusing the same instance, removing `clear()` and its callers.

--- Obsoleted by JDK-8260574 ----

However, there are a small number (perhaps only one, in GenCollectedHeap) that are allocated and then used repeatedly.  This results in the need for resetting at the end of use (even though most are not reused), and makes some kinds of usage checking more difficult.

It would be better if these objects were not permitted to be re-used, and then take advantage of that change.

Comments
Changeset: 3cbd16de Author: Albert Mingkun Yang <ayang@openjdk.org> Committer: Thomas Schatzl <tschatzl@openjdk.org> Date: 2021-02-16 08:46:58 +0000 URL: https://git.openjdk.java.net/jdk/commit/3cbd16de
16-02-2021