JMH 1.9

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


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!


 * -prof gc had a serious bug that affected the measurement on
iterations that take anything except 1 second. Tracking:

 * 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.


 * -prof perfasm is now able to properly account the time for runtime
StubRoutines, like StubRoutines::jshort_disjoint_arraycopy. Tracking:

 * Result files are now unconditionally UTF-8 encoded, since we are
using the Unicode symbols in secondary metric names. Tracking:

 * -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:

 * There are couple of places where we can accidentally get
NullPointerExceptions when running with -prof gc. These places are fixed:

 * LaTeX formatters are enabled to honor -Djmh.scorePrecision, and
refreshed to fix a few presentation bugs:

 * Some profilers are known to produce cryptic -1 values when something
goes wrong. Fixed:


More information about the jmh-dev mailing list