RFR: 7904154: JMH: Handle JVM flags from flags file
Oli Gillespie
ogillespie at openjdk.org
Tue Feb 17 13:02:39 UTC 2026
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.
-------------
Commit messages:
- Fix whitespace
- 7904154: Handle JVM flags from flags file
Changes: https://git.openjdk.org/jmh/pull/168/files
Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=168&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904154
Stats: 157 lines in 2 files changed: 156 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jmh/pull/168.diff
Fetch: git fetch https://git.openjdk.org/jmh.git pull/168/head:pull/168
PR: https://git.openjdk.org/jmh/pull/168
More information about the jmh-dev
mailing list