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

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Jun 7 15:46:13 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.
>> 
>> 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
>
> Neethu Prasad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update full name

LGTM. 🚢 

In addition to the "after" figures, may be also include the "before" figures for the microbenchmark you shared? If you can include, but without any details, the impact of this change on the customer's GC metrics, that would be even better, but isn't essential.

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

Marked as reviewed by ysr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19587#pullrequestreview-2104889107


More information about the hotspot-gc-dev mailing list