make/test/BuildMicrobenchmark.gmk
author thartmann
Thu, 22 Aug 2019 12:22:02 +0200
changeset 57833 3283cff319c8
parent 55008 6977eb6a4b61
permissions -rw-r--r--
8230020: [BACKOUT] compiler/types/correctness/* tests fail with "assert(recv == __null || recv->is_klass()) failed: wrong type" Summary: Back out JDK-8225670 due to performance regressions. Reviewed-by: roland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     1
#
53159
9339773f2530 8216275: Disable annotation processing lint warnings when building microbenchmarks
redestad
parents: 52595
diff changeset
     2
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     4
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    10
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    15
# accompanied this code).
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    16
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    20
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    23
# questions.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    24
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    25
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    26
# This must be the first rule
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    27
default: all
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    28
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    29
include $(SPEC)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    30
include MakeBase.gmk
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    31
include JavaCompilation.gmk
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    32
include SetupJavaCompilers.gmk
53834
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    33
include TestFilesCompilation.gmk
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    34
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    35
ifeq ($(JMH_CORE_JAR), )
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    36
  $(info Error: JMH is missing. Please use configure --with-jmh.)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    37
  $(error Cannot continue)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    38
endif
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    39
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    40
#### Variables
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    41
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    42
MICROBENCHMARK_SRC := $(TOPDIR)/test/micro
53834
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    43
MICROBENCHMARK_IMAGE_DIR := $(TEST_IMAGE_DIR)/micro
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    44
MICROBENCHMARK_JAR := $(MICROBENCHMARK_IMAGE_DIR)/benchmarks.jar
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    45
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    46
MICROBENCHMARK_OUTPUT := $(SUPPORT_OUTPUTDIR)/test/micro
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    47
MICROBENCHMARK_CLASSES := $(MICROBENCHMARK_OUTPUT)/classes
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    48
MICROBENCHMARK_JAR_BIN := $(MICROBENCHMARK_OUTPUT)/jar
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    49
55008
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    50
MICROBENCHMARK_TOOLS_CLASSES := $(MICROBENCHMARK_OUTPUT)/tools-classes
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    51
MICROBENCHMARK_INDIFY_DONE := $(MICROBENCHMARK_CLASSES)/_indify.marker
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    52
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    53
JMH_UNPACKED_DIR := $(MICROBENCHMARK_OUTPUT)/jmh_jars
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    54
JMH_UNPACKED_JARS_DONE := $(JMH_UNPACKED_DIR)/_unpacked.marker
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    55
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    56
# External dependencies
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    57
JMH_COMPILE_JARS := $(JMH_CORE_JAR) $(JMH_GENERATOR_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    58
JMH_RUNTIME_JARS := $(JMH_CORE_JAR) $(JMH_COMMONS_MATH_JAR) $(JMH_JOPT_SIMPLE_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    59
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    60
MICROBENCHMARK_CLASSPATH := $(call PathList, $(JMH_COMPILE_JARS))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    61
53834
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    62
# Native dependencies
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    63
MICROBENCHMARK_NATIVE_SRC_DIRS := $(MICROBENCHMARK_SRC)
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    64
MICROBENCHMARK_NATIVE_OUTPUT := $(MICROBENCHMARK_OUTPUT)/native
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    65
MICROBENCHMARK_NATIVE_EXCLUDE :=
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
    66
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    67
###
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    68
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    69
# Need double \n to get new lines and no trailing spaces
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    70
MICROBENCHMARK_MANIFEST := Build: $(FULL_VERSION)\n\
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    71
\nJMH-Version: $(JMH_VERSION)\n\
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    72
\nName: OpenJDK Microbenchmark Suite
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    73
55008
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    74
#### Compile Indify tool
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    75
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    76
$(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    77
    SETUP := GENERATE_OLDBYTECODE, \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    78
    SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    79
    INCLUDE_FILES := indify/Indify.java, \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    80
    BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
    81
))
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    82
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    83
#### Compile Targets
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    84
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    85
# Building microbenchmark requires the jdk.unsupported and java.management modules,
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    86
# and to have sjavac disabled.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    87
$(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    88
    JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    89
    JAVAC := $(NEW_JAVAC), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    90
    DISABLE_SJAVAC := true, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    91
    FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    92
    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    93
    SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    94
))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    95
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    96
# Build microbenchmark suite for the current JDK
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    97
$(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    98
    SETUP := MICROBENCHMARK_JAVA_COMPILER, \
53159
9339773f2530 8216275: Disable annotation processing lint warnings when building microbenchmarks
redestad
parents: 52595
diff changeset
    99
    ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH) -Xlint -Xlint:-processing -Werror, \
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   100
    SRC := $(MICROBENCHMARK_SRC), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   101
    BIN := $(MICROBENCHMARK_CLASSES), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   102
))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   103
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   104
$(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   105
55008
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   106
# Run Indify
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   107
$(MICROBENCHMARK_INDIFY_DONE): $(BUILD_INDIFY) $(BUILD_JDK_MICROBENCHMARK)
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   108
	$(call LogWarn, Running Indify on microbenchmark classes)
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   109
	$(JAVA_SMALL) -cp $(MICROBENCHMARK_TOOLS_CLASSES) \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   110
	    indify.Indify --overwrite $(MICROBENCHMARK_CLASSES) \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   111
	    $(LOG_DEBUG) 2>&1
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   112
	$(TOUCH) $@
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   113
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   114
# Unpacking dependencies for inclusion in the benchmark JARs
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   115
$(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   116
	$(RM) -r $(JMH_UNPACKED_DIR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   117
	$(MKDIR) -p $(JMH_UNPACKED_DIR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   118
	$(foreach jar, $(JMH_RUNTIME_JARS), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   119
            $$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   120
	$(RM) -r $(JMH_UNPACKED_DIR)/META-INF
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   121
	$(RM) $(JMH_UNPACKED_DIR)/*.xml
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   122
	$(TOUCH) $@
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   123
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   124
# Create benchmarks JAR file with benchmarks for both the old and new JDK
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   125
$(eval $(call SetupJarArchive, BUILD_JDK_JAR, \
55008
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   126
    DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE) \
6977eb6a4b61 8221543: Indify-dependent microbenchmarks are broken
erikj
parents: 53834
diff changeset
   127
        $(MICROBENCHMARK_INDIFY_DONE), \
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   128
    SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   129
    BIN := $(MICROBENCHMARK_JAR_BIN), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   130
    SUFFIXES := .*, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   131
    EXCLUDE_FILES:= _the.BUILD_JDK_MICROBENCHMARK_batch \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   132
        _the.BUILD_JDK_MICROBENCHMARK.vardeps _unpacked.marker, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   133
    EXTRA_MANIFEST_ATTR := $(MICROBENCHMARK_MANIFEST), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   134
    JARMAIN := org.openjdk.jmh.Main, \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   135
    JAR := $(MICROBENCHMARK_JAR), \
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   136
))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   137
53834
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   138
# Setup compilation of native library dependencies
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   139
$(eval $(call SetupTestFilesCompilation, BUILD_MICROBENCHMARK_LIBRARIES, \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   140
    TYPE := LIBRARY, \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   141
    SOURCE_DIRS := $(MICROBENCHMARK_NATIVE_SRC_DIRS), \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   142
    OUTPUT_DIR := $(MICROBENCHMARK_NATIVE_OUTPUT), \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   143
    EXCLUDE := $(MICROBENCHMARK_NATIVE_EXCLUDE), \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   144
))
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   145
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   146
# Setup copy of native dependencies to image output dir
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   147
$(eval $(call SetupCopyFiles, COPY_MICROBENCHMARK_NATIVE, \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   148
    SRC := $(MICROBENCHMARK_NATIVE_OUTPUT), \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   149
    DEST := $(MICROBENCHMARK_IMAGE_DIR)/native, \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   150
    FILES := $(BUILD_MICROBENCHMARK_LIBRARIES), \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   151
    FLATTEN := true, \
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   152
))
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   153
1b40a0178b2a 8219393: Add native library support for microbenchmarks
redestad
parents: 53159
diff changeset
   154
all: $(MICROBENCHMARK_JAR) $(BUILD_MICROBENCHMARK_LIBRARIES) $(COPY_MICROBENCHMARK_NATIVE)
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   155
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
   156
.PHONY: all