RFR: JDK-8293114: GC should trim the native heap [v11]
Thomas Stuefe
stuefe at openjdk.org
Thu Jul 6 07:04:23 UTC 2023
On Wed, 5 Jul 2023 18:37:41 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 41 commits:
>>
>> - fix windows build
>> - Merge branch 'master' into JDK-8293114-GC-trim-native
>> - wip
>> - Merge branch 'master' into JDK-8293114-GC-trim-native
>> - wip
>> - Remove adaptive stepdown coding
>> - Merge master
>> - wip
>> - Merge branch 'master' into JDK-8293114-GC-trim-native
>> - wip
>> - ... and 31 more: https://git.openjdk.org/jdk/compare/22e17c29...162b880a
>
> src/hotspot/share/memory/arena.cpp line 105:
>
>> 103:
>> 104: static void clean() {
>> 105: ThreadCritical tc;
>
> Why do you need `ThreadCritical` here? I would have thought `PauseMark` handles everything right?
Unrelated to pause. I introduced an empty check on all pools, but that has to happen under lock protection too. So I moved up the 4 ThreadCriticals from the prune functions to this function.
The point is to avoid pausing if nothing is done, which is most of the time. Also, instead of 4 calls to ThreadCritical, just one.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/10085#discussion_r1254019061
More information about the hotspot-gc-dev
mailing list