JMH 1.9

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Apr 17 22:13:20 UTC 2015


Hi,

JMH 1.9 is released and available at Maven Central (props to Evgeny
Mandrikov, as usual). This release includes new features, some important
bugfixes, observable UI changes, significant improvements in the
generated code, etc. -- all in all, something that warrants the minor
version bump.

Brief summary of changes:

 * -prof gc now reports the allocation rates! This was made possible by
Vladimir Sitnikov's contribution, kudos!

  This profiler relies on getting the allocation statistics from
ThreadMXBeans, and so it is lightweight. Known limitation of the
profiler is that it cannot track the threads created/finished during the
benchmark execution. Always cross-check the allocation rates with the GC
churn rates and vice versa to catch possible measurement errors!

 Tracking:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901386

 * -prof gc had a serious bug that affected the measurement on
iterations that take anything except 1 second. Tracking:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901390

 * JMH sometimes needs to arbitrate the worker threads' access to helper
methods. To avoid blocking and subsequent descheduling, JMH does the
spinlocks. More advanced version of spinlocks is done now to alleviate
the excess time spent spinning, and hide the infrastructure from
profilers. Our torture tests say new versions perform well. If you
experience troubles after migrating to JMH 1.9, let us know.

 Tracking:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901393
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901394

 * -prof perfasm is now able to properly account the time for runtime
StubRoutines, like StubRoutines::jshort_disjoint_arraycopy. Tracking:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901379

 * Result files are now unconditionally UTF-8 encoded, since we are
using the Unicode symbols in secondary metric names. Tracking:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901382

 * -prof gc metric names contained curly braces that did not play well
with export formats we are having. Instead of trying to special-case the
export formats, the metric names were changed to more neutral:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901383

 * There are couple of places where we can accidentally get
NullPointerExceptions when running with -prof gc. These places are fixed:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901374
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901384

 * LaTeX formatters are enabled to honor -Djmh.scorePrecision, and
refreshed to fix a few presentation bugs:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901389
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901392

 * Some profilers are known to produce cryptic -1 values when something
goes wrong. Fixed:
    https://bugs.openjdk.java.net/browse/CODETOOLS-7901388

Thanks,
-Aleksey.



More information about the jmh-dev mailing list