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

Ioi Lam iklam at openjdk.java.net
Wed Sep 22 19:53:53 UTC 2021


On Wed, 22 Sep 2021 15:47:29 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> 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[] ??
>
> Could use the prefix, add extra to the list then prefix.toArray to avoid such conversion between ArrayList and array.

I've removed this code from the current PR. I found other cases where the "runtime prefix" was not passed to child processes. I'll do a more general fix in https://bugs.openjdk.java.net/browse/JDK-8274166

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

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


More information about the hotspot-runtime-dev mailing list