RFR: CODETOOLS-7903004: JMH: Compiler Blackholes auto-detection [v4]

Aleksey Shipilev shade at openjdk.java.net
Tue Aug 3 13:20:08 UTC 2021


> This is another step towards better [compiler blackholes](https://shipilev.net/jvm/anatomy-quarks/27-compiler-blackholes/) support. This time, we can enable JMH to auto-detect the support and enable it, if JVM supports it. 
> 
> The upside is that users would have much more fidelity in benchmarks and would be be exposed to eventual default Blackhole mode early.
> 
> The flip side is that JDK 17+ benchmarks would suddenly become faster without any user prompt, and maybe run into higher risk for VM bugs in the new blackhole code. I have ran the entire JDK microbenchmark corpus without problems, however, so that possibility should be low.

Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:

 - Auto-detect should be on by default
 - Add another blurb about compiler blackholes at the end of the run

-------------

Changes:
  - all: https://git.openjdk.java.net/jmh/pull/48/files
  - new: https://git.openjdk.java.net/jmh/pull/48/files/f27e2a06..6fbd2aae

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jmh&pr=48&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jmh&pr=48&range=02-03

  Stats: 15 lines in 2 files changed: 14 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jmh/pull/48.diff
  Fetch: git fetch https://git.openjdk.java.net/jmh pull/48/head:pull/48

PR: https://git.openjdk.java.net/jmh/pull/48


More information about the jmh-dev mailing list