RFR (XS): 8193105: Print error code when map_memory_to_file() fails

David Holmes david.holmes at oracle.com
Wed Dec 6 11:31:30 UTC 2017


On 6/12/2017 9:25 PM, David Holmes wrote:
> Hi Sangheon,
> 
> On 6/12/2017 5:46 PM, sangheon.kim wrote:
>> Hi all,
>>
>> Could I have some reviews for this change?
>>
>> JDK-8190308 (Implementation: JEP 316: Heap Allocation on Alternative 
>> Memory Devices) introduced a new test(TestAllocateHeapAt.java) but it 
>> is failing on Solaris-Sparc with fastdebug build. But unfortunately 
>> there's no error print when related function fails.
>>
>> This proposal is simply adding error code print for further 
>> investigation of JDK-8192871(TestAllocateHeapAt fails), not change its 
>> logic.
>>
>> CR: https://bugs.openjdk.java.net/browse/JDK-8193105
>> Webrev: http://cr.openjdk.java.net/~sangheki/8193105/webrev.0
>> Testing: hs-tier1
> 
> !     vm_exit_during_initialization(err_msg("Error in mapping Java heap 
> at the given filesystem directory. error(%d)", ret));
> 
> You should use strerror(ret) to print a readable error string here.

Except you can't because on OSX util_posix_fallocate doesn't necessarily 
return an error code! That's another bug in this particular so-called 
"posix" function! :(

David

> Thanks,
> David
> 
>> Thanks,
>> Sangheon


More information about the hotspot-gc-dev mailing list