Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-13 Thread Jorn Vernee
Hey Peter, Thank you for looking into this. I planned on coming back to this later, as it wasn't as much of a quick-fix as I'd hoped, but got caught up working on other issues in the mean time. Jorn On 11/07/2020 12:00, Peter Levart wrote: On 7/11/20 9:31 AM, Peter Levart wrote: - compile

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-13 Thread Erik Joelsson
Hello Peter, On 2020-07-11 03:00, Peter Levart wrote: On 7/11/20 9:31 AM, Peter Levart wrote: - compile the two sets of benchmarks separately with separate output directories and create separate benchmarks.jar files for them Here's my attempt at a patch for separate benchmarks.jar files.

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-11 Thread Claes Redestad
Hi, I think the idea of generating two distinct jars is workable, but I really don't like the prospect of routinely having to move micros around as the features they test promote from preview. Would a manually managed list of which tests use --enable-preview work for you? Not ideal either, but

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-11 Thread Peter Levart
On 7/11/20 9:31 AM, Peter Levart wrote: - compile the two sets of benchmarks separately with separate output directories and create separate benchmarks.jar files for them Here's my attempt at a patch for separate benchmarks.jar files. The minor complication, as I found out, was what to do

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-11 Thread Peter Levart
On 7/7/20 7:51 PM, Roger Riggs wrote: Hi, I have found it very useful to be able to run benchmarks against multiple versions of the JDK.  Build the benchmark jar once and to compare results. If all of the classes are built with --enable-preview, none of them will run against older JDKs. So

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-07 Thread Roger Riggs
Hi, I have found it very useful to be able to run benchmarks against multiple versions of the JDK.  Build the benchmark jar once and to compare results. If all of the classes are built with --enable-preview, none of them will run against older JDKs. So an approach that only compiles those

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-07 Thread Jorn Vernee
On 30/06/2020 22:51, Erik Joelsson wrote: On 2020-06-30 13:15, Claes Redestad wrote: On 2020-06-30 22:12, Magnus Ihse Bursie wrote: Second to that a solution in the build would be preferable - if we can come up with something that has infinitesimal impact to build times. Are we talking about

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-07 Thread Peter Levart
On 7/7/20 4:26 PM, Peter Levart wrote: I suggest adding --enable-preview to JMH_JVM_ARGS in general now (it doesn't hurt even if classes are not compiled with --enable-preview) and then take time to devise an effective strategy for selectively compiling micro benchmarks with or without

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-07-07 Thread Peter Levart
I suggest adding --enable-preview to JMH_JVM_ARGS in general now (it doesn't hurt even if classes are not compiled with --enable-preview) and then take time to devise an effective strategy for selectively compiling micro benchmarks with or without --enable-preview. At least so the benchmarks

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Erik Joelsson
On 2020-06-30 13:15, Claes Redestad wrote: On 2020-06-30 22:12, Magnus Ihse Bursie wrote: Second to that a solution in the build would be preferable - if we can come up with something that has infinitesimal impact to build times. Are we talking about many files? Could you consider listing

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Claes Redestad
On 2020-06-30 22:12, Magnus Ihse Bursie wrote: Second to that a solution in the build would be preferable - if we can come up with something that has infinitesimal impact to build times. Are we talking about many files? Could you consider listing those files explicitly in the makefile? That

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Magnus Ihse Bursie
On 2020-06-30 19:32, Claes Redestad wrote: On 2020-06-30 18:40, Magnus Ihse Bursie wrote: An alternative workaround would be to add @Fork(jvmArgsAppend = "--enable-preview") to all micros, whether they use preview features or not. Perhaps that wouldn't be so bad, actually. That sounds like a

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Claes Redestad
On 2020-06-30 18:40, Magnus Ihse Bursie wrote: An alternative workaround would be to add @Fork(jvmArgsAppend = "--enable-preview") to all micros, whether they use preview features or not. Perhaps that wouldn't be so bad, actually. That sounds like a reasonable compromise, yes. Well, it

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Magnus Ihse Bursie
On 2020-06-30 18:19, Claes Redestad wrote: On 2020-06-30 17:16, Magnus Ihse Bursie wrote: On 2020-06-30 16:48, Erik Joelsson wrote: On 2020-06-30 07:15, Magnus Ihse Bursie wrote: On 2020-06-30 15:13, Claes Redestad wrote: Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes,

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Claes Redestad
On 2020-06-30 17:16, Magnus Ihse Bursie wrote: On 2020-06-30 16:48, Erik Joelsson wrote: On 2020-06-30 07:15, Magnus Ihse Bursie wrote: On 2020-06-30 15:13, Claes Redestad wrote: Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes, I see what you mean. I've created a patch

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Magnus Ihse Bursie
On 2020-06-30 16:48, Erik Joelsson wrote: On 2020-06-30 07:15, Magnus Ihse Bursie wrote: On 2020-06-30 15:13, Claes Redestad wrote: Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes, I see what you mean. I've created a patch that instead greps through all the benchmark

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Erik Joelsson
On 2020-06-30 07:15, Magnus Ihse Bursie wrote: On 2020-06-30 15:13, Claes Redestad wrote: Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes, I see what you mean. I've created a patch that instead greps through all the benchmark source files, and finds files with

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Magnus Ihse Bursie
On 2020-06-30 15:13, Claes Redestad wrote: Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes, I see what you mean. I've created a patch that instead greps through all the benchmark source files, and finds files with `--enable-preview` in them. Then, only those files are compiled

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Claes Redestad
Hi Jorn, On 2020-06-30 14:52, Jorn Vernee wrote: Hi Claes, I see what you mean. I've created a patch that instead greps through all the benchmark source files, and finds files with `--enable-preview` in them. Then, only those files are compiled with --enable-preview, by using a separate

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-30 Thread Jorn Vernee
Hi Claes, I see what you mean. I've created a patch that instead greps through all the benchmark source files, and finds files with `--enable-preview` in them. Then, only those files are compiled with --enable-preview, by using a separate call to SetupJavaCompilation. This relies on the

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-29 Thread Erik Joelsson
Looks good. /Erik On 2020-06-26 15:14, Jorn Vernee wrote: Hi, https://bugs.openjdk.java.net/browse/JDK-8248135 added --enable-preview to the javac options when building micro benchmarks. We should also add it to the set of default VM arguments passed to the microbenchmark jar so it

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-26 Thread Claes Redestad
Patch looks fine (although you might want to update the comment). It's more concerning that I didn't catch this (seems all tests of mine were with --enable-preview), and we'll still inconvenience users who need to run the jar file directly. So it seems we should consider fixing so that only

Re: RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-26 Thread Jorn Vernee
Forgot to attach the JBS link: https://bugs.openjdk.java.net/browse/JDK-8248429 Jorn On 27/06/2020 00:14, Jorn Vernee wrote: Hi, https://bugs.openjdk.java.net/browse/JDK-8248135 added --enable-preview to the javac options when building micro benchmarks. We should also add it to the set of

RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks

2020-06-26 Thread Jorn Vernee
Hi, https://bugs.openjdk.java.net/browse/JDK-8248135 added --enable-preview to the javac options when building micro benchmarks. We should also add it to the set of default VM arguments passed to the microbenchmark jar so it doesn't need to be passed manually. If --enable-preview is not