Re: RFR: JDK-8201483 Make it possible to disable JVM features
On 13/04/2018 5:40 PM, Magnus Ihse Bursie wrote: On 2018-04-12 23:30, David Holmes 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. It is always possible to configure something that does not work. :-) We can make it more easy to do the right thing, but if we were to make impossible everything that has not been tested, then we would also make things impossible that are needed for some use cases. I don't buy that. Wrt JVM features, this has *always* been possible. If you use "--with-jvm-variants=custom --with-jvm-features=jvmti,nmt" then you *are* going to build an almost (or fully?) useless JVM. In fact, this method made it *much* harder to try to get a functioning JVM without a specific feature. I have no recollection of jvm variant "custom" being introduced. I think I should update the build documentation regarding JVM features though, and I can definitely add some wisely worded warnings about unsupported combinations of features, especially if removing them. If you can document what the allowed configurations are then you should be able to add constraints that only allows supported sets of features. This is what the original set of JVM variants provided - it was fixed not arbitrary! As I said I don't recall you adding the "custom" option. :( 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. It was the common agreement of both the build team and the GC folks responsive for the upcoming selectively GC inclusion patch, that this was better handled as JVM features than a separate GC flag. Maybe something that affects all of hotspot should have been discussed more broadly. David - /Magnus 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On 13/04/2018 5:25 PM, Volker Simonis wrote: On Thu, Apr 12, 2018 at 11:30 PM, David Holmeswrote: 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. These features were never expected to be individually selectable. The minimal VM was a special case. There is likely more work needed than just build time ifdefs to allow this to actually work. For fun try building on 64-bit and ask for no compiler2 to see what happens. It makes no sense. But there are no constraints implemented so you can ask for nonsensical things. That's not a good thing in my book. David - 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On 2018-04-12 23:30, David Holmes 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. It is always possible to configure something that does not work. :-) We can make it more easy to do the right thing, but if we were to make impossible everything that has not been tested, then we would also make things impossible that are needed for some use cases. Wrt JVM features, this has *always* been possible. If you use "--with-jvm-variants=custom --with-jvm-features=jvmti,nmt" then you *are* going to build an almost (or fully?) useless JVM. In fact, this method made it *much* harder to try to get a functioning JVM without a specific feature. I think I should update the build documentation regarding JVM features though, and I can definitely add some wisely worded warnings about unsupported combinations of features, especially if removing them. 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. It was the common agreement of both the build team and the GC folks responsive for the upcoming selectively GC inclusion patch, that this was better handled as JVM features than a separate GC flag. /Magnus 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On Thu, Apr 12, 2018 at 11:30 PM, David Holmeswrote: > 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 >> >
Re: RFR: JDK-8201483 Make it possible to disable JVM features
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. 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On 2018-04-12 09:53, Magnus Ihse Bursie wrote: 12 apr. 2018 kl. 17:38 skrev Erik Joelsson: Looks good. Especially adding those # header lines in basics.m4! Thanks! I'm actually thinking about splitting out a utils.m4 from basics.m4, for these kinds of helper functions. Sounds ok? Yes, makes sense. /Erik I guess a future followup now is to get rid of the individual enable/disable args that are now redundant. Yes, that is the goal. /Magnus /Erik On 2018-04-12 04:39, 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 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
> 12 apr. 2018 kl. 17:38 skrev Erik Joelsson: > > Looks good. Especially adding those # header lines in basics.m4! Thanks! I'm actually thinking about splitting out a utils.m4 from basics.m4, for these kinds of helper functions. Sounds ok? > > I guess a future followup now is to get rid of the individual enable/disable > args that are now redundant. Yes, that is the goal. /Magnus > > /Erik > > >> On 2018-04-12 04:39, 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 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 >> >
Re: RFR: JDK-8201483 Make it possible to disable JVM features
Looks good. Especially adding those # header lines in basics.m4! I guess a future followup now is to get rid of the individual enable/disable args that are now redundant. /Erik On 2018-04-12 04:39, 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 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On Thu, Apr 12, 2018 at 3:38 PM, Magnus Ihse Bursiewrote: > On 2018-04-12 14:11, Thomas Stüfe wrote: >> >> Hi Magnus, >> >> this is nice. I would like a clearer naming though, that single dash >> is easily overlooked. How about --without-jvm-features instead? > > > This is not possible. --without-X is internally replaced by autoconf to > "--with-X=no". "--without-X=foo" is a syntax error (or more, technically > correct, an attempt to run "--with-X=foo=no"). > > I could of course do something like "--with-disabled-jvm-features=foo" > instead, but I do not think that is much better. A quick internal poll (with > Erik and some guys working on the upcoming individual GC selection, which > prompted this fix) gave the current solution as a clear favorite. > > A compromise is to keep the currently suggested functionality, and *also* > add a "--with-disabled-jvm-features=foo", which I would then treat as > "--with-jvm-features=-foo". Is that something you'd like to request? > No, never mind. I'll keep my eyes sharp for the dash, then. Best Regards, Thomas > /Magnus > > >> >> ..Thomas >> >> On Thu, Apr 12, 2018 at 1: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 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 >>> >
Re: RFR: JDK-8201483 Make it possible to disable JVM features
On 2018-04-12 14:11, Thomas Stüfe wrote: Hi Magnus, this is nice. I would like a clearer naming though, that single dash is easily overlooked. How about --without-jvm-features instead? This is not possible. --without-X is internally replaced by autoconf to "--with-X=no". "--without-X=foo" is a syntax error (or more, technically correct, an attempt to run "--with-X=foo=no"). I could of course do something like "--with-disabled-jvm-features=foo" instead, but I do not think that is much better. A quick internal poll (with Erik and some guys working on the upcoming individual GC selection, which prompted this fix) gave the current solution as a clear favorite. A compromise is to keep the currently suggested functionality, and *also* add a "--with-disabled-jvm-features=foo", which I would then treat as "--with-jvm-features=-foo". Is that something you'd like to request? /Magnus ..Thomas On Thu, Apr 12, 2018 at 1:39 PM, Magnus Ihse Bursiewrote: 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 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
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. 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. /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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
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. 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
Re: RFR: JDK-8201483 Make it possible to disable JVM features
Hi Magnus, this is nice. I would like a clearer naming though, that single dash is easily overlooked. How about --without-jvm-features instead? ..Thomas On Thu, Apr 12, 2018 at 1:39 PM, Magnus Ihse Bursiewrote: > 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 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 >
RFR: JDK-8201483 Make it possible to disable JVM features
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 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