[9] RFR (xs) 8168317: [JVMCI] use reflection instead of jdk 9 Module API in Services.java

Christian Thalinger cthalinger at twitter.com
Wed Oct 19 20:57:50 UTC 2016


> On Oct 19, 2016, at 10:55 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> 
> On 10/19/16 1:43 PM, Christian Thalinger wrote:
>> 
>>> On Oct 19, 2016, at 10:38 AM, Vladimir Kozlov
>>> <vladimir.kozlov at oracle.com <mailto:vladimir.kozlov at oracle.com>> wrote:
>>> 
>>> > SETUP needs to be GENERATE_USINGJDKBYTECODE.  That one is using
>>> NEW_JAVAC.
>>> 
>>> Does not work:
>>> 
>>> Compiling 911 files for BUILD_VM_COMPILER_MATCH_PROCESSOR
>>> error: cannot find module: java.base
>> 
>> It should work because that’s how we do the actual annotation processing:
>> 
>> http://cr.openjdk.java.net/~kvn/aot/hs.webrev/make/gensrc/Gensrc-jdk.vm.compiler.gmk.html
>> 
>> 106         $(JAVA_SMALL) $(NEW_JAVAC) \
>> 107             -XDignore.symbol.file \
>> 108             --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
>> 
>> and GENERATE_USINGJDKBYTECODE does:
>> 
>> $(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
>>    JVM := $(JAVA_SMALL), \
>>    JAVAC := $(NEW_JAVAC), \
>>    FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system
>> none $(DISABLE_WARNINGS), \
>> 
>> (I think that’s where I took the code from initially)
>> 
>> Does java.base exist in $(JDK_OUTPUTDIR)/modules?
> 
> No, at the time when we trying to build match processor. No modules are created yet.
> 
> Missing dependency on java.base somewhere?

Seems so.  Is there a way I can reproduce this?  Do I need to pick up all webrevs?  Apply to which forest?

Would be easier if you could make the repositories available :-)

> 
> Vladimir
> 
>> 
>>> 
>>> Vladimir
>>> 
>>> On 10/19/16 1:27 PM, Christian Thalinger wrote:
>>>> 
>>>>> On Oct 19, 2016, at 9:54 AM, Igor Veresov <igor.veresov at oracle.com
>>>>> <mailto:igor.veresov at oracle.com>
>>>>> <mailto:igor.veresov at oracle.com>> wrote:
>>>>> 
>>>>>> 
>>>>>> On Oct 19, 2016, at 12:47 PM, Christian Thalinger
>>>>>> <cthalinger at twitter.com <mailto:cthalinger at twitter.com>
>>>>>> <mailto:cthalinger at twitter.com>> wrote:
>>>>>> 
>>>>>> 
>>>>>>> On Oct 19, 2016, at 9:40 AM, Vladimir Kozlov
>>>>>>> <vladimir.kozlov at oracle.com <mailto:vladimir.kozlov at oracle.com>
>>>>>>> <mailto:vladimir.kozlov at oracle.com>> wrote:
>>>>>>> 
>>>>>>> https://bugs.openjdk.java.net/browse/JDK-8168317
>>>>>>> 
>>>>>>> webrev:
>>>>>>> http://cr.openjdk.java.net/~kvn/8168317/webrev/
>>>>>>> 
>>>>>>> When Graal is built as part of JDK it requires first to build an
>>>>>>> annotation processor using boot jdk 8.
>>>>>>> After JDK-8167180 changes Services class is referenced by annotation
>>>>>>> processor but the code is using jdk 9 Module API and it can't be
>>>>>>> used with jdk 8.
>>>>>> 
>>>>>> I left a comment in the bug: Permalink
>>>>>> <https://bugs.openjdk.java.net/browse/JDK-8168317?focusedCommentId=14013733&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14013733>
>>>>>> 
>>>>>> Basically, it should be possible to use the newly built javac to
>>>>>> compile the annotation processors.  Erik?
>>>>> 
>>>>> It’s not only about compilation it’s about running it on the bootstrap
>>>>> JDK, which in currently 8.
>>>> 
>>>> With the proper build dependencies it should be possible to run on the
>>>> exploded JDK 9.
>>>> 
>>>> http://cr.openjdk.java.net/~kvn/aot/hs.webrev/make/CompileTools.gmk.html
>>>> 
>>>> 51   $(eval $(call SetupJavaCompilation,
>>>> BUILD_VM_COMPILER_MATCH_PROCESSOR, \
>>>> 52       SETUP := GENERATE_OLDBYTECODE, \
>>>> 
>>>> SETUP needs to be GENERATE_USINGJDKBYTECODE.  That one is using
>>>> NEW_JAVAC.
>>>> 
>>>>> 
>>>>> igor
>>>>> 
>>>>>> 
>>>>>> Can you paste or upload the .gmk file?
>>>>>> 
>>>>>>> 
>>>>>>> Use reflection instead of Module API and use code only for running
>>>>>>> with jdk 9.
>>>>>>> 
>>>>>>> Testing with JPRT and JDK build of Graal.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Vladimir
>>>> 
>> 



More information about the hotspot-compiler-dev mailing list