8178095: Add GC stress test TestSystemGC

Dmitry Fazunenko dmitry.fazunenko at oracle.com
Wed Apr 5 08:43:15 UTC 2017


Hi Erik,

Overall the fix looks good to me.
Some minor questions/comments:

1. Have you tested your code with -XX:-UseCompressedOpps ?
     (you create a lot of objects and limit the heap by 512m)

2. Would you mind renaming TestSystemGC to SystemGCTest or similar. Just 
to distinguish jtreg tests from libraries.

3. Adding a couple of sentences explaining the idea of TestSystemGC 
would help.

4. You run the same method twice:

     public static void main(String[] args) {
         populateLongLived();
         runAllPhases();
         runAllPhases();
     }

Is it intentionally? If yes, would you add a small comment to the second 
run (to avoid possible confusion)

5. Optional: you can move the sleep() method from ThreadUtils  to 
TestSystemGC (to reduce the number of classes)

Thanks,
Dima


On 05.04.2017 10:14, Erik Helin wrote:
> Hi all,
>
> this patch adds a small stress test called TestSystemGC. The test
> stresses a full GC implementation by allocating objects of different
> life times while concurrently calling System.gc() repeatedly.
>
> Enhancement:
> https://bugs.openjdk.java.net/browse/JDK-8178095
>
> Patch:
> http://cr.openjdk.java.net/~ehelin/8178095/00/
>
> Testing:
> - make run-test TEST=hotspot/test/gc/stress/systemgc
>
> Thanks,
> Erik



More information about the hotspot-gc-dev mailing list