RFR: JDK-8188312 Use CDS if present when running the Boot JDK during build

David Holmes david.holmes at oracle.com
Tue Oct 3 12:55:33 UTC 2017


Looks good to me.

Thanks,
David

On 3/10/2017 10:47 PM, Magnus Ihse Bursie wrote:
> On 2017-10-03 14:21, David Holmes wrote:
>> Erik J. raises a good point in the bug report that 
>> -XX:SharedArchiveFile=xxx should be used if we create the archive. The 
>> build system has no business creating an archive inside the boot JDK.
> 
> Agree, that is a better solution. I was not aware of the 
> -XX:SharedArchiveFile option.
> 
> Here's an updated webrev:
> http://cr.openjdk.java.net/~ihse/JDK-8188312-use-CDS-for-bootjdk/webrev.02
> 
> I create the jsa file in configure-support, that way it can survive a 
> "make clean".
> 
> /Magnus
> 
>>
>> David
>>
>> On 3/10/2017 9:02 PM, David Holmes wrote:
>>> Hi Claes,
>>>
>>> On 3/10/2017 8:48 PM, Claes Redestad wrote:
>>>> Hi,
>>>>
>>>> -Xshare:auto silently ignores failures to map the shared archive and 
>>>> should be safe to use. I think you're thinking of -Xshare:on which 
>>>> will fail/abort the VM if mapping fails.
>>>
>>> Ah okay.
>>>
>>> In that case seems reasonable. But please test thoroughly across all 
>>> platforms in JPRT.
>>>
>>> Thanks,
>>> David
>>>
>>>> /Claes
>>>>
>>>>
>>>> On 2017-10-03 12:28, David Holmes wrote:
>>>>> Hi Magnus,
>>>>>
>>>>> As I just put in the bug report, it isn't quite this simple. You 
>>>>> have to be able to tolerate/recover from failure to map the shared 
>>>>> archive.
>>>>>
>>>>> Cheers,
>>>>> David
>>>>>
>>>>> On 3/10/2017 8:24 PM, Magnus Ihse Bursie wrote:
>>>>>> We should use CDS to minimize Java startup time during build. We 
>>>>>> run multiple Java commands, and every second counts.
>>>>>>
>>>>>> On my machine, I get a ~3% build time speedup with this fix.
>>>>>>
>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8188312
>>>>>> WebRev: 
>>>>>> http://cr.openjdk.java.net/~ihse/JDK-8188312-use-CDS-for-bootjdk/webrev.01 
>>>>>>
>>>>>>
>>>>>> /Magnus
>>>>
> 



More information about the build-dev mailing list