[crac] RFR: Ensure empty Reference Handler and Cleaners queues [v2]

Anton Kozlov akozlov at openjdk.java.net
Tue Feb 1 08:48:42 UTC 2022


On Mon, 31 Jan 2022 13:54:37 GMT, Dan Heidinga <heidinga at openjdk.org> wrote:

>> Anton Kozlov has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   Ensure empty Reference Handler and Cleaners queues
>
> src/java.base/share/classes/java/lang/ref/Reference.java line 344:
> 
>> 342:             @Override
>> 343:             public void beforeCheckpoint(Context<? extends Resource> context) throws Exception {
>> 344:                 System.gc();
> 
> Is a single `System.gc()` sufficient for the Hotspot collectors?  With OpenJ9, we used to treat back to back System.gc() calls specially as requiring extra effort.  Does Hotspot do something similar?

Although I could not find immediate counter-examples after a quick look, I don't really expect this to be sufficient. Hence TODO.

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

PR: https://git.openjdk.java.net/crac/pull/13


More information about the crac-dev mailing list