RFR(XS): 8148747 - [TESTBUG] runtime/Unsafe/AllocateMemory.java fails with OOM during compilation

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Feb 3 21:30:08 UTC 2016


On 2/3/16 1:03 PM, Christian Tornqvist wrote:
> Hi Vladimir,
>
>> This means these tests will not be run in Compiler nightlies - we use
> -Xcomp. Are you sure you want that?
>> On other hand these tests are not designed to use compilers (no loops, no
> hot methods). May be you should run them with -Xint then?
>
> The purpose of this test is to ensure that the unsafe.allocateMemory()
> method works correctly, running this with -Xcomp is waste of time and
> doesn't give us any additional information. If this means that it's not
> running in the compiler repo, then I'm fine with that.
> Our tests should as much as possible be run as any normal Java user would
> run their programs, that means not specifying -Xint or -Xcomp.

This way you only test one component of JVM (runtime). Which is reasonable since it is runtime test.
But java users can easily have unsafe.allocateMemory() in a hot code which will be JIT compiled. And if JIT produces an 
incorrect code then we will fail to catch the problem since we don't have test for it.

-Xcomp is simple short cut to invoke and test JIT compilers for tests which are not written to trigger JIT compilation.

Thanks,
Vladimir

>
> Thanks,
> Christian
>
> -----Original Message-----
> From: hotspot-runtime-dev
> [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of Vladimir
> Kozlov
> Sent: Monday, February 1, 2016 4:26 PM
> To: hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR(XS): 8148747 - [TESTBUG] runtime/Unsafe/AllocateMemory.java
> fails with OOM during compilation
>
> This means these tests will not be run in Compiler nightlies - we use
> -Xcomp. Are you sure you want that?
>
> On other hand these tests are not designed to use compilers (no loops, no
> hot methods). May be you should run them with -Xint then?
>
> Thanks,
> Vladimir
>
> On 2/1/16 12:55 PM, Christian Tornqvist wrote:
>> Hi everyone,
>>
>>
>>
>> When running with -Xcomp, the compiler consumes more memory than it
>> used too. The value for MallocMaxTestWords passed to this test has
>> already been increased once and will most likely continue to be a
>> problem in the future when running with -Xcomp.
>>
>>
>>
>> Running with -Xcomp doesn't add any value to these tests, so the easy
>> fix that is also future proof is to not run the tests when the JVM is
>> launched with -Xcomp.
>>
>>
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~ctornqvi/webrev/8148747/webrev.00/
>>
>>
>>
>> Bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8148747
>>
>>
>>
>> Thanks,
>>
>> Christian
>>
>


More information about the hotspot-compiler-dev mailing list