In G1CollectedHeap::try_collect_concurrently, in the part handling user-requested collections, there is a place where we need to deal with WhiteBox wanting/having control. The code waits until WhiteBox has relinquished control. But the comment explicitly says not to do that.
A (unpublished) draft ofJDK-8240239 (which introduced this code and comment) had that same comment but different code. So the code was changed during the draft phase of that change, but the comment wasn't updated accordingly.
The rationale for the comment is that waiting until control is relinquished may result in waiting through multiple (controlled) concurrent collections, in addition to waiting through STW full collections. There may have been some problem with the earlier (unpublished) code. It was decided that just blocking here until control is released is okay. After all, a retry would just once again be blocked by WhiteBox being in control.
A (unpublished) draft of
The rationale for the comment is that waiting until control is relinquished may result in waiting through multiple (controlled) concurrent collections, in addition to waiting through STW full collections. There may have been some problem with the earlier (unpublished) code. It was decided that just blocking here until control is released is okay. After all, a retry would just once again be blocked by WhiteBox being in control.
- caused by
-
JDK-8240239 Replace ConcurrentGCPhaseManager
-
- Resolved
-