RFR: JDK-8263495: Gather liveness info in the mark phase of G1 full gc [v6]
Hamlin Li
mli at openjdk.java.net
Thu Mar 18 02:04:48 UTC 2021
On Wed, 17 Mar 2021 12:40:20 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Some additional sweep through the code showed some more minor issues. Sorry for not noticing earlier.
>
> Testing showed that the regression I reported in the other PR is still present for this fix. Same small reproducer can be used:
> public class SystemGCLarge {
> public static Object[] holder;
> public static void main(String args[]) {
> holder = new Object[128 * 1024 *1024];
> System.gc();
> System.out.println("Done");
> }
> }
>
>
> I've made a change that eliminates the regression by making sure the cache update is not inlined and by doing so allows for other inlining to be done:
> https://github.com/kstefanj/jdk/commit/abf54fbbec5aa0b2fa36c2759e0974cb21d6cf78
> Testing showed that the regression I reported in the other PR is still present for this fix. Same small reproducer can be used:
>
> ```
> public class SystemGCLarge {
> public static Object[] holder;
> public static void main(String args[]) {
> holder = new Object[128 * 1024 *1024];
> System.gc();
> System.out.println("Done");
> }
> }
> ```
>
> I've made a change that eliminates the regression by making sure the cache update is not inlined and by doing so allows for other inlining to be done:
> [kstefanj at abf54fb](https://github.com/kstefanj/jdk/commit/abf54fbbec5aa0b2fa36c2759e0974cb21d6cf78)
On my local env, it seems make no difference wIth or w/o your patch, for both marking phase and whole full gc pause. But I will apply your patch, Thanks a lot for the benchmarking.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2966
More information about the hotspot-gc-dev
mailing list