RFR: 8333716: Shenandoah: Check for disarmed method before taking the nmethod lock [v2]

Neethu Prasad duke at openjdk.org
Fri Jun 7 18:27:12 UTC 2024


On Fri, 7 Jun 2024 14:33:23 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. Benchmarking on [c6a.12xlarge](https://aws.amazon.com/ec2/instance-types/c6a/)
>> **Prior to this PR:**
>> 
>> 
>> 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.697s][info][gc] GC(0) Concurrent marking roots 82.772ms
>> [0.800s][info][gc] GC(1) Concurrent marking roots 82.675ms
>> [0.883s][info][gc] GC(2) Concurrent marking roots 67.893ms
>> [0.976s][info][gc] GC(3) Concurrent marking roots 76.811ms
>> [1.064s][info][gc] GC(4) Concurrent marking roots 73.170ms
>> [1.276s][info][gc] GC(5) Concurrent marking roots 68.098ms
>> [1.386s][info][gc] GC(6) Concurrent marking roots 78.548ms
>> [1.496s][info][gc] GC(7) Concurrent marking roots 77.666ms
>> [1.601s][info][gc] GC(8) Concurrent marking roots 69.263ms
>> [1.714s][info][gc] GC(9) Concurrent marking roots 70.956ms
>> [1.838s][info][gc] GC(10) Concurrent marking roots 75.879ms
>> [1.956s][info][gc] GC(11) Concurrent marking roots 71.753ms
>> [2.085s][info][gc] GC(12) Concurrent marking roots 78.325ms
>> [2.214s][info][gc] GC(13) Concurrent marking roots 72.238ms
>> [2.337s][info][gc] GC(14) Concurrent marking roots 75.127ms
>> 
>> 
>> **After:**
>> 
>> 
>> 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 mark...
>
> Neethu Prasad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update full name

Thanks all for the approval.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19587#issuecomment-2155316954


More information about the hotspot-gc-dev mailing list