RFR: 7904154: JMH: Handle JVM flags from flags file

Oli Gillespie ogillespie at openjdk.org
Fri Feb 20 15:51:00 UTC 2026


On Tue, 17 Feb 2026 12:27:46 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:

> When using a flags file, getInputArguments() doesn't include -XX: prefix which means the flags won't be valid in the forked VM. Find those flags and prefix them manually.
> 
> 1. Added a test showing the issue, and covering a few different flag types.
> 2. Added logic to prefix flags with `-XX:` if necessary, allowing the test to pass.

Looks like this will be handled by https://bugs.openjdk.org/browse/JDK-8378110, but probably not backported (far) so could still cause issues for some time. I'll close this anyway, but can pick it back up if desired.

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

PR Comment: https://git.openjdk.org/jmh/pull/168#issuecomment-3935690646


More information about the jmh-dev mailing list