On Wed, 7 Jun 2023 00:39:52 GMT, Kelvin Nilsen <kdnil...@openjdk.org> wrote:
>> OpenJDK Colleagues: >> >> Please review this proposed integration of Generational mode for Shenandoah >> GC under https://bugs.openjdk.org/browse/JDK-8307314. >> >> Generational mode of Shenandoah is enabled by adding >> `-XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCMode=generational` to a >> command line that already specifies ` -XX:+UseShenandoahGC`. The >> implementation automatically adjusts the sizes of old generation and young >> generation to efficiently utilize the entire heap capacity. Generational >> mode of Shenandoah resembles G1 in the following regards: >> >> 1. Old-generation marking runs concurrently during the time that multiple >> young generation collections run to completion. >> 2. After old-generation marking completes, we perform a sequence of mixed >> collections. Each mixed collection combines collection of young generation >> with evacuation of a portion of the old-generation regions identified for >> collection based on old-generation marking information. >> 3. Unlike G1, young-generation collections and evacuations are entirely >> concurrent, as with single-generation Shenandoah. >> 4. As with single-generation Shenandoah, there is no explicit notion of eden >> and survivor space within the young generation. In practice, regions that >> were most recently allocated tend to have large amounts of garbage and these >> regions tend to be collected with very little effort. Young-generation >> objects that survive garbage collection tend to accumulate in regions that >> hold survivor objects. These regions tend to have smaller amounts of >> garbage, and are less likely to be collected. If they survive a sufficient >> number of young-generation collections, the “survivor” regions are promoted >> into the old generation. >> >> We expect to refine heuristics as we gain experience with more production >> workloads. In the future, we plan to remove the “experimental” qualifier >> from generational mode, at which time we expect that generational mode will >> become the default mode for Shenandoah. >> >> **Testing**: We continuously run jtreg tiers 1-4 + hotspot_gc_shenandoah, >> gcstress, jck compiler, jck runtime, Dacapo, SpecJBB, SpecVM, Extremem, >> HyperAlloc, and multiple AWS production workload simulators. We test on >> Linux x64 and aarch64, Alpine x64 and aarch64, macOS x64 and aarch64, and >> Windows x64. > > Kelvin Nilsen has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright notices src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp line 4: > 2: * Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved. > 3: * Copyright (c) 2020, 2021, Huawei Technologies Co., Ltd. All rights > reserved. > 4: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Remove this line; extent of changes doesn't warrant copyright header change. src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp line 3: > 1: /* > 2: * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Should probably be removed. src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.hpp line 3: > 1: /* > 2: * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Check if this is necessary. src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp line 4: > 2: * Copyright (c) 2015, 2021, Red Hat, Inc. All rights reserved. > 3: * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights > reserved. > 4: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Should be removed. src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp line 3: > 1: /* > 2: * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Can be removed? src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp line 3: > 1: /* > 2: * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Should be removed? src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp line 3: > 1: /* > 2: * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Should be removed? src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.hpp line 3: > 1: /* > 2: * Copyright (c) 2019, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Should be removed? src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp line 3: > 1: /* > 2: * Copyright (c) 2019, 2021, Red Hat, Inc. All rights reserved. > 3: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. Can be removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221051315 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221054767 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221056157 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221056909 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221058681 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221060221 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221060613 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221061900 PR Review Comment: https://git.openjdk.org/jdk/pull/14185#discussion_r1221063047