< prev index next >

make/test/BuildMicrobenchmark.gmk

Print this page

 61 # Native dependencies
 62 MICROBENCHMARK_NATIVE_SRC_DIRS := $(MICROBENCHMARK_SRC)
 63 MICROBENCHMARK_NATIVE_OUTPUT := $(MICROBENCHMARK_OUTPUT)/native
 64 MICROBENCHMARK_NATIVE_EXCLUDE :=
 65 
 66 ###
 67 
 68 # Need double \n to get new lines and no trailing spaces
 69 MICROBENCHMARK_MANIFEST := Build: $(FULL_VERSION)\n\
 70 \nJMH-Version: $(JMH_VERSION)\n\
 71 \nName: OpenJDK Microbenchmark Suite
 72 
 73 #### Compile Targets
 74 
 75 # Building microbenchmark requires the jdk.unsupported and java.management modules.
 76 # sun.security.util is required to compile Cache benchmark.
 77 # jmh uses annotation processors to generate the benchmark jar and thus
 78 # requires the use of -processor option during benchmark compilation.
 79 
 80 # Build microbenchmark suite for the current JDK

 81 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
 82     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 83     SMALL_JAVA := false, \
 84     CLASSPATH := $(JMH_COMPILE_JARS), \
 85     CREATE_API_DIGEST := true, \
 86     DISABLED_WARNINGS := restricted this-escape rawtypes removal cast \
 87         serial preview, \
 88     SRC := $(MICROBENCHMARK_SRC), \
 89     BIN := $(MICROBENCHMARK_CLASSES), \
 90     JAVAC_FLAGS := \
 91         --add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
 92         --add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
 93         --add-exports java.base/jdk.internal.event=ALL-UNNAMED \
 94         --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
 95         --add-exports java.base/jdk.internal.jimage=ALL-UNNAMED \
 96         --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
 97         --add-exports java.base/jdk.internal.util=ALL-UNNAMED \

 98         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \

 99         --add-exports java.base/sun.invoke.util=ALL-UNNAMED \
100         --add-exports java.base/sun.security.util=ALL-UNNAMED \
101         --add-exports java.base/sun.security.util.math=ALL-UNNAMED \
102         --add-exports java.base/sun.security.util.math.intpoly=ALL-UNNAMED \
103         --enable-preview \

104         -XDsuppressNotes \
105         -processor org.openjdk.jmh.generators.BenchmarkProcessor \
106         -s $(MICROBENCHMARK_GENSRC), \
107     JAVA_FLAGS := \
108         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
109         --add-modules jdk.unsupported \
110         --enable-preview \
111         --limit-modules java.management, \
112 ))
113 
114 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
115 
116 # Unpacking dependencies for inclusion in the benchmark JARs
117 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
118 	$(RM) -r $(JMH_UNPACKED_DIR)
119 	$(MKDIR) -p $(JMH_UNPACKED_DIR)
120 	$(foreach jar, $(JMH_RUNTIME_JARS), \
121             $$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))
122 	$(RM) -r $(JMH_UNPACKED_DIR)/META-INF
123 	$(TOUCH) $@

 61 # Native dependencies
 62 MICROBENCHMARK_NATIVE_SRC_DIRS := $(MICROBENCHMARK_SRC)
 63 MICROBENCHMARK_NATIVE_OUTPUT := $(MICROBENCHMARK_OUTPUT)/native
 64 MICROBENCHMARK_NATIVE_EXCLUDE :=
 65 
 66 ###
 67 
 68 # Need double \n to get new lines and no trailing spaces
 69 MICROBENCHMARK_MANIFEST := Build: $(FULL_VERSION)\n\
 70 \nJMH-Version: $(JMH_VERSION)\n\
 71 \nName: OpenJDK Microbenchmark Suite
 72 
 73 #### Compile Targets
 74 
 75 # Building microbenchmark requires the jdk.unsupported and java.management modules.
 76 # sun.security.util is required to compile Cache benchmark.
 77 # jmh uses annotation processors to generate the benchmark jar and thus
 78 # requires the use of -processor option during benchmark compilation.
 79 
 80 # Build microbenchmark suite for the current JDK
 81 # Need to patch java.base to include preview classes not found in interim javac
 82 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
 83     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 84     SMALL_JAVA := false, \
 85     CLASSPATH := $(JMH_COMPILE_JARS), \
 86     CREATE_API_DIGEST := true, \
 87     DISABLED_WARNINGS := restricted this-escape processing rawtypes removal cast \
 88         serial preview unchecked deprecation dangling-doc-comments, \
 89     SRC := $(MICROBENCHMARK_SRC), \
 90     BIN := $(MICROBENCHMARK_CLASSES), \
 91     JAVAC_FLAGS := \
 92         --add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
 93         --add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
 94         --add-exports java.base/jdk.internal.event=ALL-UNNAMED \
 95         --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
 96         --add-exports java.base/jdk.internal.jimage=ALL-UNNAMED \
 97         --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
 98         --add-exports java.base/jdk.internal.util=ALL-UNNAMED \
 99         --add-exports java.base/jdk.internal.value=ALL-UNNAMED \
100         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
101         --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED \
102         --add-exports java.base/sun.invoke.util=ALL-UNNAMED \
103         --add-exports java.base/sun.security.util=ALL-UNNAMED \
104         --add-exports java.base/sun.security.util.math=ALL-UNNAMED \
105         --add-exports java.base/sun.security.util.math.intpoly=ALL-UNNAMED \
106         --enable-preview \
107         --patch-module java.base=$(SUPPORT_OUTPUTDIR)/preview/java.base \
108         -XDsuppressNotes \
109         -processor org.openjdk.jmh.generators.BenchmarkProcessor \
110         -s $(MICROBENCHMARK_GENSRC), \
111     JAVA_FLAGS := \
112         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
113         --add-modules jdk.unsupported \
114         --enable-preview \
115         --limit-modules java.management, \
116 ))
117 
118 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
119 
120 # Unpacking dependencies for inclusion in the benchmark JARs
121 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
122 	$(RM) -r $(JMH_UNPACKED_DIR)
123 	$(MKDIR) -p $(JMH_UNPACKED_DIR)
124 	$(foreach jar, $(JMH_RUNTIME_JARS), \
125             $$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))
126 	$(RM) -r $(JMH_UNPACKED_DIR)/META-INF
127 	$(TOUCH) $@
< prev index next >