< prev index next >

make/test/BuildMicrobenchmark.gmk

Print this page




  79     INCLUDE_FILES := indify/Indify.java, \
  80     BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
  81 ))
  82 
  83 #### Compile Targets
  84 
  85 # Building microbenchmark requires the jdk.unsupported and java.management modules,
  86 # and to have sjavac disabled.
  87 $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
  88     JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
  89     JAVAC := $(NEW_JAVAC), \
  90     DISABLE_SJAVAC := true, \
  91     FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
  92     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
  93     SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
  94 ))
  95 
  96 # Build microbenchmark suite for the current JDK
  97 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
  98     SETUP := MICROBENCHMARK_JAVA_COMPILER, \
  99     ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH) -Xlint -Xlint:-processing -Werror, \
 100     SRC := $(MICROBENCHMARK_SRC), \
 101     BIN := $(MICROBENCHMARK_CLASSES), \
 102 ))
 103 
 104 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
 105 
 106 # Run Indify
 107 $(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
 108         $(call LogWarn, Running Indify on microbenchmark classes)
 109         $(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
 110             indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
 111             $(LOG_DEBUG) 2>&1
 112         $(TOUCH) $@
 113 
 114 # Unpacking dependencies for inclusion in the benchmark JARs
 115 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
 116         $(RM) -r $(JMH_UNPACKED_DIR)
 117         $(MKDIR) -p $(JMH_UNPACKED_DIR)
 118         $(foreach jar, $(JMH_RUNTIME_JARS), \
 119             $$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))




  79     INCLUDE_FILES := indify/Indify.java, \
  80     BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
  81 ))
  82 
  83 #### Compile Targets
  84 
  85 # Building microbenchmark requires the jdk.unsupported and java.management modules,
  86 # and to have sjavac disabled.
  87 $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
  88     JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
  89     JAVAC := $(NEW_JAVAC), \
  90     DISABLE_SJAVAC := true, \
  91     FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
  92     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
  93     SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
  94 ))
  95 
  96 # Build microbenchmark suite for the current JDK
  97 $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
  98     SETUP := MICROBENCHMARK_JAVA_COMPILER, \
  99     ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH) -Xlint -Xlint:-processing -Werror -XDallowWithFieldOperator, \
 100     SRC := $(MICROBENCHMARK_SRC), \
 101     BIN := $(MICROBENCHMARK_CLASSES), \
 102 ))
 103 
 104 $(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
 105 
 106 # Run Indify
 107 $(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
 108         $(call LogWarn, Running Indify on microbenchmark classes)
 109         $(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
 110             indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
 111             $(LOG_DEBUG) 2>&1
 112         $(TOUCH) $@
 113 
 114 # Unpacking dependencies for inclusion in the benchmark JARs
 115 $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
 116         $(RM) -r $(JMH_UNPACKED_DIR)
 117         $(MKDIR) -p $(JMH_UNPACKED_DIR)
 118         $(foreach jar, $(JMH_RUNTIME_JARS), \
 119             $$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))


< prev index next >