RFR: 8274033: Some tier-4 CDS EpsilonGC tests throw OOM [v2]

David Holmes dholmes at openjdk.java.net
Wed Sep 22 06:47:58 UTC 2021


On Wed, 22 Sep 2021 06:21:24 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Problem:
>> 
>> In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with `-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC`. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM.
>> 
>> Fix:
>> 
>> Limit the set of tests to be executed by introducing a test group `hotspot_cds_epsilongc`. This reduces the number of tests from 200+ to about 50. The problematic `runtime/cds/appcds/methodHandles` cases are excluded.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   @dholmes-ora comments

The fix to DynamicArchiveTestBase.java still seems like an independent fix to a test not directly related to the subject of this issue. If we aren't passing `-XX:+UseEpsilonGC` then presumably we are not passing `-XX:UseXGC` for any X?

test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java line 593:

> 591: 
> 592: 
> 593:     public static String[] concat(ArrayList<String> prefix, String... extra) {

So you start with an `ArrayList<String>` then convert that to a `String[]` which you pass to a function that then creates a new `ArrayList<String>`, adds all the Strings to it and then converts it to a String[] again! can't help but think there has to be a simpler way to combine an ArrayList with a String[] ??

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

PR: https://git.openjdk.java.net/jdk/pull/5626


More information about the hotspot-runtime-dev mailing list