RFR: 8333716: Shenandoah: Check for disarmed method before taking the nmethod lock
Aleksey Shipilev
shade at openjdk.org
Fri Jun 7 08:19:13 UTC 2024
On Thu, 6 Jun 2024 21:19:16 GMT, Neethu Prasad <duke at openjdk.org> wrote:
> **Notes**
> We are spending significant time on acquiring the per-nmethod as all the
> threads are in same nmethod.
> Adding double-check lock by calling is_armed before lock acquisition.
>
> **Verification**
> 1. hotspot_gc tests
>
> 2.
>
> dev-dsk-neethp-jdk-2c-ad54955c % jdk/build/linux-x86_64-server-release/images/jdk/bin/java -Xmx1g -Xms1g -XX:+UseShenandoahGC -Xlog:gc ManyThreadsStacks.java 2>&1 | grep "marking roots"
> [0.617s][info][gc] GC(0) Concurrent marking roots 5.553ms
> [0.643s][info][gc] GC(1) Concurrent marking roots 3.148ms
> [0.666s][info][gc] GC(2) Concurrent marking roots 3.219ms
> [0.687s][info][gc] GC(3) Concurrent marking roots 2.796ms
> [0.708s][info][gc] GC(4) Concurrent marking roots 2.892ms
> [0.946s][info][gc] GC(5) Concurrent marking roots 3.393ms
> [1.023s][info][gc] GC(6) Concurrent marking roots 2.710ms
> [1.095s][info][gc] GC(7) Concurrent marking roots 2.466ms
> [1.173s][info][gc] GC(8) Concurrent marking roots 2.734ms
> [1.247s][info][gc] GC(9) Concurrent marking roots 2.706ms
> [1.325s][info][gc] GC(10) Concurrent marking roots 2.451ms
> [1.397s][info][gc] GC(11) Concurrent marking roots 2.381ms
> [1.477s][info][gc] GC(12) Concurrent marking roots 2.411ms
> [1.555s][info][gc] GC(13) Concurrent marking roots 2.222ms
> [1.628s][info][gc] GC(14) Concurrent marking roots 2.599ms
Looks good, thanks! Note @kdnilsen.
For Shenandoah patches, please make sure to run `hotspot_gc_shenandoah`. I am pretty sure `hotspot_gc` includes the majority of it, but some compiler tests might be missing.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19587#pullrequestreview-2103923873
PR Comment: https://git.openjdk.org/jdk/pull/19587#issuecomment-2154330475
More information about the hotspot-gc-dev
mailing list