On Thu, 25 Feb 2021 15:34:10 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> Attila Szegedi has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR.
>
> test/jdk/jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java line 28:
> 
>> 26:  * @bug 8198540
>> 27:  * @summary Test TypeConverterFactory is not leaking method handles
>> 28:  * @run main/othervm -Xmx4M TypeConverterFactoryMemoryLeakTest
> 
> I think `-Xmx4m` is risking it on some platforms that cannot go that low 
> heap. Maybe do 128M, and bulk up the test allocations, so that GC definitely 
> triggers?

I removed the `-Xmx` option altogether on @plevart's suggestion to invoke 
`System.gc` explicitly instead. I added multiple @run directives, with all 
current GCs. (BTW, do I need to add `@requires vm.gc.Shenandoah` to the tests 
if I include Shenandoah?)

It's funny how ZGC and Shenandoah need 1 iteration less than all other GCs. If 
a test needs 12 iterations with most GCs, ZGC and Shenandoah need 11. If a test 
needs 2 iterations with others, these two will get it done in 1.

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

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

Reply via email to