RFR (S): 8139921: add mx configuration files to support HotSpot IDE configuration generation
Christian Thalinger
christian.thalinger at oracle.com
Wed Nov 11 23:46:19 UTC 2015
> On Nov 11, 2015, at 10:51 AM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>
>
>> On Nov 11, 2015, at 9:54 AM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>>
>>
>>> On Nov 10, 2015, at 2:42 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>>>
>>> [This is kind of a long email but contains pictures :-)]
>>
>> …not! Somehow all my attachments were stripped. Let me see what I can do about this…
>
> I guess I have to send them one by one.
Image attachments are stripped. Although I thought I’ve seen emails with images on other lists. Anyway, I sent a reply with links. Sorry.
>
>>
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8139921
>>> http://cr.openjdk.java.net/~twisti/8139921/webrev/
>>>
>>> In order to make the IDE experience more pleasant now that JEP 243 is integrated we would like to use mx (https://bitbucket.org/allr/mx) for IDE configuration generation. For this we have to integrate a few mx support files into the hotspot repository.
>>>
>>> The mx support files will be under a dot-directory:
>>>
>>> $ hg st --all .mx.jvmci/
>>> C .mx.jvmci/.project
>>> C .mx.jvmci/.pydevproject
>>> C .mx.jvmci/eclipse-settings/org.eclipse.jdt.core.prefs
>>> C .mx.jvmci/hotspot/templates/eclipse/cproject
>>> C .mx.jvmci/hotspot/templates/eclipse/settings/org.eclipse.cdt.core.prefs
>>> C .mx.jvmci/hotspot/templates/eclipse/settings/org.eclipse.cdt.ui.prefs
>>> C .mx.jvmci/hotspot/templates/eclipse/settings/org.eclipse.core.runtime.prefs
>>> C .mx.jvmci/mx_jvmci.py
>>> C .mx.jvmci/suite.py
>>>
>>> mx itself is and will stay an external tool. Some documentation on how to use it can be found here:
>>>
>>> https://wiki.openjdk.java.net/display/Graal/Instructions
>>> https://wiki.openjdk.java.net/display/Graal/Eclipse
>>>
>>> It basically boils down to:
>>>
>>> $ mx ideinit
>>>
>>> and importing the configuration into your favorite IDE.
>>>
>>> This would give every developer the same view of the source code and we can also enforce code-style guidelines.
>>>
>>> Here is how the imported projects look like in Eclipse:
>>>
>>>
>>>
>>> This is most helpful for Compiler engineers who work on the JVMCI but there is value for others too.
>>>
>>> Notice the “hotspot:*” projects at the top? These are projects for different HotSpot configurations. The main advantage here is that these include the generated files directory (if the configuration exists and the files are built). I only configured and built “release” so these can been seen, fastdebug is empty:
>>>
>>>
>>>
>>> This makes it possible for Eclipse to find generated source code. Very helpful. For example, JVMTI. First, jvmtiUtils.hpp from the fastdebug configuration:
>>>
>>>
>>>
>>> and here is the release one:
>>>
>>>
>>>
>>> mx has lots of other commands but most of them are not really useful for us. The only ones worth mentioning besides ideinit are findbugs and checkstyle.
>>>
>>> findbugs runs FindBugs (doh!) on all Java projects that mx knows about:
>>>
>>> cthaling at macbook:~/ws/8139921/hotspot$ mx findbugs
>>> Scanning archives (15 / 30)
>>> 2 analysis passes to perform
>>> Pass 1: Analyzing classes (524 / 524) - 100% complete
>>> Pass 2: Analyzing classes (305 / 305) - 100% complete
>>> Done with analysis
>>> Calculating exit code...
>>> Exit code set to: 0
>>>
>>> checkstyle checks the Java projects against some predefined style. This is particularly helpful for people who don’t use an IDE or to make sure everything matches the style after applying an external patch:
>>>
>>> cthaling at macbook:~/ws/8139921/hotspot$ mx checkstyle
>>> Running Checkstyle on /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src using /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.service/.checkstyle_checks.xml...
>>> /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java:33: 'static' modifier out of order with the JLS suggestions.
>>>
>>> or:
>>>
>>> cthaling at macbook:~/ws/8139921/hotspot$ mx checkstyle
>>> Running Checkstyle on /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src using /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.service/.checkstyle_checks.xml...
>>> /Users/cthaling/ws/8139921/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java:43: Name 'FOO' must match pattern '^[a-z][a-zA-Z0-9]*$'.
>>>
>>> That’s all, folks!
>>
>
More information about the hotspot-dev
mailing list