RFR: 8177968: Add GC stress test TestGCLocker

Erik Helin erik.helin at oracle.com
Fri Apr 7 15:48:36 UTC 2017


Hi all,

this patch adds the stress test "TestGCLocker". The test repeatedly 
calls GCLocker::lock_critical/unlock_critical (via the JNI functions 
GetPrimitiveArrayCritical/ReleasePrimitiveArrayCritical) while 
concurrently filling up the old gen. Thea idea is to stress the GCLocker 
implementation by quickly entering/leaving critical JNI sections while 
simultaneously allocating objects to fill up the heap in order to 
provoke a GC.

Enhancement:
https://bugs.openjdk.java.net/browse/JDK-8177968

Patch:
http://cr.openjdk.java.net/~ehelin/8177968/00/

Testing:
- JPRT (to ensure libTestGCLocker.c compiles on all platforms)
- make run-test TEST=hotspot/test/gc/stress/gclocker

Thanks,
Erik



More information about the hotspot-gc-dev mailing list