< prev index next >

make/test/BuildMicrobenchmark.gmk

Print this page

 76     TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
 77     SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
 78     INCLUDE_FILES := indify/Indify.java, \
 79     DISABLED_WARNINGS := this-escape rawtypes serial options, \
 80     BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
 81     JAVAC_FLAGS := -XDstringConcat=inline -Xprefer:newer, \
 82 ))
 83 
 84 #### Compile Targets
 85 
 86 # Building microbenchmark requires the jdk.unsupported and java.management modules.
 87 # sun.security.util is required to compile Cache benchmark.
 88 # jmh uses annotation processors to generate the benchmark jar and thus
 89 # requires the use of -processor option during benchmark compilation.
 90 
 91 # Build microbenchmark suite for the current JDK
 92 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
 93     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 94     SMALL_JAVA := false, \
 95     CLASSPATH := $(MICROBENCHMARK_CLASSPATH), \
 96     DISABLED_WARNINGS := restricted this-escape processing rawtypes cast serial preview, \
 97     SRC := $(MICROBENCHMARK_SRC), \
 98     BIN := $(MICROBENCHMARK_CLASSES), \
 99     JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
100         --add-exports java.base/sun.invoke.util=ALL-UNNAMED \
101         --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
102         --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
103         --add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
104         --add-exports java.base/jdk.internal.classfile.instruction=ALL-UNNAMED \
105         --add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
106         --add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \

107         --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
108         --add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
109         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
110         --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
111         --add-exports java.base/jdk.internal.event=ALL-UNNAMED \
112         --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \

113         --enable-preview \
114         -processor org.openjdk.jmh.generators.BenchmarkProcessor, \
115     JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management \
116         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
117         --enable-preview, \
118 ))
119 
120 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
121 
122 # Run Indify
123 $(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
124 	$(call LogWarn, Running Indify on microbenchmark classes)
125 	$(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
126 	    indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
127 	    $(LOG_DEBUG) 2>&1
128 	$(TOUCH) $@
129 
130 # Unpacking dependencies for inclusion in the benchmark JARs
131 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
132 	$(RM) -r $(JMH_UNPACKED_DIR)

 76     TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
 77     SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
 78     INCLUDE_FILES := indify/Indify.java, \
 79     DISABLED_WARNINGS := this-escape rawtypes serial options, \
 80     BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
 81     JAVAC_FLAGS := -XDstringConcat=inline -Xprefer:newer, \
 82 ))
 83 
 84 #### Compile Targets
 85 
 86 # Building microbenchmark requires the jdk.unsupported and java.management modules.
 87 # sun.security.util is required to compile Cache benchmark.
 88 # jmh uses annotation processors to generate the benchmark jar and thus
 89 # requires the use of -processor option during benchmark compilation.
 90 
 91 # Build microbenchmark suite for the current JDK
 92 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
 93     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 94     SMALL_JAVA := false, \
 95     CLASSPATH := $(MICROBENCHMARK_CLASSPATH), \
 96     DISABLED_WARNINGS := restricted this-escape processing rawtypes unchecked cast serial preview deprecation, \
 97     SRC := $(MICROBENCHMARK_SRC), \
 98     BIN := $(MICROBENCHMARK_CLASSES), \
 99     JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
100         --add-exports java.base/sun.invoke.util=ALL-UNNAMED \
101         --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
102         --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
103         --add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
104         --add-exports java.base/jdk.internal.classfile.instruction=ALL-UNNAMED \
105         --add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
106         --add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
107         --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
108         --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
109         --add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
110         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
111         --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
112         --add-exports java.base/jdk.internal.event=ALL-UNNAMED \
113         --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
114         -XDenablePrimitiveClasses \
115         --enable-preview \
116         -processor org.openjdk.jmh.generators.BenchmarkProcessor, \
117     JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management \
118         --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
119         --enable-preview, \
120 ))
121 
122 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
123 
124 # Run Indify
125 $(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
126 	$(call LogWarn, Running Indify on microbenchmark classes)
127 	$(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
128 	    indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
129 	    $(LOG_DEBUG) 2>&1
130 	$(TOUCH) $@
131 
132 # Unpacking dependencies for inclusion in the benchmark JARs
133 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
134 	$(RM) -r $(JMH_UNPACKED_DIR)
< prev index next >