make/devkit/createJMHBundle.sh
author coleenp
Tue, 21 May 2019 09:53:16 -0400
changeset 54961 30c8a21ce002
parent 52595 16609197022c
permissions -rw-r--r--
8224119: Safepoint cleanup logging logs times for things it doesn't do Summary: test condition before reporting times for cleanup actions. Reviewed-by: rehn, hseigel
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
#!/bin/bash -e
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     2
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     3
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     4
# 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
     5
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     6
# 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
     7
# 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
     8
# published by the Free Software Foundation.  Oracle designates this
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
     9
# 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
    10
# 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
    11
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    12
# 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
    13
# 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
    14
# 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
    15
# 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
    16
# accompanied this code).
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    17
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    18
# 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
    19
# 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
    20
# 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
    21
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    22
# 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
    23
# 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
    24
# questions.
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
# Create a bundle in the build directory, containing what's needed to
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    27
# build and run JMH microbenchmarks from the OpenJDK build.
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
JMH_VERSION=1.21
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    30
COMMONS_MATH3_VERSION=3.2
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    31
JOPT_SIMPLE_VERSION=4.6
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    32
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    33
BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz
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
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    36
BUILD_DIR="${SCRIPT_DIR}/../../build/jmh"
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    37
JAR_DIR="$BUILD_DIR/jars"
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    38
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    39
mkdir -p $BUILD_DIR $JAR_DIR
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    40
cd $JAR_DIR
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    41
rm -f *
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    42
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    43
wget http://central.maven.org/maven2/org/apache/commons/commons-math3/$COMMONS_MATH3_VERSION/commons-math3-$COMMONS_MATH3_VERSION.jar
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    44
wget http://central.maven.org/maven2/net/sf/jopt-simple/jopt-simple/$JOPT_SIMPLE_VERSION/jopt-simple-$JOPT_SIMPLE_VERSION.jar
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    45
wget http://central.maven.org/maven2/org/openjdk/jmh/jmh-core/$JMH_VERSION/jmh-core-$JMH_VERSION.jar
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    46
wget http://central.maven.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/$JMH_VERSION/jmh-generator-annprocess-$JMH_VERSION.jar
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    47
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    48
tar -cvzf ../$BUNDLE_NAME *
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    49
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
diff changeset
    50
echo "Created $BUILD_DIR/$BUNDLE_NAME"