[crac] RFR: 8321660: [CRaC] Trim native heap before checkpoint to decrease image size [v3]

Volker Simonis simonis at openjdk.org
Wed Dec 13 15:11:15 UTC 2023


On Tue, 12 Dec 2023 07:56:02 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Need to unconditionally include os.inline.hpp. This will automatically include the right platform-specific .inline.hpp files
>
> The point is that if you want to squeeze the most of trimming heap, you don't want either the VM operation itself or any racing threads to inflate the memory again before the checkpoint happens.
> On the other hand, if the trimming is ignored at safepoint (I haven't studied the PR in detail, but some of the comments suggest that), it's a valid choice to do it before.
> 
> The test failures look OK, the tier1 failures should be hopefully fixed after merging more recent mainline.

@rvansa, thanks for the review. I just want to clarify that trimming is possible at a safepoint - it is just automatic trimming with `-XX:+GCTrimNativeHeap` which is omitted there due to latency concerns.

I'll integrate this PR as is. We can still move it to the safepoint section later if we observe insufficient trimming, but honestly speaking, I don't think it'll make a difference.

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

PR Comment: https://git.openjdk.org/crac/pull/148#issuecomment-1854089059


More information about the crac-dev mailing list