[13] RFR(L) 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library

Vladimir Kozlov vladimir.kozlov at oracle.com
Sat Mar 30 00:38:45 UTC 2019


I did additional changes based on reviews and tested them with tier1-3 testing:

http://cr.openjdk.java.net/~kvn/8220623/webrev_delta.04/

- For G1 moved JVMCI::do_unloading() call to ParallelCleaningTask to execute by one worker thread.
- Added #if INCLUDE_JVMCI for code which is used only by JVMCI.
- Used JVMCI_ONLY() macro for one line JVMCI code.
- Fixed JVMCI code which count compiler threads in vmOperations.cpp as discussed.
- Fixed typo in CompilerThreadStackSize setting in libgraal case.

Thanks,
Vladimir

On 3/29/19 5:23 PM, Vladimir Kozlov wrote:
> Thank you, Nils
> 
> Yes, it looks like typo but it is the same in graal-jvmci-8 code. I asked Graal guys to make sure it 
> is typo which should be fixed (or not).
> 
> Vladimir
> 
> On 3/29/19 2:22 PM, Nils Eliasson wrote:
>> I killed the formatting somehow. Second try:
>>
>> Hi Vladimir,
>>
>> I've started going through the review. This one caught my eye:
>>
>> compilerDefinitions.cpp:
>>
>> + if (UseJVMCINativeLibrary) {
>> +   // SVM compiled code requires more stack space
>> +   if (FLAG_IS_DEFAULT(CompilerThreadStackSize)) {
>> +   FLAG_SET_DEFAULT(CompilerThreadStackSize, 2*M);
>> + }
>>
>> CompilerThreadStackSize is in Ks, so that default will turn into 2G stacks. I guess that isn't 
>> your intention :)
>>
>> Regards,
>>
>> Nils
>>
>> On 2019-03-29 22:09, Nils Eliasson wrote:
>>> Hi Vladimir, I've started going through the review. This one caught my eye: *+ if 
>>> (UseJVMCINativeLibrary) {*
>>> *+ // SVM compiled code requires more stack space*
>>> *+ if (FLAG_IS_DEFAULT(CompilerThreadStackSize)) {*
>>> *+ FLAG_SET_DEFAULT(CompilerThreadStackSize, 2*M);*
>>> *+ } *CompilerThreadStackSize is in Ks, so that default will turn into 2G stacks. I guess that 
>>> isn't your intention :) Regards, Nils **
>>>
>>> On 2019-03-28 20:15, Vladimir Kozlov wrote:
>>>> https://bugs.openjdk.java.net/browse/JDK-8220623
>>>> http://cr.openjdk.java.net/~kvn/8220623/webrev.03/
>>>>
>>>> Update JVMCI to support pre-compiled as shared library Graal.
>>>> Using aoted Graal can offers benefits including:
>>>>  - fast startup
>>>>  - compile time similar to native JIt compilers (C2)
>>>>  - memory usage disjoint from the application Java heap
>>>>  - no profile pollution of JDK code used by the application
>>>>
>>>> This is JDK13 port of JVMCI changes done in graal-jvmci-8 [1] up to date.
>>>> Changes were collected in Metropolis repo [2] and tested there.
>>>>
>>>> Changes we reviewed by Oracle Labs (authors of JVMCI and Graal) and our compiler group.
>>>> Changes in shared code are guarded by #if INCLUDE_JVMCI and JVMCI flags.
>>>>
>>>> I ran tier1-tier8 (which includes HotSpot and JDK tests) and it was clean. In this set Graal was 
>>>> tested only in tier3.
>>>>
>>>> And I ran all hs-tier3-graal .. hs-tier8-graal Graal tests available in our system. Several 
>>>> issue were found which were present before these changes.
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> [1] https://github.com/graalvm/graal-jvmci-8/commit/49ff2045fb603e35516a3a427d8023c00e1607af
>>>> [2] http://hg.openjdk.java.net/metropolis/dev/


More information about the hotspot-dev mailing list