RFR: JDK-8201483 Make it possible to disable JVM features (original) (raw)

Volker Simonis volker.simonis at gmail.com
Fri Apr 13 07:25:51 UTC 2018


On Thu, Apr 12, 2018 at 11:30 PM, David Holmes <david.holmes at oracle.com> wrote:

On 12/04/2018 11:33 PM, Magnus Ihse Bursie wrote:

On 2018-04-12 14:15, David Holmes wrote:

Hi Magnus, On 12/04/2018 9:39 PM, Magnus Ihse Bursie wrote:

It is currently easy to add new JVM features to the JVM build, but it is not possible to remove features. With this change, features can be both added or removed from the default set. They are added using --with-jvm-features=f1,f2 and removed using --with-jvm-features=-f1,-f2. The syntax can be combined, so --with-jvm-features=dtrace,-nmt will enable dtrace but disable native memory tracking.

I need to point out that we have never tested disabling individual VM features likes this. They are either all on, or all off for the minimal VM! There may be implicit dependencies between features. Well, I have. :-) However, I don't do that regularly, and changes might very well have crept in. As always, if you build something non-standard that is not regularly tested, you're on your own. Feels to me like you've taken away the safety-fence and are encouraging people to attempt these unsupported configurations. Whether that was your intent or not.

I think that would be great. If people would try out different configurations AND fix them that would be a great code clean-up for HotSpot. I've recently tried various "unsupported" configurations (i.e. minimal plus some selected features) and found that the resulting build failures are mostly artificial because the corresponding features aren't correctly ifdefed.

In any case, the purpose of this is not so much to disable existing JVM features (after all, no one has really been missing this functionality), as to pave the way for the upcoming patch for including/excluding individual GCs. Surely a GC selection flag would have sufficed. David

/Magnus

David I also included some additional code cleanup and fixes, such as printing the JVM feature set at the summary. Bug: https://bugs.openjdk.java.net/browse/JDK-8201483 WebRev: http://cr.openjdk.java.net/~ihse/JDK-8201483-disable-JVM-features/webrev.01



More information about the build-dev mailing list