To support execution of JMH benchmarks via GraalVM native image binaries, BenchmarkParams contructions needs to be tailored in order to take advantage of JMH's benchmark execution plumbing.
For native images, BenchmarkParams values for jvm, jvmArgs, jdkVersion, vmName and vmVersion fields need to be adjusted.
JMH can enable this by converting `Runner.newBenchmarkParams(BenchmarkListEntry, ActionMode)` method from private to protected. Making this change requires `ActionMode` to be made public instead of package private.
The benefits of this change brings to the native image JMH use case can be seen here: https://github.com/galderz/fibula/commit/8fd8cf3f4eb1c6f37de7f807bfc697ef981a3e05#diff-601b6d98eff18db8a804efb415d515c3d397d42b9c982713b72c37bea2ebbf18
For native images, BenchmarkParams values for jvm, jvmArgs, jdkVersion, vmName and vmVersion fields need to be adjusted.
JMH can enable this by converting `Runner.newBenchmarkParams(BenchmarkListEntry, ActionMode)` method from private to protected. Making this change requires `ActionMode` to be made public instead of package private.
The benefits of this change brings to the native image JMH use case can be seen here: https://github.com/galderz/fibula/commit/8fd8cf3f4eb1c6f37de7f807bfc697ef981a3e05#diff-601b6d98eff18db8a804efb415d515c3d397d42b9c982713b72c37bea2ebbf18
- links to
-
Review(master) openjdk/jmh/160