RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks
Jorn Vernee
jorn.vernee at oracle.com
Tue Jul 7 17:25:35 UTC 2020
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 many files? Could you consider listing those
>>> files explicitly in the makefile? That would make it cheap to filter
>>> them out from the normal compilation, and instead do a secondary
>>> compilation with them.
>>
>> Right now there's one micro using --enable-preview, so that'd be a very
>> short list.
>>
> Having to update a list manually is no fun, but at least we can make
> the build fail if you forget. If you only disable the warning
> "preview" for the special compilation set, the build would fail if
> another microbenchmark was added that needed it.
A little bit of an update on this.
I've implemented the manual list of preview benchmarks [1], but there's
a problem with the current patch. Both the BUILD_JDK_MICROBENCHMARK and
the BUILD_JDK_MICROBENCHMARK_PREVIEW have the same output folder, and
this is good, since we want only 1 benchmarks.jar, we want the
compilation result to be combined. But the JMH annotation processor is
also generating some metadata files in META-INF, namely BenchmarkList
and CompilerHints.
The problem is that both compilation tasks seem to be trying to write to
these files at the same time, leading to e.g. the RecordsDeserialization
benchmark not appearing in the final BenchmarkList, or seemingly
resulting in a mangled file, crashing the JMH parser.
I've tried to resolve this race be adding a dependency on
BUILD_JDK_MICROBENCHMARK to BUILD_JDK_MICROBENCHMARK_PREVIEW (see the
patch), but this doesn't resolve the problem. I'm still investigating this.
Jorn
[1] : http://cr.openjdk.java.net/~jvernee/8248429/webrev.02/
>
> /Erik
>
>> /Claes
More information about the build-dev
mailing list