--- a/make/test/BuildMicrobenchmark.gmk Thu May 23 11:36:31 2019 +0100
+++ b/make/test/BuildMicrobenchmark.gmk Thu May 23 08:57:24 2019 -0700
@@ -47,6 +47,9 @@
MICROBENCHMARK_CLASSES := $(MICROBENCHMARK_OUTPUT)/classes
MICROBENCHMARK_JAR_BIN := $(MICROBENCHMARK_OUTPUT)/jar
+MICROBENCHMARK_TOOLS_CLASSES := $(MICROBENCHMARK_OUTPUT)/tools-classes
+MICROBENCHMARK_INDIFY_DONE := $(MICROBENCHMARK_CLASSES)/_indify.marker
+
JMH_UNPACKED_DIR := $(MICROBENCHMARK_OUTPUT)/jmh_jars
JMH_UNPACKED_JARS_DONE := $(JMH_UNPACKED_DIR)/_unpacked.marker
@@ -68,6 +71,14 @@
\nJMH-Version: $(JMH_VERSION)\n\
\nName: OpenJDK Microbenchmark Suite
+#### Compile Indify tool
+
+$(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
+ SETUP := GENERATE_OLDBYTECODE, \
+ SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
+ INCLUDE_FILES := indify/Indify.java, \
+ BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
+))
#### Compile Targets
@@ -92,6 +103,14 @@
$(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
+# Run Indify
+$(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
+ $(call LogWarn, Running Indify on microbenchmark classes)
+ $(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
+ indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
+ $(LOG_DEBUG) 2>&1
+ $(TOUCH) $@
+
# Unpacking dependencies for inclusion in the benchmark JARs
$(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
$(RM) -r $(JMH_UNPACKED_DIR)
@@ -104,7 +123,8 @@
# Create benchmarks JAR file with benchmarks for both the old and new JDK
$(eval $(call SetupJarArchive, BUILD_JDK_JAR, \
- DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE), \
+ DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE) \
+ $(MICROBENCHMARK_INDIFY_DONE), \
SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \
BIN := $(MICROBENCHMARK_JAR_BIN), \
SUFFIXES := .*, \