From 54861df3d9e29a86dcfcecc4eb5072cc3f006069 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Wed, 11 Oct 2023 00:54:54 +0000 Subject: [PATCH] 8317802: jmh tests fail with Unable to find the resource: /META-INF/BenchmarkList after JDK-8306819 Reviewed-by: erikj, ihse --- make/test/BuildMicrobenchmark.gmk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index c0484cba30f..0a6a56f2a2e 100644 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -84,7 +84,9 @@ $(eval $(call SetupJavaCompilation, BUILD_INDIFY, \ #### Compile Targets # Building microbenchmark requires the jdk.unsupported and java.management modules. -# sun.security.util is required to compile Cache benchmark +# sun.security.util is required to compile Cache benchmark. +# jmh uses annotation processors to generate the benchmark jar and thus +# requires the use of -processor option during benchmark compilation. # Build microbenchmark suite for the current JDK $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \ @@ -106,7 +108,8 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \ --add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \ --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \ --add-exports java.base/jdk.internal.event=ALL-UNNAMED \ - --enable-preview, \ + --enable-preview \ + -processor org.openjdk.jmh.generators.BenchmarkProcessor, \ JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management \ --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \ --enable-preview, \