RFR: 8367993: G1: Speed up ConcurrentMark initialization [v8]
Leo Korinth
lkorinth at openjdk.org
Tue Jan 27 18:49:50 UTC 2026
On Tue, 27 Jan 2026 18:42:51 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:
>> This change moves almost all of the ConcurrentMark initialisation from its constructor to the method `G1ConcurrentMark::fully_initialize()`. Thus, creation time of the VM can be slightly improved by postponing creation of ConcurrentMark. Most time is saved postponing creation of statistics buffers and threads.
>>
>> It is not obvious that this is the best solution. I have earlier experimented with lazily allocating statistics buffers _only_. One could also initialise a little bit more eagerly (for example the concurrent mark thread) and maybe get a slightly cleaner change. However IMO it seems better to not have ConcurrentMark "half initiated" with a created mark thread, but un-initialised worker threads.
>>
>> This change is depending on the integration of https://bugs.openjdk.org/browse/JDK-8373253.
>>
>> I will be out for vacation, and will be back after new year (and will not answer questions during that time), but I thought I get the pull request out now so that you can have a look.
>
> Leo Korinth has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:
>
> - Revert "Stefan J 4"
>
> This reverts commit 203d11979524126add9ee5d04174bde07a5a3f5a.
> - Revert "remove commented out code"
>
> This reverts commit 9d9df671574be7a15a30ef0af452629330cb4fd1.
> - Merge branch 'master' into _8367993
> - Merge branch '_master_jdk' into _8367993
> - Merge branch '_8373253' into _8367993
> - rename of method
> - Proposal by Stefan J
> - wip
> - Revert "8373253: Re-work InjectGCWorkerCreationFailure for future changes"
>
> This reverts commit d45ea8817ab2303b2decd8cbb2cd1bf5280aa181.
> - Revert "Fixup after comment from Ivan."
>
> This reverts commit 2aa8aa4b68027b62a8d4be1b86720fadfa48dda5.
> - ... and 11 more: https://git.openjdk.org/jdk/compare/90b54692...c5a7e2bb
I think the current state is okay, sorry for the messy history (the last two commits was pushed by mistake, now reverted). Rerunning tier 1 - 5, they are not through yet.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28723#issuecomment-3806877202
More information about the hotspot-dev
mailing list