RFR: 8259668: Make SubTasksDone use-once [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Thu Feb 4 15:41:59 UTC 2021


> After JDK-8260574, a instance of `SubTasksDone` is never reused, so part of its APIs could be revised: `clear()` and the code calling it is removed.
> 
> With this patch, `all_tasks_completed` contains only assertion. Kim suggested moving this assertion logic to `~SubTasksDone`, but that could defer the assertion violation. For example, in the case of `G1FullGCMarkTask::work`, there is a significant amount of code running btw the instance when all subtasks are claimed (where `all_tasks_completed` is called in this PR) and `~SubTasksDone`. In the interest of having more precise location where bugs may lie, I have kept `all_tasks_completed` in the original place. More comments on this are welcome.

Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:

  review

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2383/files
  - new: https://git.openjdk.java.net/jdk/pull/2383/files/16cf3cec..90add10d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2383&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2383&range=00-01

  Stats: 61 lines in 2 files changed: 30 ins; 29 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2383.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2383/head:pull/2383

PR: https://git.openjdk.java.net/jdk/pull/2383


More information about the hotspot-dev mailing list