RFR: 8273801: Handle VMTYPE for "core" VM variant

Magnus Ihse Bursie ihse at openjdk.java.net
Mon Sep 20 11:43:00 UTC 2021


On Thu, 16 Sep 2021 12:02:38 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Building with --with-jvm-variants=core currently produces a binary that replies an odd version:
>> 
>> 
>> $ build/linux-x86_64-core-fastdebug/images/jdk/bin/java -version
>> openjdk version "18-internal" 2022-03-15
>> OpenJDK Runtime Environment (fastdebug build 18-internal+0-adhoc.shade.jdk)
>> OpenJDK 64-Bit  VM (fastdebug build 18-internal+0-adhoc.shade.jdk, interpreted mode)
>> 
>> 
>> It should actually say "OpenJDK 64-Bit Core VM", I think. Build just misses a simple definition of `VMTYPE` for core variant. 
>> 
>> After the patch:
>> 
>> 
>> $ build/linux-x86_64-core-fastdebug/images/jdk/bin/java -client -version
>> openjdk version "18-internal" 2022-03-15
>> OpenJDK Runtime Environment (fastdebug build 18-internal+0-adhoc.shade.jdk)
>> OpenJDK 64-Bit Core VM (fastdebug build 18-internal+0-adhoc.shade.jdk, interpreted mode)
>
> Begs the question ... if there is no C1 and no C2 then what is the name of the directory where libjvm.so lives?

@dholmes-ora If you are building `server`, then it is called `server` regardless of what JVM features you enable or disable.

The way the build system works is that a "JVM variant" is a set of enabled JVM features with a given name. You can roll your own JVM variant by starting with `custom`, which has an empty initial set of features enabled. (But currently, you cannot change the name from the configure command line.)

If core is built only when porting to new platforms, we could emulate that behavior by allowing the user to change the JVM variant name as well, like `configure --with-jvm-variant=server --with-jvm-features=-compiler1,-compiler2 --with-jvm-name=core` or something like that. (And just generate VMTYPE dynamically using Sentence Case). I think this can be seriously considered. But I suspect I should try to dug out from my mailbox archives whom it was last told me they needed/wanted core.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5525



More information about the build-dev mailing list