JMH 1.7
Aleksey Shipilev
aleksey.shipilev at oracle.com
Fri Mar 20 12:12:39 UTC 2015
Hi,
JMH 1.7 is released and available at Maven Central (thanks to Evgeny
Mandrikov). This is the feature release, and it contains improvements to
generated code, profilers, and reports.
Summary of changes:
* "-prof perfnorm" is now available! It looks (almost) like the "-prof
perf" profiler, but with one critical improvement: it parses the "perf
stat" output, and normalizes the counters by operation count. That way,
perfnorm can estimate the number of uArch events per benchmark op, which
is a usable piece of data in nano-benchmarks.
Changes:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901348
The run sample:
http://cr.openjdk.java.net/~shade/jmh/perfnorm-sample.log
Please try to run "-prof perfnorm" on your cases! As other
"perf"-based profilers, it requires Linux perf to be functional. A
modern kernel with a modern linux-tools is preferred to make the
profiling more accurate. The profilers would run on the old perfs as
well, but not that reliably. Feedbacks, bug reports, improvements (even
better, patches) are welcome.
Note that you might want to run with multiple forks to get the error
estimates for the counters. In many cases, when workload is not steady
and/or the benchmarking environment is flaky, the counters per op may
swing wildly. You better to be catching these swings with multiple forks.
* Text report was cleaned up a little bit: we do not print NaN's when
errors are not defined, etc. This helps to reduce the noise when e.g.
the profilers are enabled.
Changes:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901347
* "External" profilers are now able to figure out when the actual
warmup have ended, instead of guessing from the benchmark configuration.
That makes the profiled results more reliable, and lets to correlate the
measurement ops count with the actual counters. This required rework in
binary link, and it can (potentially) cause issues in some complex
cases, take care. This also, unfortunately, breaks the profiler API
(BenchmarkParams -> BenchmarkResult is changed in one signature).
Changes:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901346
* The internal mechanics for "batch sizes" and "operations per
invocation" was reworked and covered with more tests. Chances are there
are (unlikely) regressions in the cases not covered by tests, take care.
Changes:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901345
* Other user-invisible touchups and polishings.
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list