Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-XX:-IgnoreUnrecognizedXXColonOptions does not recognize all XX options #21122

Open
dsouzai opened this issue Feb 12, 2025 · 3 comments · May be fixed by #21126
Open

-XX:-IgnoreUnrecognizedXXColonOptions does not recognize all XX options #21122

dsouzai opened this issue Feb 12, 2025 · 3 comments · May be fixed by #21126

Comments

@dsouzai
Copy link
Contributor

dsouzai commented Feb 12, 2025

Java -version output

openjdk version "17.0.13" 2024-10-15
IBM Semeru Runtime Open Edition 17.0.13.11 (build 17.0.13+11)
Eclipse OpenJ9 VM 17.0.13.11 (build openj9-0.48.0, JRE 17 Mac OS X aarch64-64-Bit 20241015_726 (JIT enabled, AOT enabled)
OpenJ9   - 1d5831436e
OMR      - d10a4d553
JCL      - d17dd58f8d7 based on jdk-17.0.13+11)

Summary of problem

When running with -XX:-IgnoreUnrecognizedXXColonOptions, certain XX options (such as -XX:+MergeCompilerOptions) are unrecognized, eg:

java -XX:-IgnoreUnrecognizedXXColonOptions -XX:+MergeCompilerOptions -version
JVMJ9VM007E Command-line option unrecognised: -XX:+MergeCompilerOptions
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

even though the option is recognized and works:

java -XX:-MergeCompilerOptions -Xjit:version -Xjit:disableProfiling -version
openjdk version "17.0.13" 2024-10-15
IBM Semeru Runtime Open Edition 17.0.13.11 (build 17.0.13+11)
Eclipse OpenJ9 VM 17.0.13.11 (build openj9-0.48.0, JRE 17 Mac OS X aarch64-64-Bit 20241015_726 (JIT enabled, AOT enabled)
OpenJ9   - 1d5831436e
OMR      - d10a4d553
JCL      - d17dd58f8d7 based on jdk-17.0.13+11)

java -XX:+MergeCompilerOptions -Xjit:version -Xjit:disableProfiling -version
JIT: using build "Nov  7 2024 15:38:46" 
JIT level: j9jit_20241107_1538_jenkins
openjdk version "17.0.13" 2024-10-15
IBM Semeru Runtime Open Edition 17.0.13.11 (build 17.0.13+11)
Eclipse OpenJ9 VM 17.0.13.11 (build openj9-0.48.0, JRE 17 Mac OS X aarch64-64-Bit 20241015_726 (JIT enabled, AOT enabled)
OpenJ9   - 1d5831436e
OMR      - d10a4d553
JCL      - d17dd58f8d7 based on jdk-17.0.13+11)

I believe this is because checkArgsConsumed is invoked before the JIT_INITIALIZED stage (which is when the MergeCompilerOptions option is consumed).

Should checkArgsConsumed be called after?

@dsouzai
Copy link
Contributor Author

dsouzai commented Feb 12, 2025

First seen by @JamesKingdon

@dsouzai
Copy link
Contributor Author

dsouzai commented Feb 12, 2025

Should checkArgsConsumed be called after?

I suppose an alternative might be for the JIT to find and consume all options (ie, iterate over the J9::options::_externalOptionString table) in the DLL_LOAD_TABLE_FINALIZED stage.

@pshipton
Copy link
Member

Assigned initially to JIT, but I don't see why the call to checkArgsConsumed() can't be moved down after the JIT_INITIALIZED stage. It looks to be an easy change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants