JMH 1.2

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Nov 7 15:52:24 UTC 2014


Hi,

JMH 1.2 is released and available at Maven Central (thanks to Evgeny
Mandrikov, as usual). This is a maintenance release, but it does contain
a few new things, and also changes the current behavior in some minor
places, therefore semantic versioning requires us to bump the minor version.

Summary of changes:

 * Bulk Warmup feature appeared to be largely unknown to the general
public, and therefore we were prompted to create a sample for it:

http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_32_BulkWarmup.java

 * LaTeX result formatter was added, available with "-rff latex". This
is useful when you are using the performance data in your talks and
publications:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901060

 * If you use the result formatters (CSV/SCSV/JSON) be advised that the
default file name was changed from "jmh.out" to "jmh-result.${format}".
Even before this change, you were always able to provide an explicit
result file name.
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901061

 * CSV/SCSV/LaTeX formats were missing the secondary results (e.g. the
metrics from asymmetric benchmarks and/or profiler results) from the
result file. This is at odds with what text report does, as well as JSON
output. All formatters now emit secondary results:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901089

 * "-prof perfasm" is now able to emit assembly in Intel syntax, use
"-Djmh.perfasm.assemblySyntax=intel":
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901082

 * User-defined Profilers, despite the SPI support, were picked up only
from bootclasspath and/or extension classpath. This is not very
user-friendly, since profilers code is not privileged, and can be used
from user classpath. Now Profilers are picked up from user classpath as
well, which opens up the straight-forward way of packaging the profilers
in the same JAR.
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901083

 * We had recently introduced a timeout feature. However the timeout
option was only accessible through the command-line (-to) or through the
API (timeout()). @Timeout annotation was introduced to expose it to
benchmark code:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901033

 * Internal rework in ASM annotation handling let us revive the
annotation collision checks. When asymmetric benchmark has several
@Benchmark methods, and the annotations on those methods disagree with
each other, we should fail to compile the benchmark. This means some of
(broken) benchmark code will stop to compile now:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901087

Enjoy!

Thanks,
-Aleksey.





More information about the jmh-dev mailing list