RFR: 8236926: Concurrently uncommit memory in G1 [v5]

Stefan Johansson sjohanss at openjdk.java.net
Fri Nov 13 15:49:01 UTC 2020


On Fri, 13 Nov 2020 12:35:58 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/heapRegionManager.cpp line 189:
>> 
>>> 187:     }
>>> 188: 
>>> 189:     if (G1CollectedHeap::heap()->hr_printer()->is_active()) {
>> 
>> This `if` is not needed, right? `commit(hr)` does such check already. There are a few other cases of the same kind.
>
> This is a bit unfortunate, but this `is_active()` is checking if the `G1HRPrinter` is active and should print stuff. So it is needed.

Misunderstood Alberts comment here. He is correct that the check inside `commit(hr)` is enough, updated this and a few other similar cases.

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

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


More information about the hotspot-dev mailing list